Skip to content

Commit 0a0c03b

Browse files
committed
mkdocs: Use symlink alias types
Using symlinks allow deep linking into a particular version of the documentation. Signed-off-by: Leandro Lucarella <[email protected]>
1 parent 9cea866 commit 0a0c03b

File tree

8 files changed

+12
-6
lines changed

8 files changed

+12
-6
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
- The generated docs now show the symbol type in the table of contents.
4343
- The dependecies were updated to the latest versions.
4444
- Disabled some `pylint` checks that are already checked by other tools.
45+
- The generated documentation now uses symlinks for aliases, which allows deep linking when using aliases too.
4546

4647
## Bug Fixes
4748

cookiecutter/migrate.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,5 +89,10 @@ sed -i -e '/ "unsubscriptable-object",/a \ # Checked by mypy\
8989
-e '/ "line-too-long",/a \ "missing-function-docstring",' \
9090
pyproject.toml
9191

92+
echo "========================================================================"
93+
94+
echo "Using symlink aliases in 'mkdocs.yml'"
95+
sed -i "s|alias_type: redirect|alias_type: symlink|" mkdocs.yml
96+
9297
# Add a separation line like this one after each migration step.
9398
echo "========================================================================"

cookiecutter/{{cookiecutter.github_repo_name}}/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ plugins:
9797
- literate-nav:
9898
nav_file: SUMMARY.md
9999
- mike:
100-
alias_type: redirect
100+
alias_type: symlink
101101
canonical_version: latest
102102
- mkdocstrings:
103103
default_handler: python

tests_golden/integration/test_cookiecutter_generation/actor/frequenz-actor-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ plugins:
9797
- literate-nav:
9898
nav_file: SUMMARY.md
9999
- mike:
100-
alias_type: redirect
100+
alias_type: symlink
101101
canonical_version: latest
102102
- mkdocstrings:
103103
default_handler: python

tests_golden/integration/test_cookiecutter_generation/api/frequenz-api-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ plugins:
9797
- literate-nav:
9898
nav_file: SUMMARY.md
9999
- mike:
100-
alias_type: redirect
100+
alias_type: symlink
101101
canonical_version: latest
102102
- mkdocstrings:
103103
default_handler: python

tests_golden/integration/test_cookiecutter_generation/app/frequenz-app-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ plugins:
9797
- literate-nav:
9898
nav_file: SUMMARY.md
9999
- mike:
100-
alias_type: redirect
100+
alias_type: symlink
101101
canonical_version: latest
102102
- mkdocstrings:
103103
default_handler: python

tests_golden/integration/test_cookiecutter_generation/lib/frequenz-test-python/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ plugins:
9797
- literate-nav:
9898
nav_file: SUMMARY.md
9999
- mike:
100-
alias_type: redirect
100+
alias_type: symlink
101101
canonical_version: latest
102102
- mkdocstrings:
103103
default_handler: python

tests_golden/integration/test_cookiecutter_generation/model/frequenz-model-test/mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ plugins:
9797
- literate-nav:
9898
nav_file: SUMMARY.md
9999
- mike:
100-
alias_type: redirect
100+
alias_type: symlink
101101
canonical_version: latest
102102
- mkdocstrings:
103103
default_handler: python

0 commit comments

Comments
 (0)