From 9a82bcbc89e6ab4dc172f471a8a13b79cfb1bff2 Mon Sep 17 00:00:00 2001 From: Vivek Verma Date: Tue, 3 Sep 2024 16:28:56 -0500 Subject: [PATCH] Adding mkdocs --- .github/workflows/docs.yml | 23 +++++++++++ docs_requirements.txt | 15 +++++++ mkdocs.yml | 83 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 .github/workflows/docs.yml create mode 100644 docs_requirements.txt create mode 100644 mkdocs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..dd77f6c --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,23 @@ +name: Publish documents +on: + push: + branches: + -data_model +jobs: + build: + name: Deploy docs to GitHub Pages + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Build + uses: Tiryoh/actions-mkdocs@v0 + with: + mkdocs_version: 'latest' + requirements: 'docs_requirements.txt' + configfile: 'mkdocs.yml' + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./site diff --git a/docs_requirements.txt b/docs_requirements.txt new file mode 100644 index 0000000..83779ff --- /dev/null +++ b/docs_requirements.txt @@ -0,0 +1,15 @@ +fontawesome_markdown +json5 +jsonschema +Markdown +markdown-it-py +mike +mkdocs +mkdocs-autorefs +mkdocs-awesome-pages-plugin +mkdocs-jupyter +mkdocs-material +mkdocs-material-extensions +mkdocstrings +mkdocstrings-python +mkdocs-table-reader-plugin diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 0000000..4f9f844 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,83 @@ +site_name: "SANDAG Rapid Strategic Model" +site_url: https://sandag.github.io/rsm +repo_url: https://github.com/SANDAG/RSM + +use_directory_urls: false + +theme: + name: material + features: + - navigation.tabs + - content.code.annotate + - content.tabs.link + - navigation.indexes + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: deep purple + accent: deep orange + toggle: + icon: material/toggle-switch-off-outline + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: deep purple + accent: grey + toggle: + icon: material/toggle-switch + name: Switch to light mode + +plugins: + - autorefs + - mike + - mkdocs-jupyter: + include_source: True + - mkdocstrings: + default_handler: python + enable_inventory: true + handlers: + rendering: + show_root_heading: false + show_source: true + heading_level: 3 + custom_templates: templates + - search + - table-reader + +nav: + - Home: index.md + - Development: development.md + - Assessment: assessment.md + - User Guide: userguide.md + - Visualizer: visualizer.md + - API: api.md + +extra: + version: + provider: mike + default: latest + +extra_css: + - https://use.fontawesome.com/releases/v5.13.0/css/all.css + +markdown_extensions: + - admonition + - codehilite: + linenums: true + - meta + - pymdownx.inlinehilite + - pymdownx.tasklist: + custom_checkbox: true + - pymdownx.tabbed: + alternate_style: true + - pymdownx.smartsymbols + - smarty + - tables + - toc: + # insert a blank space before the character + permalink: " ΒΆ" + - pymdownx.critic + - pymdownx.caret + - pymdownx.keys + - pymdownx.mark + - pymdownx.tilde \ No newline at end of file