openebs-archive / openebs-docs

OpenEBS Documentation
https://docs.openebs.io
Apache License 2.0
37 stars 137 forks source link

Maintain docs version using json file #313

Closed qiell closed 5 years ago

qiell commented 5 years ago

Currently, the version is hardcoded in the docusaurus code. Whenever we release a new version, we need to add it in the code. https://github.com/openebs/openebs-docs/blob/80566bf9b4a00bd8ed2cde21fffce9b82c7ec48c/website/node_modules/docusaurus/lib/core/nav/HeaderNav.js#L242

Instead of this, we need to maintain a version.json file which will have all the versions and their links. (Similar to sidebars.json file)

Implement logic to fetch version from version.json file and show in the dropdown menu.

Whenever we release a new version, we need to update the version.json file.

swatisingh45 commented 5 years ago

Hey! I would love to take up the issue. Please assign this to me.

qiell commented 5 years ago

@swatisingh45 Please go ahead

swatisingh45 commented 5 years ago

Hey! So you want a json version of this version.json, right? Where to do that?

qiell commented 5 years ago

@swatisingh45 In the website directory, you can find sidebars.json, we can have the version.json in the same directory.

qiell commented 5 years ago

We do not want only the JSON file, but also the implementation to fetch the version drop-down content using that JSON file.

mathagician commented 5 years ago

Hello, if not done I would like to take it up.

qiell commented 5 years ago

Hi @mathagician, @swatisingh45 didn't respond yet. If you want to pick it up, please go ahead.

sudonitesh commented 5 years ago

is someone working on this or I can take it?

qiell commented 5 years ago

@mathagician are you working on this?

sudonitesh commented 5 years ago

@Akash4927 any update?

qiell commented 5 years ago

@sudonitesh I think you can work on this and don't forget to join hacktoberfest2018 channel on our slack workspace.

Rishabh570 commented 5 years ago

@Akash4927 I would like to work on this

qiell commented 5 years ago

@Rishabh570 Please go ahead.

Rishabh570 commented 5 years ago

@Akash4927 Okay, so far what I've understood is, we need to write the version in the versions.json and then extract its value (through some js method call to ./versions.json) and use it wherever needed, like in the headerNav...so we don't have to manually change its value from the file, just updating versions.json would suffice. Have I made a mistake in understanding this?

qiell commented 5 years ago

@Rishabh570 Great! You understood it correctly. Please feel free to ping me if you need any help.

Rishabh570 commented 5 years ago

@Akash4927 Sure, I am on it. If I get stuck, I'll ask you. Thanks :)

Rishabh570 commented 5 years ago

@Akash4927 I was installing the repo for local development and got stuck while doing npm start. This is error message I'm getting...

screenshot from 2018-10-17 16-59-47

qiell commented 5 years ago

@Rishabh570 Please follow the steps mentioned in README.md file and can you please join our hacktoberfest-2018 channel on slack?

Rishabh570 commented 5 years ago

Sure, done! I'll ask it there :)