Skip to content

Commit 4b18ad5

Browse files
authored
Merge pull request Azure#52 from Azure/nav-customisation
chore: Customize nav
2 parents 6ee8305 + e896331 commit 4b18ad5

2 files changed

Lines changed: 49 additions & 1 deletion

File tree

.github/workflows/preview-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
echo "SOURCE_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
3535
echo "SOURCE_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
3636
- name: Build workshop site
37-
if: github.event.action != "closed"
37+
if: " github.event.action != 'closed' "
3838
run: |
3939
echo "GIT_PYTHON_REFRESH=quiet"
4040
make build-docs-website

docs/overrides/partials/nav.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<!-- Determine class according to configuration -->
2+
<!-- Sourced from https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/nav.html-->
3+
4+
{% set class = "md-nav md-nav--primary" %}
5+
{% if "navigation.tabs" in features %}
6+
{% set class = class ~ " md-nav--lifted" %}
7+
{% endif %}
8+
{% if "toc.integrate" in features %}
9+
{% set class = class ~ " md-nav--integrated" %}
10+
{% endif %}
11+
12+
<!-- Main navigation -->
13+
<nav
14+
class="{{ class }}"
15+
aria-label="{{ lang.t('nav') }}"
16+
data-md-level="0"
17+
>
18+
19+
<!-- Site title -->
20+
<!-- <label class="md-nav__title" for="__drawer">
21+
<a
22+
href="{{ config.extra.homepage | d(nav.homepage.url, true) | url }}"
23+
title="{{ config.site_name | e }}"
24+
class="md-nav__button md-logo"
25+
aria-label="{{ config.site_name }}"
26+
data-md-component="logo"
27+
>
28+
{% include "partials/logo.html" %}
29+
</a>
30+
{{ config.site_name }}
31+
</label>-->
32+
33+
<!-- Repository information -->
34+
{% if config.repo_url %}
35+
<div class="md-nav__source">
36+
{% include "partials/source.html" %}
37+
</div>
38+
{% endif %}
39+
40+
<!-- Render item list -->
41+
<ul class="md-nav__list" data-md-scrollfix>
42+
{% for nav_item in nav %}
43+
{% set path = "__nav_" ~ loop.index %}
44+
{% set level = 1 %}
45+
{% include "partials/nav-item.html" %}
46+
{% endfor %}
47+
</ul>
48+
</nav>

0 commit comments

Comments
 (0)