An open API service indexing awesome lists of open source software.

https://github.com/euroargodev/online_documentation

A template for online documentation
https://github.com/euroargodev/online_documentation

argo-floats documentation template

Last synced: 8 months ago
JSON representation

A template for online documentation

Awesome Lists containing this project

README

          


# A template for your online documentation

This repository is a template to get you started with building an online documentation.

You see how this documentation is rendered online here: https://euroargodev.github.io/online_documentation

The documentation is built using [Jupyter book](https://jupyterbook.org/en/stable/intro.html) and is hosted/deployed on Github Pages.

* [Usage](#usage)
+ [Create your own repository](#create-your-own-repository)
+ [Enable doc online rendering](#enable-doc-online-rendering)
+ [Update doc configuration parameters](#update-doc-configuration-parameters)
* [☘ Use Green-Coding energy/CO2e measurements](#-use-green-coding-energyco2e-measurements)
+ [Add your documentation IDs in repository secrets](#add-your-documentation-ids-in-repository-secrets)
- [Identify your project (repository)](#identify-your-project-repository)
+ [Edit the `content/_config.yml` ](#edit-the-content_configyml)


## Usage

You can use this check list to keep track of the procedure. All steps are explained in details below.

- [ ] Create your own repository using this template
- [ ] Enable documentation online rendering (Github Pages)
- [ ] Update documentation content configuration with your own repository data


### Create your own repository

To create your own documentation using this template, you have to clone this repository using the [green button "Use this template" above](https://github.com/new?template_name=online_documentation&template_owner=euroargodev).

More details here:
https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template


### Enable doc online rendering

In the repository you created using this template, go to "Settings", then "Pages" and change the "Source" parameter to "Github Actions".


### Update doc configuration parameters

Edit the `content/_config.yml` file to update parameters with the new repository data.

2 parameters must be updated:

- replace any template ``euroargodev`` occurrences with your own `OWNER` name,
- replace any template ``online_documentation`` occurences with your `` name.

```yml
repository:
url: https://github.com//

extra_footer: |


✏ Click here to make a suggestion about this page
| 🚨 Report an error on this page



By the Euro-Argo Dev community using
Jupyter Book.

This work is licensed under a
Creative Commons Attribution 4.0 Generic License.





```


## ☘ Use Green-Coding energy/CO2e measurements

Interested in monitoring the energy consumption and CO2e emission associated with the building and deployment of your documentation ?

The documentation template is equiped to do this, but some parameters must be updated first. Follow these steps:


### Add your documentation IDs in repository secrets

In order to identify your documentation within the [📊 euroargodev overall energy & CO2e metrics](https://metrics.green-coding.io/carbondb-lists.html?company_uuid=4f42f511-4d8d-4d30-9c5e-8490f2c68811), you need to create specific IDs for your project and the Github Action machines.


#### Identify your project (repository)
1. Get a unique ID from https://www.uuidgenerator.net. Copy the generated ID (it should be a string looking like this example: `4374ec28-7bca-4893-9c69-13e638cda063`)
1. On your repository, go to "Settings", then "Secrets and Variables" and click on the green button "New repository secret"
1. Name it `CARBONDB_PROJECT_UUID` and paste the ID you generated in the previous step in the *secret* field, finalize by clicking on the "Add secret" green button.


### Edit the `content/_config.yml`

Once you created you secrets, build the documentation manually by executing the Github action:

Screenshot 2024-07-02 at 10 38 12

Once the documentation is built and deployed, look at the action summary and look for the workflow parameter in the url:

Screenshot 2024-07-02 at 10 39 49

This workflow id must be used in the repository `content/_config.yml` file: replace any template `104534311` occurences with your own `` value:

```yml





```