diff --git a/.github/workflows/doc-generator.yml b/.github/workflows/doc-generator.yml index 179aa93..ca14f76 100644 --- a/.github/workflows/doc-generator.yml +++ b/.github/workflows/doc-generator.yml @@ -42,7 +42,7 @@ jobs: run: git config --global --add safe.directory /__w/twitch-bot/twitch-bot - name: Generate documentation - run: make render_docs + run: make render_docs DOCS_BASE_URL=https://luzifer.github.io/twitch-bot/ - name: Upload GitHub Pages artifact if: github.ref == 'refs/heads/master' diff --git a/Makefile b/Makefile index 7c82cfd..431df6e 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,4 @@ +DOCS_BASE_URL:=/ HUGO_VERSION:=0.117.0 default: lint frontend_lint test @@ -64,7 +65,11 @@ eventclient_docs: docker run --rm -i -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:18-alpine sh -ec 'npx --yes jsdoc-to-markdown --files ./internal/apimodules/overlays/default/eventclient.js' >>docs/content/overlays/eventclient.md render_docs: hugo_$(HUGO_VERSION) - ./hugo_$(HUGO_VERSION) --cleanDestinationDir --gc --source docs + ./hugo_$(HUGO_VERSION) \ + --baseURL "$(DOCS_BASE_URL)" \ + --cleanDestinationDir \ + --gc \ + --source docs hugo_$(HUGO_VERSION): curl -sSfL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_extended_$(HUGO_VERSION)_linux-amd64.tar.gz | tar -xz hugo