Skip to content

Commit 6f873eb

Browse files
Restructure docs navigation (#110)
* add old version warnings to older docs pages Signed-off-by: Grace Grimwood <[email protected]> * adjust stylings of default layout and dropdown nav to avoid whitespace at bottom of short pages etc Signed-off-by: Grace Grimwood <[email protected]> * add subsections to docs nav dropdown. will need to add this to release pipeline scripts also. Signed-off-by: Grace Grimwood <[email protected]> --------- Signed-off-by: Grace Grimwood <[email protected]>
1 parent 8ae3aaf commit 6f873eb

File tree

7 files changed

+29
-1
lines changed

7 files changed

+29
-1
lines changed

_data/kroxylicious.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ versions:
33
url: '/kroxylicious'
44
- title: 'v0.11.0'
55
url: '/docs/v0.11.0/'
6+
subsections:
7+
- title: 'Proxy Guide'
8+
url: '/docs/v0.11.0/kroxylicious-proxy/'
69
- title: 'v0.10.0'
710
url: '/docs/v0.10.0/'
811
- title: 'v0.9.0'

_includes/nav.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,29 @@
4747
<a class="nav-link dropdown-toggle krx-nav-link py-2 px-0 px-lg-4" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">Docs</a>
4848
<ul class="dropdown-menu">
4949
{% for version in site.data.kroxylicious.versions %}
50+
{% if version.subsections %}
51+
<li><hr class="dropdown-divider"></li>
52+
<li><h6 class="dropdown-header">{{ version.title }}</h6></li>
53+
{% endif %}
5054
<li>
5155
<a class="dropdown-item {% if page.url == version.url %}active{% endif %} krx-nav-link py-2 px-0 px-lg-4" href="{{ version.url }}">
56+
{% if version.subsections %}
57+
Index
58+
{% else %}
5259
{{ version.title }}
60+
{% endif %}
5361
</a>
5462
</li>
63+
{% if version.subsections %}
64+
{% for subsection in version.subsections %}
65+
<li>
66+
<a class="dropdown-item {% if page.url == subsection.url %}active{% endif %} krx-nav-link py-2 px-0 px-lg-4" href="{{ subsection.url }}">
67+
{{ subsection.title }}
68+
</a>
69+
</li>
70+
{% endfor %}
71+
<li><hr class="dropdown-divider"></li>
72+
{% endif %}
5573
{% endfor %}
5674
</ul>
5775
</li>

_layouts/default.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.3.2/js/bootstrap.bundle.min.js" integrity="sha512-X/YkDZyjTf4wyc2Vy16YGCPHwAY8rZJY+POgokZjQB2mhIRFJCckEGc6YyX9eNsPfn0PzThEuNs+uaomE5CO6A==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
1111
{% seo %}
1212
</head>
13-
<body class="d-flex flex-column" data-bs-theme="light">
13+
<body class="d-flex flex-column min-vh-100" data-bs-theme="light">
1414
{% include nav.html %}
1515
<div class="container-fluid px-0 krx-content" data-bs-theme="light">
1616
{{ content }}

_sass/kroxylicious.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ a {
4242
color: $kroxy-dark-green;
4343
}
4444

45+
.nav-item > .dropdown-menu {
46+
min-width: 200px;
47+
}
48+
4549
.krx-content * {
4650
scroll-margin-top: 5rem!important;
4751
}

docs/v0.10.0/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Kroxylicious Proxy v0.10.0
3+
version_warning: <em>This documentation is for an older release of Kroxylicious, and may not reflect current functionality.</em>
34
---
45

56
include::_files/index.adoc[leveloffset=0]

docs/v0.8.0/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Kroxylicious Proxy v0.8.0
3+
version_warning: <em>This documentation is for an older release of Kroxylicious, and may not reflect current functionality.</em>
34
---
45

56
include::_files/index.adoc[leveloffset=0]

docs/v0.9.0/index.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Kroxylicious Proxy v0.9.0
3+
version_warning: <em>This documentation is for an older release of Kroxylicious, and may not reflect current functionality.</em>
34
---
45

56
include::_files/index.adoc[leveloffset=0]

0 commit comments

Comments
 (0)