Skip to content

DRAFT: Docs Restructure Part 2 #115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions _data/kroxylicious.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
versions:
- title: 'Development'
url: '/kroxylicious'
development: true
- title: 'v0.11.0'
url: '/docs/v0.11.0/'
subsections:
Expand All @@ -10,6 +11,10 @@ versions:
url: '/docs/v0.10.0/'
- title: 'v0.9.0'
url: '/docs/v0.9.0/'
- title: 'Archive'
url: '/docs/archive/'
archive: true
older_versions:
- title: 'v0.8.0'
url: '/docs/v0.8.0/'
- title: 'v0.7.0'
Expand Down
14 changes: 12 additions & 2 deletions _includes/nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,17 @@
<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>
<ul class="dropdown-menu">
{% for version in site.data.kroxylicious.versions %}
{% if version.subsections %}
{% if version.subsections or version.archive %}
<li><hr class="dropdown-divider"></li>
<li><h6 class="dropdown-header">{{ version.title }}</h6></li>
<li>
<h6 class="dropdown-header">
{% if version.subsections %}
{{ version.title }}
{% else %}
For all older versions:
{% endif %}
</h6>
</li>
{% endif %}
<li>
<a class="dropdown-item {% if page.url == version.url %}active{% endif %} krx-nav-link py-2 px-0 px-lg-4" href="{{ version.url }}">
Expand All @@ -68,7 +76,9 @@
</a>
</li>
{% endfor %}
{% unless version.archive %}
<li><hr class="dropdown-divider"></li>
{% endunless %}
{% endif %}
{% endfor %}
</ul>
Expand Down
9 changes: 8 additions & 1 deletion _layouts/docs.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@ <h1 class="card-title fs-3">
{{ page.title }}
</h1>
<div class="card-text g-0">
{% if page.is_archive %}
{% capture blurb %}
{% include_relative blurb.markdown %}
{% endcapture %}
{{ blurb | markdownify }}
{% else %}
<p><em>This documentation is for a stable release version of Kroxylicious. For the documentation from the latest development version of Kroxylicious, <a href="{{ '/kroxylicious' | relative_url }}">click here</a>.</small></em></p>
{{ page.document | tocify_asciidoc }}
{% endif %}
</div>
</div>
</div>
Expand All @@ -23,7 +30,7 @@ <h1 class="card-title fs-3">
<div class="col-auto">
<div class="card-text ms-3 m-2">
{% if page.version_warning %}
{% include bs-alert.html type="warning" content=page.version_warning %}
{% include bs-alert.html type="warning" icon="exclamation-triangle-fill" content=page.version_warning %}
{% endif %}
{{ content }}
</div>
Expand Down
8 changes: 8 additions & 0 deletions docs/archive/blurb.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{% assign latest_release_version = site.data.kroxylicious.versions | where: "development", nil | first %}
{% assign last_unarchived_version = site.data.kroxylicious.versions | where: "archive", nil | last %}

Documentation for all versions of Kroxylicious prior to {{ last_unarchived_version.title }} can be found here.

The documentation linked here is for older releases of Kroxylicious, and may not reflect current functionality.

The Kroxylicious project recommends using the latest stable release to ensure you stay up-to-date with the latest features and bugfixes. The latest release version of Kroxylicious is {{ latest_release_version.title }}, you can find the documentation for this latest stable release [here]({{ latest_release_version.url | absolute_url }}).
29 changes: 29 additions & 0 deletions docs/archive/index.markdown
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
layout: docs
title: Kroxylicious Documentation Archive
permalink: /docs/archive/
is_archive: true
---
{% assign earliest_documented_version = site.data.kroxylicious.older_versions | last %}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing versions? Or is this just a belt and braces fix?

{% capture earliest_docs_info %}
Please note this is the earliest Kroxylicious release documentation available on our website. Documentation sources for all versions, including those prior to {{ earliest_documented_version.title }}, are available from the Kroxylicious GitHub repository under their respective [release tags](https://github.com/kroxylicious/kroxylicious/releases).
{% endcapture %}

## Archived Release Documentation

{% for version in site.data.kroxylicious.older_versions %}
### Kroxylicious Proxy {{ version.title }}
{% if version.title == earliest_documented_version.title %}
{% include bs-alert.html type="info" icon="info-circle-fill" content=earliest_docs_info %}
{% endif %}
{% if version.subsections %}
{% for subsection in version.subsections %}
- [{{ subsection.title }}]({{ subsection.url }})
{% endfor %}
{% else %}
- [Documentation]({{ version.url }})
{% endif %}
{% if version.javadoc %}
- [Javadoc]({{ version.javadoc }})
{% endif %}
{% endfor %}