# Versioned documentation

**URL:** <https://talk.jekyllrb.com/t/versioned-documentation/6259>\
**Category:** Help\
**Created:** [July 20, 2021, 4:21pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259 "2021-07-20T16:21:48Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patitotective](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patitotective/32/3745_2.png) [@Patitotective](https://talk.jekyllrb.com/u/Patitotective)\
**Post date:** [July 20, 2021, 4:21pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/1 "2021-07-20T16:21:48Z")

</div>

I’m using GitHub Pages (Jekyll) to create PREFS python library documentation. And i chose the `just-the-docs` theme because it easily creates a side bar, the thing is that i need to separate the documentation by version so i created a folder called `versions` which has as subfolders all versions and all markdown files inside the version subfolders has as permalink their name and the version before, e.g.:

```auto
permalink: v0.1.6/home/

```

and there is the problem, how there are multiple versions of the documentation i see the pages duplicated the time of versions in the side bar:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/jekyllrb/original/2X/7/758eb705bc556a2b8a28968ddfca6e1fe99ca8fd.png)  
Right now there are two versions, `v0.1.6` and `v0.1.7`, that’s because the pages are duplicated twice.

* * *

So my question is: There is a proper way to create versioned documentation? if there is how? if there is no proper way, how could i hide the other version pages when in other version?

This is the GitHub Page: [PREFS documentation](https://patitotective.github.io/PREFS/).  
The files are public in [gh-pages branch of PREFS repository](https://github.com/Patitotective/PREFS/tree/gh-pages).

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [July 20, 2021, 8:10pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/2 "2021-07-20T20:10:43Z")

</div>

What versioning does is to add subpath like you do with permalink but perhaps you do it as a directory

```auto
v1.1.2/
  index.md
v1.1.3
  index.md

```

Though the number of files in your repo is going to keep growing rapidly.

Jekyll alone isn’t built to handle documentation at the versioned level like you want and the theme doesn’t have anything that I can see.

My a separate Ruby plugin will help and yoi can add a switch to the menu to go between versions.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [July 20, 2021, 8:11pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/3 "2021-07-20T20:11:41Z")

</div>

The typical way for Python docs is to host on read the docs and the code is for a docs site built in Sphinx, which uses Python.

See this page of the help.

[https://docs.readthedocs.io/en/stable/versions.html](https://docs.readthedocs.io/en/stable/versions.html)

Note also the v:latest bit in the bottom left of the page to switch versions.

Or this R package which has a great variety of stable, latest and v1.x versions to choose from.

[https://xgboost.readthedocs.io/en/latest/R-package/index.html#](https://xgboost.readthedocs.io/en/latest/R-package/index.html#)

Sphinx supports Markdown and reStructuredText so you can write your docs like before and you won’t have to worry about a theme. You’ll just have to leave Jekyll behind.

Or maybe versioned documentation is not so important - someone could always serve up an older tag docs site of yours if they really need it.

* * *

You can also try GitBook, which gives you one free public site to host and you can optionally control the site using a repo, so that is close to a Jekyll experience.

---

<div class="post-metadata">

**Author:** ![Patitotective](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patitotective/32/3745_2.png) [@Patitotective](https://talk.jekyllrb.com/u/Patitotective)\
**Post date:** [July 20, 2021, 8:18pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/4 "2021-07-20T20:18:36Z")

</div>

I tried to use readthedocs but i though it would be easy to version the documentation for my own (because using readthedocs the versions are tags of the repository and i don’t like that because if i misspell some word or something i can’t fix it).  
Anyway, thanks for the answer. i will pass my docs to readthedocs.

---

<div class="post-metadata">

**Author:** ![MichaelCurrin](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/michaelcurrin/32/2340_2.png) [@MichaelCurrin](https://talk.jekyllrb.com/u/MichaelCurrin)\
**Post date:** [July 20, 2021, 8:28pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/5 "2021-07-20T20:28:23Z")

</div>

OK thanks for the update.

Check out some spellcheck in VS Code or some CLI one you can run against your entire site at build time so you can fix issues before tagging.

---

<div class="post-metadata">

**Author:** ![Patitotective](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patitotective/32/3745_2.png) [@Patitotective](https://talk.jekyllrb.com/u/Patitotective)\
**Post date:** [July 20, 2021, 8:32pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/6 "2021-07-20T20:32:36Z")

</div>

Yes, i will do that but i would like that i could edit the tags manually.

---

<div class="post-metadata">

**Author:** ![BillRaymond](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/billraymond/32/5963_2.png) [@BillRaymond](https://talk.jekyllrb.com/u/BillRaymond)\
**Post date:** [July 21, 2021, 6:11pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/7 "2021-07-21T18:11:39Z")

</div>

If your repo is public, could you share a link?

---

<div class="post-metadata">

**Author:** ![Patitotective](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patitotective/32/3745_2.png) [@Patitotective](https://talk.jekyllrb.com/u/Patitotective)\
**Post date:** [July 21, 2021, 11:27pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/8 "2021-07-21T23:27:06Z")

</div>

> [@Patitotective](#):
>
> The files ~~are~~ were public in [gh-pages branch of PREFS repository](https://github.com/Patitotective/PREFS/tree/gh-pages).

Now the files are for readthedocs.

---

<div class="post-metadata">

**Author:** ![BenjaminHoegh](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/benjaminhoegh/32/3775_2.png) [@BenjaminHoegh](https://talk.jekyllrb.com/u/BenjaminHoegh)\
**Post date:** [August 4, 2021, 7:12am UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/9 "2021-08-04T07:12:31Z")

</div>

A shame that this is so hard to manage in Jekyll, really wish they would develop a feature for making versioned content easier. they could go the same way as [docusaurus](https://docusaurus.io/docs/next/versioning#tagging-a-new-version)

---

<div class="post-metadata">

**Author:** ![Patitotective](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/patitotective/32/3745_2.png) [@Patitotective](https://talk.jekyllrb.com/u/Patitotective)\
**Post date:** [August 4, 2021, 11:33am UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/10 "2021-08-04T11:33:19Z")

</div>

Does Docusaurus the same things as readthedocs? I mean if i can use it with the readthedocs files?

---

<div class="post-metadata">

**Author:** ![BenjaminHoegh](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.jekyllrb.com/benjaminhoegh/32/3775_2.png) [@BenjaminHoegh](https://talk.jekyllrb.com/u/BenjaminHoegh)\
**Post date:** [August 5, 2021, 1:45pm UTC](https://talk.jekyllrb.com/t/versioned-documentation/6259/11 "2021-08-05T13:45:30Z")

</div>

As long you use markdown you should be able to migrate
