Step 10: Add Documentation
Documentation other than the README.md resides in a top level /docs folder and is build and deployed automatically by Github through Github Pages.
-
Add
/docsdirectory to the top level of the plugin repomkdir docs -
Add a new file
index.mdin thedocsdirectory, with the following content:# My Great Plugin -
Add a new file
overview.mdin thedocsdirectory, with the following content:# Overview -
Add a new file
_config.ymlto thedocsdirectory, with the following content:title: My Great Plugin remote_theme: kbaseIncubator/kbase-github-pages-theme search_enabled: false aux_links: "My Great Plugin on Github": - "//github.com/kbase/kbase-ui-plugin-{PLUGIN}" "About KBase": - "//kbase.us/about" navigation: menu: - label: Overview -
Add a new file
Gemfileto thedocsdirectory, with the following content:source 'https://rubygems.org' gem 'github-pages', group: :jekyll_plugins gem 'kbase-github-pages-theme', git: 'https://github.com/eapearson/kbase-github-pages-theme' -
Preview the docs:
- install
rubyor use the built-in one-
Note that it may be necessary to install ruby with macports or homebrew due to permissions issues adding gems to the stock ruby on macOS.
-
-
install
bundlerif it isn’t alreadysudo gem install bundler -
install the bundle; in a terminal session in the docs directory:
bundle install -
if all goes well, launch the local github pages server:
bundle exec jekyll serve
- install
-
Open your browser to
https://localhost:4000to see the docs!
Follow Up / See Also
- adding submenus
- the KBase Github Pages Theme
Next Step
-–