diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml new file mode 100644 index 0000000..df8017c --- /dev/null +++ b/.github/workflows/build-docs.yml @@ -0,0 +1,29 @@ +name: build-docs +on: + push: + branches: + - master + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Configure Git Credentials + run: | + git config user.name github-actions[bot] + git config user.email 41898282+github-actions[bot]@users.noreply.github.com + - uses: actions/setup-python@v4 + with: + python-version: 3.x + - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV + - uses: actions/cache@v3 + with: + key: mkdocs-material-${{ env.cache_id }} + path: .cache + restore-keys: | + mkdocs-material- + - run: pip install mkdocs-material mkdocstrings + - run: mkdocs gh-deploy --force \ No newline at end of file diff --git a/.github/workflows/black.yml.DISABLED b/.github/workflows/python-black.yml.DISABLED similarity index 100% rename from .github/workflows/black.yml.DISABLED rename to .github/workflows/python-black.yml.DISABLED diff --git a/mkdocs.yml b/mkdocs.yml index eb350b5..ed01c41 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,3 +1,7 @@ +# Some config options here are taken from the docs for Equinox. +# See: https://github.com/patrick-kidger/equinox/blob/main/mkdocs.yml +# for an example of a project with lovely docs =) + site_name: SmartMultiprocessing site_url: https://smartmultiprocessing.org site_author: Emily Hunt @@ -11,28 +15,31 @@ repo_name: smartmultiprocessing theme: name: material features: - - navigation.sections # Sections are included in the navigation on the left. - - toc.integrate # Table of contents is integrated on the left; does not appear separately on the right. - - header.autohide # header disappears as you scroll + - navigation.sections # Sections are included in the navigation on the left. + - toc.integrate # Table of contents is integrated on the left; does not appear separately on the right. + - header.autohide # header disappears as you scroll + - search.suggest # Suggested search + - search.highlight + - search.share palette: # Light mode / dark mode # We deliberately don't automatically use `media` to check a user's preferences. We default to light mode as # (a) it looks more professional, and (b) is more obvious about the fact that it offers a (dark mode) toggle. - scheme: default - primary: white + primary: indigo accent: amber toggle: icon: material/weather-night name: Switch to dark mode - scheme: slate - primary: black + primary: indigo accent: amber toggle: icon: material/weather-sunny name: Switch to light mode icon: repo: fontawesome/brands/github # GitHub logo in top right - logo: "material/circle-opacity" # Equinox logo in top left + logo: "material/lightbulb-outline" favicon: "_static/favicon.png" markdown_extensions: @@ -45,4 +52,22 @@ markdown_extensions: - admonition - toc: permalink: "ยค" # Adds a clickable permalink to each section heading - toc_depth: 4 \ No newline at end of file + toc_depth: 4 + +plugins: + - search # default search plugin; needs manually re-enabling when using any other plugins + - autorefs # Cross-links to headings + - mkdocstrings: + handlers: + python: + selection: + inherited_members: true # Allow looking up inherited methods + rendering: + show_root_heading: true # actually display anything at all... + show_root_full_path: true # display "diffrax.asdf" not just "asdf" + show_if_no_docstring: true + show_signature_annotations: true + show_source: false # don't include source code + members_order: source # order methods according to their order of definition in the source code, not alphabetical order + heading_level: 4 + # - privacy # Not installed error??? \ No newline at end of file