diff --git a/.github/workflows/fetch-and-compile-runtime-docs.yml b/.github/workflows/fetch-and-compile-runtime-docs.yml index 0c8345e..281ff51 100644 --- a/.github/workflows/fetch-and-compile-runtime-docs.yml +++ b/.github/workflows/fetch-and-compile-runtime-docs.yml @@ -40,18 +40,26 @@ jobs: mkdocs-jupyter \ pymdown-extensions # Note: The `mkdocs.yml` file we pull from the `nmdc-runtime` repo sets the overrides directory to `mkdocs_overrides`. - - name: Copy files that override parts of theme - run: cp pullers/runtime_docs/mkdocs_overrides/main.html _clones/microbiomedata/nmdc-runtime/mkdocs_overrides/main.html - # Docs: https://www.mkdocs.org/user-guide/cli/ - # Docs: https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance - # TODO: Make the `site_url` configurable (e.g. via an environment variable). + - name: Copy files that override or customize parts of theme + run: | + cp pullers/runtime_docs/mkdocs_overrides/main.html _clones/microbiomedata/nmdc-runtime/mkdocs_overrides/main.html + cp pullers/runtime_docs/assets/images/favicon.ico _clones/microbiomedata/nmdc-runtime/assets/images/favicon.ico - name: Compile source documents into HTML + # + # References: + # - https://www.mkdocs.org/user-guide/cli/ + # - https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance + # - https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#favicon + # + # TODO: Make the `site_url` configurable (e.g. via an environment variable). + # working-directory: _clones/microbiomedata/nmdc-runtime run: | echo '{ "INHERIT": "mkdocs.yml", "site_dir": "${{ github.workspace }}/_dist", - "site_url": "https://docs.microbiomedata.org/runtime/" + "site_url": "https://docs.microbiomedata.org/runtime/", + "theme": {"favicon": "assets/images/favicon.ico"} }' | mkdocs build -f - # Upload the result as an "artifact" so it can then be downloaded and used by another job. - name: Save the HTML for publishing later # Docs: https://github.com/actions/upload-artifact diff --git a/pullers/runtime_docs/Dockerfile b/pullers/runtime_docs/Dockerfile index 507d2bc..a88e954 100644 --- a/pullers/runtime_docs/Dockerfile +++ b/pullers/runtime_docs/Dockerfile @@ -33,13 +33,21 @@ RUN git clone --no-checkout --depth=1 --single-branch --branch=main --filter=tre # Copy files we can use to override parts of the Material for MkDocs theme. # Note: The `mkdocs.yml` file we pull from the `nmdc-runtime` repo sets the overrides directory to `mkdocs_overrides`. COPY mkdocs_overrides/main.html nmdc-runtime/mkdocs_overrides/main.html +COPY assets/images/favicon.ico nmdc-runtime/docs/assets/images/favicon.ico # Compile source documents into HTML. +# +# References: +# - https://www.mkdocs.org/user-guide/cli/ +# - https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance +# - https://squidfunk.github.io/mkdocs-material/setup/changing-the-logo-and-icons/#favicon +# RUN cd nmdc-runtime && \ echo '{\ "INHERIT": "mkdocs.yml",\ "site_dir": "/html",\ - "site_url": "http://localhost:8000/"\ + "site_url": "http://localhost:8000/",\ + "theme": {"favicon": "assets/images/favicon.ico"}\ }' | mkdocs build -f - EXPOSE 8000 diff --git a/pullers/runtime_docs/assets/images/favicon.ico b/pullers/runtime_docs/assets/images/favicon.ico new file mode 100644 index 0000000..dff6056 Binary files /dev/null and b/pullers/runtime_docs/assets/images/favicon.ico differ