From ae5c45cdd771662cfe2770b4eb9ccc2c96d6babe Mon Sep 17 00:00:00 2001 From: noelmcloughlin Date: Mon, 19 Aug 2024 00:15:35 +0100 Subject: [PATCH] feat(docs): upgrade mkdocs/mermaid --- .github/workflows/codespell.yml | 3 +++ {{cookiecutter.project_name}}/mkdocs.yml | 27 +++++++++++++++++--- {{cookiecutter.project_name}}/pyproject.toml | 7 ++--- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/.github/workflows/codespell.yml b/.github/workflows/codespell.yml index 3ebbf55..d05ac9a 100644 --- a/.github/workflows/codespell.yml +++ b/.github/workflows/codespell.yml @@ -20,3 +20,6 @@ jobs: uses: actions/checkout@v3 - name: Codespell uses: codespell-project/actions-codespell@v2 + with: + skip: *.js + diff --git a/{{cookiecutter.project_name}}/mkdocs.yml b/{{cookiecutter.project_name}}/mkdocs.yml index 4a01fff..4c31019 100644 --- a/{{cookiecutter.project_name}}/mkdocs.yml +++ b/{{cookiecutter.project_name}}/mkdocs.yml @@ -2,18 +2,37 @@ site_name: "{{cookiecutter.project_name}}" theme: name: material - # palette: - # scheme: slate - # primary: cyan + palette: + # https://github.com/facelessuser/mkdocs_pymdownx_material_extras + scheme: dracula + primary: deep purple + accent: deep purple features: - content.tabs.link + plugins: - search - - mermaid2 + - mermaid2: + # https://mkdocs-mermaid2.readthedocs.io/en/latest/library + version: 10.9.0 + - mkdocs_pymdownx_material_extras + +markdown_extensions: + - pymdownx.superfences: + # make exceptions to highlighting of code + custom_fences: + # activate display of Mermaid diagrams + - name: mermaid + class: mermaid + # https://pypi.org/project/mkdocs-pymdownx-material-extras + # https://mkdocs-mermaid2.readthedocs.io/en/latest/superfences + format: !!python/name:pymdownx.superfences.fence_code_format + nav: # - Home: home.md - Index: index.md - About: about.md + site_url: https://{{cookiecutter.github_org}}.github.io/{{cookiecutter.project_name}} repo_url: https://github.com/{{cookiecutter.github_org}}/{{cookiecutter.project_name}} diff --git a/{{cookiecutter.project_name}}/pyproject.toml b/{{cookiecutter.project_name}}/pyproject.toml index c23ae5f..2099919 100644 --- a/{{cookiecutter.project_name}}/pyproject.toml +++ b/{{cookiecutter.project_name}}/pyproject.toml @@ -18,8 +18,9 @@ style = "pep440" [tool.poetry.dev-dependencies] linkml = "^1.3.5" -mkdocs-material = "^8.2.8" -mkdocs-mermaid2-plugin = "^0.6.0" +mkdocs-material = "^9.5.11" +mkdocs-mermaid2-plugin = "^1.1.1" +mkdocs-pymdownx-material-extras = "^2.5.6" schemasheets = "^0.1.14" [build-system] @@ -27,4 +28,4 @@ requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"] build-backend = "poetry_dynamic_versioning.backend" [tool.poetry.extras] -docs = ["linkml", "mkdocs-material"] \ No newline at end of file +docs = ["linkml", "mkdocs-material"]