avd-generator

module
v0.0.0-...-a9e91e9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2024 License: Apache-2.0

README

Build Website

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:

  1. AVD content must be regenerated (rm -rf content/nvd && mkdir -p content/nvd)
  2. 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/

  1. Run MeiliSearch locally docker run -p 7700:7700 -v $(pwd)/data.ms:/data.ms getmeili/meilisearch

  2. Setup search index curl -X POST 'http://127.0.0.1:7700/indexes' -H 'Content-Type: application/json' --data '{ "uid" : "avd", "primaryKey": "title"}'

  3. Add generated index.json to build search indexes curl -X POST 'http://127.0.0.1:7700/indexes/avd/documents' --data @docs/index.json

  4. To monitor index build progress: curl -X GET 'http://localhost:7700/indexes/avd/updates'

  5. 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>",
 })

Directories

Path Synopsis
goldens

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL