From f9837987b817e0665cf17a530e720f5390be237d Mon Sep 17 00:00:00 2001 From: bruhnild Date: Wed, 2 Oct 2024 09:10:18 +0200 Subject: [PATCH] Add material for mkdocs --- docs/customization.md | 11 ++-- docs/index.md | 3 - mkdocs.yml | 146 ++++++++++++++++++++++++++++++++++++++---- 3 files changed, 140 insertions(+), 20 deletions(-) diff --git a/docs/customization.md b/docs/customization.md index 38cf5cfd3..fac70594f 100644 --- a/docs/customization.md +++ b/docs/customization.md @@ -264,9 +264,10 @@ You can find more examples and more details following [this link](https://nextjs ## Simple alerts -> [!WARNING] -> - When setting up Google Analytics, you have to setup a flow. When setting up the flow, be careful to enter the corresponding url (the url of your website), otherwise the data will not be received. -> - By default Google analytics is disabled (`googleAnalyticsId` set to `null`), you will have to override it in the `global.json` file of your customization folder. +!!! warning + + - When setting up Google Analytics, you have to setup a flow. When setting up the flow, be careful to enter the corresponding url (the url of your website), otherwise the data will not be received. + - By default Google analytics is disabled (`googleAnalyticsId` set to `null`), you will have to override it in the `global.json` file of your customization folder. ## Colors @@ -296,9 +297,9 @@ It's also possible to change category colors : } } ``` +!!! note -> [!NOTE] -> If global config `groupTreksAndOutdoorFilters` is set to `true`, the `outdoor` color is ignored in favor of the `trek` color. + If global config `groupTreksAndOutdoorFilters` is set to `true`, the `outdoor` color is ignored in favor of the `trek` color. ## CSS diff --git a/docs/index.md b/docs/index.md index 558bc21c7..ef638356d 100644 --- a/docs/index.md +++ b/docs/index.md @@ -42,6 +42,3 @@ Read more in the [general presentation](./presentation-fr.md). - Follow the [development](./development.md) docs - Head to [localhost:3000](http://localhost:3000) -:::warning -This is a warning -::: diff --git a/mkdocs.yml b/mkdocs.yml index b2ddf8c53..302e6c930 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -1,21 +1,143 @@ +# Project information site_name: Geotrek-rando v3 documentation site_url: https://geotrek-rando-v3.readthedocs.io/latest/ site_description: Geotrek-rando v3 documentation site_author: Geotrek's community -repo_url: https://github.com/GeotrekCE/Geotrek-rando-v3/ edit_uri: blob/main/docs/ + +# Repository +repo_name: GeotrekCE/Geotrek-rando-v3/ +repo_url: https://github.com/GeotrekCE/Geotrek-rando-v3/ + +# Configuration theme: - name: readthedocs - logo : img/logo.svg - color_mode: auto - user_color_mode_toggle: true - locale: en - include_homepage_in_sidebar: false - hljs_languages: - - yaml - - markdown - - javascript - - typescript + name: material + features: + - navigation.footer + - announce.dismiss + - content.action.edit + - content.action.view + - content.code.annotate + - content.code.copy + - content.tabs.link + - content.tooltips + - header.autohide + - navigation.expand + - navigation.indexes + - navigation.sections + - navigation.tabs + - navigation.tabs.sticky + - navigation.top + - navigation.tracking + - search.highlight + - search.share + - search.suggest + - toc.follow + # - toc.integrate + palette: + # Automatic mode + - media: "(prefers-color-scheme)" + toggle: + icon: material/brightness-auto + name: Switch to light mode + # Dark Mode + - scheme: slate + toggle: + icon: material/weather-sunny + name: Dark mode + primary: green + accent: deep purple + + # Light Mode + - scheme: default + toggle: + icon: material/weather-night + name: Light mode + primary: blue + accent: deep orange + font: + text: Roboto + code: Roboto Mono + favicon: img/favicon.ico + logo: img/logo.svg + icon: + icon: + admonition: + note: octicons/tag-16 + abstract: octicons/checklist-16 + info: octicons/info-16 + tip: octicons/squirrel-16 + success: octicons/check-16 + question: octicons/question-16 + warning: octicons/alert-16 + failure: octicons/x-circle-16 + danger: octicons/zap-16 + bug: octicons/bug-16 + example: octicons/beaker-16 + quote: octicons/quote-16 + +# Additional configuration +extra: + status: + new: Recently added + deprecated: Deprecated + social: + - icon: fontawesome/brands/github + link: https://github.com/GeotrekCE/Geotrek-rando-v3/ + - icon: fontawesome/brands/linkedin + link: https://www.linkedin.com/company/geotrek-application + +# Extensions +markdown_extensions: + - abbr + - admonition + - attr_list + - def_list + - footnotes + - md_in_html + - toc: + permalink: true + - pymdownx.emoji: + emoji_generator: !!python/name:material.extensions.emoji.to_svg + emoji_index: !!python/name:material.extensions.emoji.twemoji + - pymdownx.highlight: + anchor_linenums: true + line_spans: __span + pygments_lang_class: true + - pymdownx.inlinehilite + - pymdownx.snippets: + auto_append: + - includes/mkdocs.md + - pymdownx.details + - pymdownx.superfences: + custom_fences: + - name: mermaid + class: mermaid + format: !!python/name:pymdownx.superfences.fence_code_format + - pymdownx.tabbed: + alternate_style: true + combine_header_slug: true + slugify: !!python/object/apply:pymdownx.slugs.slugify + kwds: + case: lower + # - pymdownx.arithmatex: + # generic: true + # - pymdownx.betterem: + # smart_enable: all + # - pymdownx.caret + # - pymdownx.keys + # - pymdownx.magiclink: + # normalize_issue_symbols: true + # repo_url_shorthand: true + # user: squidfunk + # repo: mkdocs-material + # - pymdownx.mark + # - pymdownx.smartsymbols + # - pymdownx.tasklist: + # custom_checkbox: true + # - pymdownx.tilde + +# Page tree nav: - Home: index.md - 💡 Introduction: