This is the page generator component of AVD
https://github.com/aquasecurity/avd
Note: Set baseURL="/"
here before proceeding.
make hugo-devel
and then navigate to http://localhost:1313
to view the site.
make md-clean md-build sync-all md-generate hugo-generate nginx-restart
then navigate to http://localhost:9011
to view the pages.
If changes are made to the existing AVD page structure (removal of existing fields), the following must be done:
- AVD content must be regenerated (
rm -rf content/nvd && mkdir -p content/nvd
) - Build must be done manually and pushed up to AVD repo (not through GitHub Actions) This is needed to avoid tripping the Aqua Custom content logic.
make md-generate
markdowns will be generated in avd-repo/content/
make hugo-generate
site will be generated in avd-repo/docs/
-
Run MeiliSearch locally
docker run -p 7700:7700 -v $(pwd)/data.ms:/data.ms getmeili/meilisearch
-
Setup search index
curl -X POST 'http://127.0.0.1:7700/indexes' -H 'Content-Type: application/json' --data '{ "uid" : "avd", "primaryKey": "title"}'
-
Add generated index.json to build search indexes
curl -X POST 'http://127.0.0.1:7700/indexes/avd/documents' --data @docs/index.json
-
To monitor index build progress:
curl -X GET 'http://localhost:7700/indexes/avd/updates'
-
Set the host and apiKey in
static/js/fastsearch.js
for using MeiliSearch:
meilisearch = new MeiliSearch({
host: 'http://localhost',
apiKey: "<public meilisearch if you set a master key only, otherwise remove>",
})