Skip to content

Commit

Permalink
docs: permalinks to headings (#383)
Browse files Browse the repository at this point in the history
### Summary of Changes

Add button to the right of headings to navigate to a permalink that
points exactly to that heading.
  • Loading branch information
lars-reimann authored Jan 27, 2023
1 parent 9cda04b commit 45e3d1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
EXTENDS: https://raw.githubusercontent.com/lars-reimann/.github/main/.mega-linter.yml

# Config
FILTER_REGEX_EXCLUDE: (\.github/workflows/|DSL/com\.larsreimann\.safeds/src/test/resources/)
FILTER_REGEX_EXCLUDE: (\.github/workflows/|DSL/com\.larsreimann\.safeds/src/test/resources/|mkdocs.yml)

# Workaround to also run prettier on other supported file types. We deactivate it for Markdown compared to the extended
# configuration since it breaks admonitions of Material for MkDocs.
Expand Down
14 changes: 9 additions & 5 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,9 @@ markdown_extensions:
custom_fences:
- name: mermaid
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format # Footnotes

format: !!python/name:pymdownx.superfences.fence_code_format

# Footnotes
- footnotes

# Keys
Expand All @@ -135,9 +135,9 @@ markdown_extensions:
# Icons & emojis
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg # Images

emoji_generator: !!python/name:materialx.emoji.to_svg

# Images
- attr_list
- md_in_html

Expand All @@ -150,7 +150,11 @@ markdown_extensions:
- pymdownx.arithmatex:
generic: true

# Permalinks
- toc:
permalink: "#"

extra_javascript:
- javascripts/mathjax.js
- javascript/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js

0 comments on commit 45e3d1f

Please sign in to comment.