|
| 1 | +# PyScript documentation |
| 2 | + |
| 3 | +Welcome to the PyScript documentation directory, where you can find |
| 4 | +and contribute to discussions around PyScript and related topics. |
| 5 | + |
| 6 | +## Getting started |
| 7 | + |
| 8 | +Before you start contributing to the documentation, it's worthwhile to |
| 9 | +take a look at the general contributing guidelines for the PyScript project. You can find these guidelines here |
| 10 | +[Contributing Guidelines](https://github.com/pyscript/pyscript/blob/main/CONTRIBUTING.md) |
| 11 | + |
| 12 | +## Documentation Principles |
| 13 | + |
| 14 | +The PyScript documentation is based on a documentation framework called [Diátaxis](https://diataxis.fr/). This framework helps to solve the problem of structure in technical documentation and identifies four modes of documentation - **tutorials, how-to guides, technical reference and explanation**. Each one of these modes answers to a different user need, fulfills a different purpose and requires a different approach to its creation. |
| 15 | + |
| 16 | +The picture below gives a good visual representation of that separation of concerns: |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +So, please keep that in mind when contributing to the project documentation. For more information on, make sure to check [their website](https://diataxis.fr/). |
| 21 | + |
| 22 | +### Setup |
| 23 | + |
| 24 | +The `docs` directory in the pyscript repository contains a |
| 25 | +[Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) documentation project. Material is a system |
| 26 | +that takes plaintext files containing documentation written in Markdown, along with |
| 27 | +static files like templates and themes, to build the static end result. |
| 28 | + |
| 29 | +To setup the documentation development environment simply run `make setup` from this folder and, once it's done, |
| 30 | +activate your environment by running `conda activate ./_env` |
| 31 | + |
| 32 | +### Build |
| 33 | + |
| 34 | +Simply run `mkdocs serve` |
| 35 | + |
| 36 | +## Cross-referencing |
| 37 | + |
| 38 | +You can link to other pages in the documentation by using the `{doc}` role. For example, to link to the `docs/README.md` file, you would use: |
| 39 | + |
| 40 | +```markdown |
| 41 | +{doc}`docs/README.md` |
| 42 | +``` |
| 43 | + |
| 44 | +You can also cross-reference the python glossary by using the `{term}` role. For example, to link to the `iterable` term, you would use: |
| 45 | + |
| 46 | +```markdown |
| 47 | +{term}`iterable` |
| 48 | +``` |
| 49 | + |
| 50 | +You can also cross-reference functions, methods or data attributes by using the `{attr}` for example: |
| 51 | + |
| 52 | +```markdown |
| 53 | +{py:func}`repr` |
| 54 | +``` |
| 55 | + |
| 56 | +This would link to the `repr` function in the python builtins. |
0 commit comments