Closed
Description
Hi all, I found no issue discussion on how the docs would be separated into versions, but it comes up in discussion from time. I've done some playing around based on this website:
The above site is built with no modifications, but with the following script: (For an actual server, you'd only need to build, not perform the initial serve.)
#!/bin/sh
git fetch --tags ## Currently, releases are kept as tags. Not stored in branches.
git checkout gh-pages ## Checkout the latest changes first.
jekyll serve --incremental --detach ## A build will be fine, for an actual server.
tagsList="$(git tag --list [0-9].[0-9].[0-9])" ## Iterate through versions only.
echo "$tagsList" | while read version ## For each version tag...
do
git checkout "tags/$version" ## Set contents to version.
echo "baseurl : /$version" > _config.$version.yml ## Programatically make a new config
jekyll build --config _config.yml,_config.$version.yml -d _site/$version/ ## Store the contents in [ip]:[port]/[version]/
done
git checkout gh-pages ## Continue with master branch.
Based on the above, I have the following suggestions:
- Make a branch for each version, instead of a Tag, so that changes can be backported, (e.g. adding a dropdown to each version).
{% assign base = site.baseurl %}
needs to be used in_includes/base.html
.
Would this be the best way of doing it? Did anyone else have suggestions on how to implement it?
Metadata
Metadata
Assignees
Labels
No labels