
AVD Generator
Description
This is the page generator component of AVD
Generated Website
https://github.com/aquasecurity/avd
Building
Note: Set baseURL="/"
here before proceeding.
tl;dr for just the UI
make hugo-devel
and then navigate to http://localhost:1313
to view the site.
tl;dr for the full build with real content
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.
To just build markdown pages:
make md-generate
markdowns will be generated in avd-repo/content/
To just build the hugo site:
make hugo-generate
site will be generated in avd-repo/docs/
To have a functional search:
-
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>",
})