Skip to content

Commit 90b2af5

Browse files
πŸ“ Overhaul the documentation (#41)
* πŸ“ Outlined new documentation structure * πŸ‘· Auto deploy the documentation * πŸ“ Add an API reference * πŸ’š Fix CI * πŸ“ Added example usage to all default theme components * πŸ“ Removed start and end date arguments * πŸ“ Transfer content into website * πŸ“ Added a toc to the reference * πŸ’š Fixed the ci * πŸ“ Removed the old documentation * πŸ™ˆ Deleted the rendered reference * πŸ“ Added the developer documentation * πŸ“ Fixed missing heading * πŸ’š Fix the CI * πŸ“ Fix broken comment * πŸ“ Added basic component creation documentation * πŸ“ wrote more of the introductory docs * ⬆️ Upgrade flake * πŸ“ Started the improved basic usage guide * πŸ“ Finished usage guide * 🩹 Deleted redundant file * πŸ“ add syntax highlighting for typst code blocks * πŸ’š Fix ci * πŸ’š Fix ci * πŸ’š Fix ci * πŸ’š Fix ci * πŸ“ Started rewrite of the developer docs * πŸ“ Finished developer documentation * πŸ“ finished up some things * ✏️ Fixed typos * πŸ“ Updated the contributing.md * πŸ“ fix installation links * πŸ“ fix approach being spelled wrong --------- Co-authored-by: BestUsernameEver <isaiah.blanc0220@gmail.com> Co-authored-by: BestUsernameEver <115376692+BestUsernamEver@users.noreply.github.com>
1 parent bec293f commit 90b2af5

31 files changed

+1679
-740
lines changed

β€Ž.github/CONTRIBUTING.mdβ€Ž

Lines changed: 25 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ All types of contributions are encouraged and valued. See the [Table of Contents
2929

3030
## I Have a Question
3131

32-
> If you want to ask a question, we assume that you have read the available [Documentation](../docs.pdf).
32+
<!-- FIXME: replace with real url -->
33+
34+
> If you want to ask a question, we assume that you have read the available [Documentation]().
3335
3436
Before you ask a question, it is best to search for existing [Issues](https://github.com/BattleCh1cken/notebookinator.git/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
3537

@@ -41,21 +43,6 @@ If you then still feel the need to ask a question and need clarification, we rec
4143

4244
We will then take care of the issue as soon as possible.
4345

44-
<!--
45-
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
46-
47-
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
48-
- IRC
49-
- Slack
50-
- Gitter
51-
- Stack Overflow tag
52-
- Blog
53-
- FAQ
54-
- Roadmap
55-
- E-Mail List
56-
- Forum
57-
-->
58-
5946
## I Want To Contribute
6047

6148
> ### Legal Notice <!-- omit in toc -->
@@ -153,16 +140,34 @@ You can then [commit](#commit-messages) your changes to your fork. Once you are
153140

154141
### Improving The Documentation
155142

156-
We use [Tidy](https://github.com/Mc-Zen/tidy/tree/main) to generate our documentation. This means that most of our documentation is written directly in the code as comments.
143+
We use a combination of [mdBook](https://github.com/rust-lang/mdBook) and [Tidy](https://github.com/Mc-Zen/tidy/tree/main) to generate our documentation.
157144

158-
You can improve the documentation in the following places:
145+
All of the documentation can be found inside of the [`docs/`](../docs) directory.
159146

147+
- The guides located in [`docs/src/`](../docs/src)
160148
- The comments directly in the code
161-
- The documentation in [`docs.typ`](../docs.typ)
162-
- The template for the docs at [`docs-template.typ`](../docs-template.typ)
163149
- The [README](../README.md)
164150
- The [contributing guide](./CONTRIBUTING.md)(this file)
165151

152+
You can preview your changes locally with the mdbook cli. The first thing you'll need to do is install all of the dependences.
153+
154+
```bash
155+
cargo install --git https://github.com/typst/typst --locked typst-cli
156+
cargo install mdbook
157+
cargo install mdbook-admonish
158+
cargo install --git https://github.com/fenjalien/mdbook-typst-doc.git
159+
```
160+
161+
Once everything has installed, render the documentation with these commands:
162+
163+
```bash
164+
typst compile docs/src/reference.typ --root ./
165+
cd docs
166+
mdbook serve
167+
```
168+
169+
You can then view your notebook by visiting <localhost:8000>.
170+
166171
Once you've made your changes, submit your changes as a pull request, as described above.
167172

168173
## Style Guides

β€Ž.github/workflows/ci.ymlβ€Ž

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,5 @@ jobs:
2323
- name: Run checks
2424
run: |
2525
just install
26-
just docs
2726
just gallery
2827
# TODO: run unit tests here

β€Ž.github/workflows/docs.ymlβ€Ž

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: GH Pages Deploy
2+
3+
on:
4+
push:
5+
branches: [main]
6+
paths-ignore:
7+
- "docs/**"
8+
9+
pull_request:
10+
branches: [main]
11+
paths-ignore:
12+
- "docs/**"
13+
14+
jobs:
15+
build-deploy:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v2
21+
22+
- name: Install Typst
23+
uses: yusancky/setup-typst@v3
24+
id: setup-typst
25+
26+
- name: Install Mdbook
27+
uses: extractions/setup-crate@v1
28+
with:
29+
owner: rust-lang
30+
name: mdBook
31+
32+
- name: Install Mdbook admonish
33+
uses: extractions/setup-crate@v1
34+
with:
35+
owner: tommilligan
36+
name: mdbook-admonish
37+
38+
- name: Install Mdbook typst doc
39+
uses: baptiste0928/cargo-install@v3
40+
with:
41+
crate: mdbook-typst-doc
42+
git: https://github.com/fenjalien/mdbook-typst-doc
43+
tag: 0.1.2
44+
45+
- name: Build
46+
run: |
47+
typst compile docs/src/reference.typ --root ./
48+
cd docs
49+
mdbook build
50+
51+
- name: Deploy to GitHub Pages
52+
if: ${{ github.event_name != 'pull_request' }}
53+
uses: peaceiris/actions-gh-pages@v3
54+
with:
55+
github_token: ${{ secrets.GITHUB_TOKEN }}
56+
publish_dir: book

β€Ž.gitignoreβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,6 @@ gallery/*.png
1212
!gallery/linear-03.png
1313
!gallery/linear-04.png
1414
!gallery/linear-05.png
15+
16+
docs/book
17+
docs/src/reference.pdf

β€Ždocs-template.typβ€Ž

Lines changed: 0 additions & 151 deletions
This file was deleted.

β€Ždocs.pdfβ€Ž

-235 KB
Binary file not shown.

0 commit comments

Comments
Β (0)