Skip to content

chris-c-thomas/BV-BRC-Docs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The BV-BRC Documentation Site

System Requirements

The documentation website requires Python with PIP and Nginx to be installed and configured on your machine. Modern versions of both should work.

If using MacOS all can be installed with Homebrew

Sphinx

pip install Sphinx

Install Markdown support

pip install recommonmark

See more detail http://www.sphinx-doc.org/en/stable/markdown.html

Install readthedocs theme

pip install sphinx_rtd_theme

See more detail https://github.com/rtfd/sphinx_rtd_theme

Install additional plugins

pip install sphinxcontrib-newsfeed
pip install sphinxcontrib-spelling

Nginx

Install nginx and config like below. Set document root accordingly.

# nginx conf

server {
	listen 80;
	server_name docs.bvbrc.local;
	root /BV-BRC-Docs/docroot/_build/html;

        # to avoid Cross-Origin Request Blocked error
        location / { 
          if ($request_method = 'OPTIONS') {
             add_header 'Access-Control-Allow-Origin' '*';
             add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
             add_header 'Access-Control-Allow-Headers' 'Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range';
             return 204;
          }
          if ($request_method = 'GET') {
             add_header 'Access-Control-Allow-Origin' '*';
             add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS';
          }
        }
}

Add record for docs.bvbrc.local in /etc/hosts with sudo

127.0.0.1	localhost
127.0.0.1	docs.bvbrc.local

How to add an entry, page, tutorial, or guide

Following the structure already laid out in the repository you should be able to create a .md or .rst file corresponding to what you're looking to do. In order for it to show up in the Table of Contents or landing pages make sure to link your new page to the respective index.rst located at it's corresponding spot in the heirarchy.

Rebuild the documentation

From within the BV-BRC-Docs/docroot directory you can run this command to rebuild the doc site.

make html

On occastion, especially with heavy TOC changes and/or static files added you make need to do a complete rebuild.

rm -rf _build && make html

Resources

We write our documentation pages in both Markdown (.md) and reStructuredText (.rst). Sphinx uses the CommonMark version of Markdown when it builds the documentation site. It is slightly different than the GitHub Flavored MarkDown used by GitHub so make sure to take note of any subtle differences. Use these resources to write and develop documentation for BV-BRC without causing warnings or failures. There is only one flavor of reStructuredText.

Markdown

reStructuredText

Releases

No releases published

Packages

No packages published

Languages

  • Python 50.0%
  • HTML 16.0%
  • CSS 15.1%
  • Batchfile 7.9%
  • Makefile 5.4%
  • Perl 5.0%
  • Shell 0.6%