Skip to content

Commit

Permalink
Merge pull request #24 from EZoni/myst_instructions
Browse files Browse the repository at this point in the history
Instructions on how to write documentation with MyST
  • Loading branch information
DavidSagan authored Dec 18, 2024
2 parents 995b164 + 227c084 commit 9a3f26f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 21 deletions.
19 changes: 0 additions & 19 deletions front_matter/doc_editing_setup.md

This file was deleted.

42 changes: 42 additions & 0 deletions front_matter/how_to_write_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# How to Write Documentation

The documentation uses the [MyST](https://mystmd.org/) markup language.

In order to edit and view the documentation locally, please first install MyST following [MyST's installation instructions](https://mystmd.org/guide/installing).

Check that MyST has been installed successfully by running
```{code} bash
myst --version
```
Once MyST has been installed, run
```{code} bash
myst start
```
from the root directory of the repository (where the MyST configuration file `myst.yml` is located) to start MyST locally.
This will display something like
```{code} bash
$ myst start
📖 Built front_matter/introduction.md in 96 ms.
📖 Built front_matter/governance.md in 46 ms.
📖 Built front_matter/contributing.md in 45 ms.
📖 Built front_matter/doc_editing_setup.md in 45 ms.
📖 Built standard/introduction.md in 45 ms.
📖 Built standard/element_parameter.md in 44 ms.
📚 Built 6 pages for project in 193 ms.
✨✨✨ Starting Book Theme ✨✨✨
🔌 Server started on port 3000! 🥳 🎉
👉 http://localhost:3000 👈
```

Open the URL displayed in the terminal (in this case `http://localhost:3000`) to visualize the MyST content with your web browser.

You are now ready to edit the markdown files that compose the documentation!
The content displayed in your web browser will update automatically as you edit.

If you add new markdown files, do not forget to add them to the table of contents defined in the MyST configuration file `myst.yml`.

Finally, once you are happy with your changes, do not forget to commit and push them to your branch and open a pull request on GitHub.
3 changes: 1 addition & 2 deletions myst.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ project:
- file: 'front_matter/introduction.md'
- title: 'Front Matter'
children:
- file: 'front_matter/organization.md'
- file: 'front_matter/governance.md'
- file: 'front_matter/contributing.md'
- file: 'front_matter/doc_editing_setup.md'
- file: 'front_matter/how_to_write_docs.md'
- title: 'Lattice Standard'
children:
- file: 'standard/introduction.md'
Expand Down

0 comments on commit 9a3f26f

Please sign in to comment.