Skip to content

Commit

Permalink
Fix navigation in mkdocs (#6193)
Browse files Browse the repository at this point in the history
* Fix navigation in mkdocs

* Try putting back pin

* Try 1.5

* Put partial back

* Update partial

* Add code comment for pin
  • Loading branch information
weitzman authored Jan 6, 2025
1 parent a861c86 commit ac3240b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ jobs:
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs-material mike mkdocs-git-authors-plugin mkdocs-redirects mkdocs-git-revision-date-localized-plugin pymdown-extensions git+https://gitlab.com/blacs30/mkdocs-edit-url.git
# Later versions of mkdocs giving build error remated to a missing import for 'templates'.
pip install mkdocs==1.5.3 mkdocs-material mike mkdocs-git-authors-plugin mkdocs-redirects mkdocs-git-revision-date-localized-plugin pymdown-extensions git+https://gitlab.com/blacs30/mkdocs-edit-url.git
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
12 changes: 5 additions & 7 deletions docs/overrides/partials/tabs.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
Copyright (c) 2016-2020 Martin Donath <[email protected]>
Copyright (c) 2016-2025 Martin Donath <[email protected]>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
Expand All @@ -20,19 +20,18 @@
IN THE SOFTWARE.
-->

<!-- Hack: unset variable, as we're using it recursively in tabs-item.html -->
{% set class = "" %}
{% import "partials/tabs-item.html" as item with context %}

<!-- Navigation tabs -->
<nav
class="md-tabs"
aria-label="{{ lang.t('tabs.title') }}"
aria-label="{{ lang.t('tabs') }}"
data-md-component="tabs"
>
<div class="md-tabs__inner md-grid">
<div class="md-grid">
<ul class="md-tabs__list">
{% for nav_item in nav %}
{% include "partials/tabs-item.html" %}
{{ item.render(nav_item) }}
{% endfor %}

<!-- MW: Add link built outside of mkdocs -->
Expand All @@ -41,7 +40,6 @@
<a href="/api" class="md-tabs__link">API</a>
</li>
<!-- End Add -->

</ul>
</div>
</nav>

0 comments on commit ac3240b

Please sign in to comment.