thegeeklab / hugo-geekdoc

Hugo theme made for documentation

Home Page:https://geekdocs.de

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature Request: Built-In Versioning/Selector Feature

jtracey93 opened this issue · comments

We are using geekdocs for a site we are building, and it's awesome!

We are now at a stage of our project/initiative that we will have different versions/releases of the guidance of our project/initiative and will require the ability for folks to browse the docs for the version they are concerned with, but also be notified that its not the latest version at the same time.

From looking around, this isn't possible today in the geekdocs theme, but it is in the docsy theme.

We'd really love to stay using geekdocs, any chance this feature could be added?

Update

Did some digging in docsy and think we need to take inspiration from these files:

Thanks a lot for your feedback! Yes, that's a feature that I also wanted to have for a long time. If someone wants to implement it, I'm happy to review. As I'm currently working on other projects, it might take some time to get it implemented on my own.

Thanks @xoxys, I might give it a go over the weekend in my project and if I get it working, ill push it back up in a PR 👍

Hey @xoxys

Could you give me some high level pointers on how to add to the themes CSS?

Sure, the theme is using SASS for stylesheets, the source files are located in https://github.com/thegeeklab/hugo-geekdoc/tree/main/src/sass and most parts of the core theme are located in https://github.com/thegeeklab/hugo-geekdoc/blob/main/src/sass/_base.scss

To compile the sass stylesheets (and other artifacts) we use webpack. To simplify the development process a bit, there are npm scripts available to run a dev server. npm install && npm run start will install all requirements and start a webpack dev server and a Hugo dev server in parallel. After starting the setup, the Hugo server is available at http://localhost:1313/ and changes to the sass files as well as content files will trigger a rebuild and frontend reload automatically.

I hope that helps, if you have further questions just let me know.