diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 999d000..5850b69 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -39,7 +39,7 @@ jobs: uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs + publish_dir: ./publish # this puts the docs for this tag under gh-pages:/rc// destination_dir: rc/${{ github.event.release.tag_name }} @@ -48,4 +48,4 @@ jobs: uses: peaceiris/actions-gh-pages@v4 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./docs + publish_dir: ./publish diff --git a/.gitignore b/.gitignore index e061bf7..a35dc10 100644 --- a/.gitignore +++ b/.gitignore @@ -8,4 +8,4 @@ __pycache__/ .vscode/ tests/__pycache__/ dist/ -docs/ +publish/ diff --git a/Makefile b/Makefile index 87024ef..833c240 100644 --- a/Makefile +++ b/Makefile @@ -23,7 +23,13 @@ fmt: install dev # run code formatter uv run ruff format kratix_sdk tests generate-docs: install dev # create API documentation - uv run pdoc src/kratix_sdk -o docs + VERSION=$(shell python3 -c 'import json; print(*json.load(open(".release-please-manifest.json")).values(), end="")') \ + uv run pdoc src/kratix_sdk \ + --output-directory publish \ + --template-directory docs/templates \ + --logo logo.svg \ + --favicon favicon.ico + cp -r docs/assets/* publish/ build-and-load-configure-image: # build example docker image and load it into kind docker buildx build --builder kratix-image-builder --load --platform linux/arm64 \ diff --git a/docs/assets/favicon.ico b/docs/assets/favicon.ico new file mode 100644 index 0000000..32c3698 Binary files /dev/null and b/docs/assets/favicon.ico differ diff --git a/docs/assets/logo.svg b/docs/assets/logo.svg new file mode 100644 index 0000000..96c5a6a --- /dev/null +++ b/docs/assets/logo.svg @@ -0,0 +1,3 @@ + + + diff --git a/docs/templates/module.html.jinja2 b/docs/templates/module.html.jinja2 new file mode 100644 index 0000000..364a5a4 --- /dev/null +++ b/docs/templates/module.html.jinja2 @@ -0,0 +1,7 @@ +{% extends "default/module.html.jinja2" %} +{% block nav_footer %} + +{% endblock %} +{% block module_info %} +

{{ module.modulename }} v{{ env["VERSION"] | default("dev") }}

+{% endblock %} \ No newline at end of file