Contributing to Documentation
Table of contents
This guide will walk you through setting up your machine for contributing to FireFly documentation. Documentation contributions are extremely valuable. If you discover something is missing in the docs, we would love to include your additions or clarifications to help the next person who has the same question.
This doc site is generated by a set of Markdown files in the main FireFly repository, under the ./docs
directory. You can browse the source for the current live site in GitHub here: https://github.com/hyperledger/firefly/tree/main/docs
Process for updating documentation
The process for updating the documentation is really easy! You’ll follow the same basic steps outlined in the same steps outlined in the Contributor’s guide. Here are the detailed steps for contributing to the docs:
- Fork https://github.com/hyperledger/firefly
- Clone your fork locally to your computer
- Follow the steps below to view your local copy of the docs in a browser
- Make some improvements to the Markdown files
- Verify that your changes look they way you want them to in your browser
- Create a new git commit with your changes. Be sure to sign-off on your commit by using
git commit -s
! - Push your changes
- Open a Pull Request to incorporate your changes back into the hyperledger/firefly repo
Dependencies
The FireFly docs site uses GitHub pages, which uses a tool called Jekyll to convert Markdown files into HTML files that can be read in your browser. Basically that means in order to build and view the pages locally on your machine, you need to have Jekyll. Jekyll is a Ruby app, so you’ll also need to have Ruby, and the Ruby bundler app to install Jekyll’s dependencies. The good news is these things are very easy to set up.
macOS
If you’re on macOS, you are already good to go! macOS already comes with ruby
and bundle
installed and set up already. You don’t need to do anything extra.
Linux
You will need to install ruby
and bundle
and have them on your path to build and serve the docs locally. On Ubuntu, to install these, run the following commands:
sudo apt-get update
sudo apt-get install ruby ruby-bundler
Build and serve the docs locally
To build and serve the docs locally, from the project root, navigate to the docs directory:
cd docs
Install docs dependencies:
bundle install
And start the Jekyll test server:
bundle exec jekyll serve --livereload
You should now be able to open http://127.0.0.1:4000/firefly/index.html in your browser and see a locally hosted version of the doc site.
As you make changes to files in the ./docs
directory, Jekyll will automatically rebuild the pages, and notify you of any errors or warnings in your terminal. If you have a browser open, it will automatically reload when changes are made to pages.