Create a documentation site with github-pages, jekyll and just-the-docs theme
Assuming you installed Ruby and Bundler first. Check the prerequisite section here if you haven’t already
Go to the directory you want to keep the site in.
For example, I will be putting in docs
.
Now create jekyll site with jekyll new .
This created a jekyll site in the current directory.
Open the Gemfile that jekyll created.
Comment out the line that has gem "jekyll"
. So that it looks like #gem "jekyll"
Specify just-the-docs
theme by adding this line in Gemfile
: gem "just-the-docs"
.
Close the Gemfile.
Open _config.yml and set theme in the line: theme:minima
to theme:just-the-docs
execute: bundle
or bundle update
Optionally, make other changes in the _config.yml
file for values like title, email, description, url, baseurl, twitter_username, github_username
etc.
Close the _config.yml
file.
Test the site with bundle exec jekyll serve
Visit http://127.0.0.1:4000/docs/
Acknowledgements:
https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/creating-a-github-pages-site-with-jekyll
https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll/testing-your-github-pages-site-locally-with-jekyll
https://github.com/pmarsceill/just-the-docs