This is the core repository for the documentation for services hosted at cloud.redhat.com.
-
Obtain a copy of Hugo "extended" version from the Hugo downloads. The extended version is required for the theme we use.
-
Clone the repository, also cloning the theme through submodules.
git clone --recurse-submodules --depth 2 https://github.com/RedHatInsights/platform-docs -
Install requisite npm modules for CSS assets.
cd platform-docs npm install -D --save autoprefixer postcss-cli -
Run the development server.
hugo serve -D
You can of course edit the docs using normal git workflows.
If you have write-access to this repository, you can use Netlify CMS to edit the documentation. With your development
server running, visit http://localhost:1313/admin/ and authorize it with your GitHub login. Be sure to make sure you
grant it access to the RedHatInsights organization. Changes you make through the Netlify CMS interface will result in
pull requests to the GitHub repository.
Many sources of documentation on the platform live elsewhere. To aggregate them all together, we use a tool called Aletheia to do so. To use Aletheia:
-
Make sure you have Python 3.6 installed and the poetry package manager. On Fedora:
sudo dnf install python36 python3-poetry -
Clone Aletheia from GitHub.
git clone https://github.com/RedHatInsights/aletheia -
Setup a Poetry environment.
cd aletheia poetry install -
Install Aletheia itself.
poetry run python setup.py develop -
Get Google Drive credentials to be able to access documentation hosted in Google Drive. We know we need to improve this process, but for the moment, you can follow the Google Drive API Quickstart to obtain a
credentials.jsonandtoken.picklefile. Be sure to generate yourcredentials.jsonwhile logged into your Red Hat Google Account, not a personal one. Put those files in theplatform-docsdirectory. -
Use Aletheia to assemble the platform docs.
poetry run aletheia assemble cd /tmp/platform-docs hugo serve