Skip to content

Commit

Permalink
[FIX] Update contributing guide docs (#539)
Browse files Browse the repository at this point in the history
  • Loading branch information
elephaint authored Nov 21, 2024
1 parent 2846b35 commit 56b7653
Showing 1 changed file with 42 additions and 7 deletions.
49 changes: 42 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,45 @@ Since the notebooks output cells can vary from run to run (even if they produce

## Do you want to contribute to the documentation?

* Docs are automatically created from the notebooks in the `nbs` folder.
* In order to modify the documentation:
1. Find the relevant notebook.
2. Make your changes.
3. Run all cells.
5. Run `nbdev_preview`.
6. Clean the notebook metadata using `nbdev_clean`.
Docs are automatically created from the notebooks in the `nbs` folder.

### Modifying an existing doc
1. Find the relevant notebook.
2. Make your changes. DO NOT rename the document!
3. Run all cells.
4. Run `nbdev_preview`.
5. Clean the notebook metadata using `nbdev_clean --fname nbs/docs/[path_to_notebook.ipynb]`.
6. Add, commit and push the changes.
7. Open a PR.
8. Follow the steps under 'Publishing documentation'

### Creating a new document
1. Copy an existing jupyter notebook in a folder where you want to create a new document. This should be a subfolder of `nbs/docs`.
2. Rename the document using the following format: `[document_number]_document_title_in_lower_case.ipynb` (for example: `01_quickstart.ipynb`), incrementing the document number from the current highest number within the folder and retaining the leading zero.
3. Work on your new document. Pay attention to:
* The Google Colab link;
* How images should be linked;
* How the `IN_COLAB` variable is used to distinguish when the notebook is used locally vs in Google Colab.
5. Add the document to `nbs/mint.json` under the correct group with the following name `document_title_in_lower_case.html`.
6. Follow steps 3 - 8 under `Modifying an existing doc`.

### Publishing documentation
When the PR is approved, the documentation will not be visible directly. It will be visible:
1. When we make a release
2. When you manually trigger the workflows required to publish. The workflows you need to manually trigger under [Actions](https://github.com/Nixtla/nixtla/actions), in order, are:
1. The `build-docs` workflow on branch `main`. Use the `Run workflow` button on the right and choose the `main` branch.
2. The `Deploy to readme dot com` workflow on branch `main`. Use the `Run workflow` button on the right and choose the `main` branch.
* After both workflows have completed (should take max. 10 minutes), check the [docs](https://docs.nixtla.io/) to see if your changes have been reflected.

It could be that on our Readme.com [docs](https://docs.nixtla.io/), the newly created document is not in the correct (sub)folder.
1. Go to the `Log In` (top right corner), log in with your Nixtla account.
2. Go to the Admin Dashboard (top right, under user-name)
3. On the left, go to `Guides`. You now see an overview of the documentation and the structure.
4. Simply drag and drop the document that is in the incorrect (sub)folder to the correct (sub)folder. The document will from hereon remain in the correct (sub)folder, even if you update its contents.

Make sure to check that our [Mintlify docs](https://nixtlaverse.nixtla.io/nixtla/docs/getting-started/introduction.html) also work as expected, and your change is reflected there too. Mintlify is commonly somewhat slower syncing the docs, so it could a bit more time to reflect the change.

### Do's and don'ts
* Don't rename documents! The filename is used statically in various files to properly index the file in the correct (sub)folder. If you rename, you're effectively creating a new document. Follow the correct procedure for creating a new document (above), and check every other document (yes, every single one) in our documentation whether there's a link now breaking to the doc you renamed.
* Check the changes / new document online in both [Readme.com](https://docs.nixtla.io/) and [Mintlify](https://nixtlaverse.nixtla.io/nixtla/docs/getting-started/introduction.html).
* Screwed up? You can hide a document in Readme.com in the Admin console, under `Guides`. Make sure to unhide it again after you've fixed your misstakes.

0 comments on commit 56b7653

Please sign in to comment.