imfing / hextra

🔯 Modern, batteries-included Hugo theme for creating beautiful doc, blog and static websites
https://imfing.github.io/hextra/
MIT License
775 stars 180 forks source link

Versioning Menu #224

Open Lachlan-White opened 12 months ago

Lachlan-White commented 12 months ago

Feature Description

When it comes to documentation a feature such as versioning of the content, based on the released version of the product is a core feature menu would like. Whilst this can be done by manually creating folders and copying and altering documentation, the management would become burdensome.

Problem/Solution

New Capability - Managed content based on user-selected version.

Alternatives Considered

Mentioned in description

Additional Context

Existing Themes such as Docsy do this: https://www.docsy.dev/docs/adding-content/versioning/#displaying-a-banner-on-archived-doc-sites

Lachlan-White commented 11 months ago

@imfing any thoughts on how this could be achieved?

imfing commented 11 months ago

Whilst this can be done by manually creating folders and copying and altering documentation, the management would become burdensome.

what's the reason behind copying and altering?

I think a practical approach would be:

  1. similar to github releases, publish the previous versions from Git tags or branches to different sites. For example, v1.docs.your-company.com, v2.docs.your-company.com etc.
  2. within the theme, point to those previous versions either in the navigation bar or in the sidebar.

just like what docsy does: https://www.docsy.dev/docs/adding-content/versioning/#adding-a-version-drop-down-menu

Let me know what your thoughts are

Lachlan-White commented 11 months ago

Agree that could be a good approach, would be nice to have a similar way to navigate between versions of the released documentation site like docsy with a banner on version

imfing commented 11 months ago

@Lachlan-White thanks. I also agree that it's something good to have, especially for software documentation site.

We do have an open incomplete PR #221 that implements the sub-menu support in the navigation bar. It can also be used to include multiple versions of the previous sites.

artberger commented 2 weeks ago

@imfing @Lachlan-White

within the theme, point to those previous versions either in the navigation bar or in the sidebar just like what docsy does: https://www.docsy.dev/docs/adding-content/versioning/#adding-a-version-drop-down-menu

Is there a similar version dropdown in Hextra that is based on version params in the hugo config file? or maybe there is a different way now?