Closed jessenjonas closed 1 year ago
Hi,
you made en error in the yaml syntax. The plugins:
section is on the theme:
level (same for markdown_extensions:
), but they need to be on the root (with no white spaces in front). This way the plugins won't get called.
With all the benefits of yaml, at least one downside remains: bad visibility of white spaces. As a rule of thumb: use at least four white spaces for indention. Also, some text editors allow you to display the white spaces, this might also help the visibility.
This works:
site_name: My Docs
theme:
name: material
locale: en
favicon: assets/images/Logo_Square_Thick.svg
logo: assets/images/Logo_Square_Thick_White.svg
palette:
# Palette toggle for light mode
- media: "(prefers-color-scheme: light)"
scheme: default
toggle:
icon: material/toggle-switch-off-outline
name: Switch to dark mode
# Palette toggle for dark mode
- media: "(prefers-color-scheme: dark)"
scheme: slate
toggle:
icon: material/toggle-switch
name: Switch to light mode
features:
- navigation.instant
- navigation.tracking
- navigation.tabs
- navigation.path
- toc.follow
- toc.integrate
- navigation.top
- search.suggest
- search.highlight
- search.share
markdown_extensions:
- abbr
- admonition
- def_list
- footnotes
- tables
- pymdownx.details
- pymdownx.caret
- pymdownx.tilde
- pymdownx.mark
plugins:
#- social:
- search:
lang: en
#- tags:
# tags_file: tags.md
- encryptcontent: {}
extra_css:
#- assets/customization/css/custom.css
Hi,
you made en error in the yaml syntax. The
plugins:
section is on thetheme:
level (same formarkdown_extensions:
), but they need to be on the root (with no white spaces in front). This way the plugins won't get called.With all the benefits of yaml, at least one downside remains: bad visibility of white spaces. As a rule of thumb: use at least four white spaces for indention. Also, some text editors allow you to display the white spaces, this might also help the visibility.
This works:
site_name: My Docs theme: name: material locale: en favicon: assets/images/Logo_Square_Thick.svg logo: assets/images/Logo_Square_Thick_White.svg palette: # Palette toggle for light mode - media: "(prefers-color-scheme: light)" scheme: default toggle: icon: material/toggle-switch-off-outline name: Switch to dark mode # Palette toggle for dark mode - media: "(prefers-color-scheme: dark)" scheme: slate toggle: icon: material/toggle-switch name: Switch to light mode features: - navigation.instant - navigation.tracking - navigation.tabs - navigation.path - toc.follow - toc.integrate - navigation.top - search.suggest - search.highlight - search.share markdown_extensions: - abbr - admonition - def_list - footnotes - tables - pymdownx.details - pymdownx.caret - pymdownx.tilde - pymdownx.mark plugins: #- social: - search: lang: en #- tags: # tags_file: tags.md - encryptcontent: {} extra_css: #- assets/customization/css/custom.css
That works! I don't know how I missed that! Thanks!
I am unable to get the plugin to work, at all. Neither locally on my device wiht MKdocs serve, or on github pages. No error given either.
installed using:
pip install mkdocs-encryptcontent-plugin
Material Mkdocs : 9.1.21 Mkdocs : 1.5.2 Plugin: 2.5.3
My configuration :
My testing file :
Not being shown that the page is locked and i need to paste password to login.