Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 0 additions & 109 deletions .github/workflows/staging.yml

This file was deleted.

11 changes: 5 additions & 6 deletions GETTING_STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,16 +156,15 @@ This cleans, build docGen, makes sure all the files are available in `avd-repo`,

### Running Locally

the [README.md](README.md) has a section on using `nginx` to host locally, I didn't find that much fun to use - good luck if you choose to.

I find the easiest and most reliable (assuming you have `python3` installed) way is
The easiest and most reliable way to serve the site locally (assuming you have python3 installed) is to use the Makefile target:

```bash
cd avd-repo/docs
python3 -m http.server
make serve
```

This will make the whole site available locally at `http://localhost:8000`
This will start a local HTTP server and make the entire site available at http://localhost:9011.

Simply open that URL in your browser to browse the site locally. Press Ctrl+C in the terminal to stop the server.

You are unlikely to need to be using search locally, but if you are, the next section should work out for you!!

Expand Down
30 changes: 9 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
PY_PORT ?= 9011

md-update-deps:
cd docGen && go get github.com/aquasecurity/defsec \
&& go mod tidy

md-build:
cd docGen && go build -o ../generator .
cd docGen && CGO_ENABLED=0 go build -o ../generator .

md-test:
cd docGen && go test -v ./...
Expand Down Expand Up @@ -49,23 +51,14 @@ remove-all-repos:
rm -rf avd-repo/cloudsploit-repo

sync-all:
rsync -av ./ avd-repo/ --exclude=.idea --exclude=go.mod --exclude=go.sum --exclude=nginx.conf --exclude=main.go --exclude=main_test.go --exclude=README.md --exclude=avd-repo --exclude=.git --exclude=.gitignore --exclude=.github --exclude=content --exclude=docs --exclude=Makefile --exclude=goldens
rsync -av ./ avd-repo/ --exclude=.idea --exclude=go.mod --exclude=go.sum --exclude=main.go --exclude=main_test.go --exclude=README.md --exclude=avd-repo --exclude=.git --exclude=.gitignore --exclude=.github --exclude=content --exclude=docs --exclude=Makefile --exclude=goldens

md-generate:
cd avd-repo && ./generator

nginx-start:
-cd avd-repo/docs && nginx -p . -c ../../nginx.conf

nginx-stop:
@if pgrep nginx > /dev/null; then \
cd avd-repo/docs && nginx -s stop -p . -c ../../nginx.conf; \
else \
echo "Nginx is not running."; \
fi

nginx-restart:
make nginx-stop nginx-start
serve:
@echo "Serving static site at http://localhost:${PY_PORT}"
@cd avd-repo/docs && python3 -m http.server ${PY_PORT}

hugo-devel:
hugo server -D --debug
Expand All @@ -77,18 +70,13 @@ hugo-generate: hugo-clean
cd avd-repo && ./ci/nvd_pages_build.sh
echo "avd.aquasec.com" > avd-repo/docs/CNAME

simple-host:
cd avd-repo/docs && python3 -m http.server

copy-assets:
cp -R avd-repo/remediations-repo/resources avd-repo/docs/resources
touch avd-repo/docs/.nojekyll

build-all-no-clone: md-clean md-build sync-all md-generate hugo-generate copy-assets nginx-restart
echo "Build Done, navigate to http://localhost:9011/ to browse"
build-all-no-clone: md-clean md-build sync-all md-generate hugo-generate copy-assets serve

build-all: md-clean md-build md-clone-all sync-all md-generate hugo-generate copy-assets nginx-restart
echo "Build Done, navigate to http://localhost:9011/ to browse"
build-all: md-clean md-build md-clone-all sync-all md-generate hugo-generate copy-assets serve

compile-theme-sass:
cd themes/aquablank/static/sass && sass avdblank.scss:../css/avdblank.css && sass avdblank.scss:../css/avdblank.min.css --style compressed
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Note: Set `baseURL="/"` [here](https://github.com/aquasecurity/avd-generator/blo
`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`
`make md-clean md-build sync-all md-generate hugo-generate serve`
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:
Expand Down
6 changes: 5 additions & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,8 @@ pygmentsCodefences = true
[markup.goldmark]
[markup.goldmark.renderHooks]
[markup.goldmark.renderHooks.link]
enableDefault = false
enableDefault = false


[minify]
minifyOutput = true
Loading
Loading