Skip to content
Snippets Groups Projects
Verified Commit 13d981a7 authored by Romain Deville's avatar Romain Deville
Browse files

:wrench: Add configuration files from template

Add/upgrade following files using the mkdocs_template_rdeville:

- .editorconfig
- .yamllint
- mkdocs.yml
- pyproject.toml
parent 0954d2c2
No related branches found
No related tags found
No related merge requests found
...@@ -14,21 +14,17 @@ insert_final_newline = false ...@@ -14,21 +14,17 @@ insert_final_newline = false
trim_trailing_whitespace = true trim_trailing_whitespace = true
# Size of indentation (either tabs or space) # Size of indentation (either tabs or space)
indent_size = 2 indent_size = 2
# Type of indentation (either tabs or space)
indent_style = space
# Maximum length (in number of chars) for a line
max_line_length = 80
# Python specific syntax # Python specific syntax
[*.py] [*.py]
# Type of indentation (either tabs or space)
indent_style = space
# Size of indentation (either tabs or space) # Size of indentation (either tabs or space)
indent_size = 4 indent_size = 4
# Maximum length (in number of chars) for a line
max_line_length = 80
# Yaml specific syntax # Yaml specific syntax
[*.{yaml,yml}] [*.{yaml,yml}]
# Type of indentation (either tabs or space)
indent_style = space
# Size of indentation (either tabs or space)
indent_size = 2
# Maximum length (in number of chars) for a line # Maximum length (in number of chars) for a line
max_line_length = 120 max_line_length = 120
...@@ -34,8 +34,3 @@ rules: ...@@ -34,8 +34,3 @@ rules:
type: unix type: unix
trailing-spaces: disable trailing-spaces: disable
truthy: disable truthy: disable
# *****************************************************************************
# VIM MODELINE
# vim: ft=yaml: fdm=indent:
# *****************************************************************************
...@@ -28,7 +28,7 @@ theme: ...@@ -28,7 +28,7 @@ theme:
# https://squidfunk.github.io/mkdocs-material/ # https://squidfunk.github.io/mkdocs-material/
name: material name: material
# Overriding parent theme configuration # Overriding parent theme configuration
#custom_dir: docs/theme custom_dir: docs/theme
# Determines whether the search plugin expects the theme to provide a # Determines whether the search plugin expects the theme to provide a
# dedicated search page via a template located at search/search.html. # dedicated search page via a template located at search/search.html.
include_search_page: false include_search_page: false
...@@ -44,37 +44,79 @@ theme: ...@@ -44,37 +44,79 @@ theme:
- navigation.tabs - navigation.tabs
- navigation.instant - navigation.instant
- navigation.top - navigation.top
# Setting colors palette # Setting colors palette (these are defined in docs/theme/css/{colors,theme}.css)
palette: palette:
# Light mode # Light mode
- media: "(prefers-color-scheme: light)" - media: "(prefers-color-scheme: light)"
scheme: default scheme: rdeville-light
primary: deep-purple primary: rdeville-green-light
accent: yellow accent: rdeville-orange-light
toggle: toggle:
icon: material/weather-sunny icon: material/weather-night
name: Switch to dark mode name: Switch to dark mode
# Dark mode # Dark mode
- media: "(prefers-color-scheme: dark)" - media: "(prefers-color-scheme: dark)"
scheme: slate scheme: rdeville-dark
primary: deep-purple primary: rdeville-green-dark
accent: yellow accent: rdeville-orange-dark
toggle: toggle:
icon: material/weather-night icon: material/weather-sunny
name: Switch to light mode name: Switch to light mode
# Font configuration for the website # Font configuration for the website (FurCode are provided in
# docs/theme/fonts)
font: false font: false
# text: # text: FuraCode Nerd Font
# code: # code: FuraCode Nerd Font
# Path to logo and icons to use for the website # Path to logo and icons to use for the website
#logo: # Automatically set by mkdocs_macros_plugin (see docs/_data/plugins.py) #logo: # Automatically set by mkdocs_macros_plugin (see docs/_data/plugins.py)
#icon: #icon:
# repo: # Automatically set by mkdocs_macros_plugin (see docs/_data/plugins.py) # repo: # Automatically set by mkdocs_macros_plugin (see docs/_data/plugins.py)
#favicon: # Automatically set by mkdocs_macros_plugin (see docs/_data/plugins.py) #favicon: # Automatically set by mkdocs_macros_plugin (see docs/_data/plugins.py)
# External CSS
# ---------------------------------------------------------------------------
extra_css:
# Define css for lightgallery
# From: https://github.com/g-provost/lightgallery-markdown
- theme/css/lightgallery.css
# Define personal extra css
# Define colors (all materials colors RGB code)
- theme/css/colors.css
# Define fonts
- theme/css/fonts.css
# Define themes
- theme/css/theme.css
# Define css of base markdown extension and pymdown extension
- theme/css/python_markdown_extension.css
# External JS
# ---------------------------------------------------------------------------
extra_javascript:
# Define javascript for lightgallery
# From: https://github.com/g-provost/lightgallery-markdown
- theme/js/lightgallery.js
- theme/js/lg-video.js
# Define javascript for arithmatex (auto downloaded with tools/upgrade_external_dependencies)
# From: https://squidfunk.github.io/mkdocs-material/reference/mathjax/#arithmatex
- theme/js/polyfill.js
- theme/js/es5/tex-chtml.js
# Define javascript to allow table sorting
# From: https://squidfunk.github.io/mkdocs-material/reference/data-tables/#sortable-tables
- theme/js/tablesort.min.js
# Define javascript for mermaid
# From: https://github.com/fralau/mkdocs-mermaid2-plugin#explicit-declaration-of-the-mermaid-library
- theme/js/mermaid.js
# Define javascript for custom pymdown mermaid loader
# From: https://facelessuser.github.io/pymdown-extensions/extras/mermaid/#custom-loader
- theme/js/mermaid-loader.js
# Define personal custom javascript
- theme/js/extra.js
# Extensions # Extensions
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
markdown_extensions: markdown_extensions:
# Allow to include markdown files
# https://github.com/sethen/markdown-include
- markdown_include.include: - markdown_include.include:
base_path: ./ base_path: ./
# Python Markdown Extensions # Python Markdown Extensions
...@@ -94,53 +136,97 @@ markdown_extensions: ...@@ -94,53 +136,97 @@ markdown_extensions:
- markdown.extensions.md_in_html: - markdown.extensions.md_in_html:
# Pymdown Extensions # Pymdown Extensions
# https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/ # https://facelessuser.github.io/pymdown-extensions/extensions/arithmatex/
- pymdownx.extra:
- pymdownx.arithmatex:
generic: true
- pymdownx.betterem: - pymdownx.betterem:
- pymdownx.tabbed: - pymdownx.details:
- pymdownx.superfences: - pymdownx.caret:
preserve_tabs: true - pymdownx.escapeall:
# Make exceptions to highlighting code of following classes: hardbreak: True
custom_fences: nbsp: True
- pymdownx.critic:
- pymdownx.emoji:
emoji_index: !!python/name:pymdownx.emoji.twemoji
emoji_generator: !!python/name:pymdownx.emoji.to_svg
options:
image_path: /assets/twemoji/svg/
custom_icons:
- .icons
- pymdownx.inlinehilite:
custom_inline:
- name: math - name: math
class: arithmatex class: arithmatex
format: !!python/name:pymdownx.arithmatex.fence_mathjax_format format: !!python/name:pymdownx.arithmatex.inline_generic_format
- pymdownx.highlight: - pymdownx.highlight:
linenums: true
linenums_special: 2
linenums_style: pymdownx-inline
guess_lang: false
extend_pygments_lang: extend_pygments_lang:
- name: php-inline
lang: php
options:
startinline: true
- name: pycon3 - name: pycon3
lang: pycon lang: pycon
options: options:
python3: true python3: true
linenums_style: pymdownx-inline - pymdownx.keys:
- pymdownx.inlinehilite: separator: "\uff0b"
custom_inline: - pymdownx.mark:
- pymdownx.magiclink:
repo_url_shortener: true
- pymdownx.progressbar:
- pymdownx.pathconverter:
- pymdownx.smartsymbols:
- pymdownx.snippets:
- pymdownx.striphtml:
- pymdownx.superfences:
preserve_tabs: true
# Make exceptions to highlighting code of following classes:
custom_fences:
- name: math - name: math
class: arithmatex class: arithmatex
format: !!python/name:pymdownx.arithmatex.inline_mathjax_format format: !!python/name:pymdownx.arithmatex.fence_generic_format
- pymdownx.tilde: - name: mermaid
- pymdownx.caret: class: mermaid
- pymdownx.critic: format: !!python/name:pymdownx.superfences.fence_code_format
- pymdownx.smartsymbols: - pymdownx.tabbed:
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
options:
custom_icons:
- .icons
- pymdownx.escapeall:
hardbreak: True
nbsp: True
- pymdownx.tasklist: - pymdownx.tasklist:
custom_checkbox: true custom_checkbox: true
- pymdownx.progressbar: - pymdownx.tilde:
- pymdownx.arithmatex: # Locally installed in docs/theme/plugins/ from original repo
- pymdownx.mark: # https://github.com/g-provost/lightgallery-markdown
- pymdownx.striphtml: - lightgallery:
- pymdownx.keys:
separator: "\uff0b" # Extra Data Information & Customization
- pymdownx.details: # ---------------------------------------------------------------------------
# Dictionary storing social icon that will be shown on the bottom right.
extra:
social:
- icon: fontawesome/solid/globe
link: https://romaindeville.fr
name: R. Deville Wesite
- icon: fontawesome/solid/paper-plane
link: mailto:contact@romaindeville.fr
name: "Send mail to @rdeville"
- icon: fontawesome/solid/book-reader
link: https://docs.romaindeville.fr
name: All Projects Home Documentation
- icon: fontawesome/brands/linkedin
link: https://www.linkedin.com/in/romaindeville
name: "@rdeville on LinkedIn"
- icon: fontawesome/brands/docker
link: https://hub.docker.com/u/rdeville
name: "@rdeville on Docker Hub"
- icon: fontawesome/brands/git-alt
link: https://framagit.org/rdeville.public/
name: "@rdeville on Framagit"
- icon: fontawesome/brands/gitlab
link: https://gitlab.com/rdeville.public/
name: "@rdeville on Gitlab"
- icon: fontawesome/brands/github
link: https://github.com/rdeville-public/
name: "@rdeville on Github"
version:
provider: mike
# Plugins # Plugins
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
...@@ -173,6 +259,12 @@ plugins: ...@@ -173,6 +259,12 @@ plugins:
# This plugin enables you to build multiple sets of documentation in a # This plugin enables you to build multiple sets of documentation in a
# single Mkdocs. # single Mkdocs.
- monorepo: - monorepo:
# A Mermaid graphs plugin for mkdocs
# https://github.com/fralau/mkdocs-mermaid2-plugin#declaring-the-superfences-extension
- mermaid2:
arguments:
theme: |
^(localStorage.getItem('theme') === 'rdeville-dark') ? 'dark' : 'light'
# https://pawamoy.github.io/mkdocstrings/ # https://pawamoy.github.io/mkdocstrings/
# Automatic documentation from sources, for MkDocs. # Automatic documentation from sources, for MkDocs.
- mkdocstrings: - mkdocstrings:
...@@ -182,17 +274,23 @@ plugins: ...@@ -182,17 +274,23 @@ plugins:
rendering: rendering:
show_source: true show_source: true
show_if_no_docstring: true show_if_no_docstring: true
show_root_heading: false
show_root_toc_entry: false
show_root_full_path: true
show_object_full_path: true
show_root_members_full_path: true
show_category_heading: true
show_signature_annotations: false
group_by_category: true
heading_level: 2
setup_commands: setup_commands:
- import sys - import sys
# Others command such as sys.path.append("path") are # Others command such as sys.path.append("path") are
# Automatically added using mkdocs_macros_plugin # Automatically added using mkdocs_macros_plugin
# (see docs/_data/plugins.py) # (see docs/_data/plugins.py)
# DO NOT FORGET TO ADD/UPDATE THE \`nav\` AND \`extra\` KEYS BELOW. # DO NOT FORGET TO ADD/UPDATE THE \`nav\` KEY BELOW.
### END MKDOCS TEMPLATE ### ### END MKDOCS TEMPLATE ###
extra:
version:
provider: mike
# Navigation Pane # Navigation Pane
# --------------------------------------------------------------------------- # ---------------------------------------------------------------------------
nav: nav:
......
...@@ -69,6 +69,7 @@ commands = ...@@ -69,6 +69,7 @@ commands =
-not -path "./python_venv/*" \\) ) ' -not -path "./python_venv/*" \\) ) '
bash -c 'DIRENV_ROOT="$(pwd)" ./tools/generate_source_docs.sh --dry-run' bash -c 'DIRENV_ROOT="$(pwd)" ./tools/generate_source_docs.sh --dry-run'
[testenv:build_doc] [testenv:build_doc]
# Allow external commands # Allow external commands
allowlist_externals= allowlist_externals=
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment