mirror of
https://github.com/nicholaswilde/recipes.git
synced 2026-02-04 15:25:50 +00:00
Move workflow to own development page.
Signed-off-by: nιcнolaѕ wιlde <ncwilde43@gmail.com>
This commit is contained in:
79
docs/development.md
Normal file
79
docs/development.md
Normal file
@ -0,0 +1,79 @@
|
||||
# Development
|
||||
|
||||
## :runner: Workflow
|
||||
|
||||
Below is my current workflow for documenting recipes.
|
||||
|
||||
``` mermaid
|
||||
graph TD
|
||||
S[Change to or create ./cook/catetory dir];
|
||||
A{Does the source<br/>website exist?};
|
||||
B[Import recipe using cook-import];
|
||||
C[Manually write cook<br/>file using micro editor];
|
||||
D{Is the domain<br />supported by<br/>cook-import?};
|
||||
E[Visually check cook file];
|
||||
F[Test output using cook recipe read command];
|
||||
G[Download image file and rename<br/>to same base name as cook file];
|
||||
H[Run cook-docs in ./cook/category<br/>to generate markdown file];
|
||||
I[Manually check markdown file];
|
||||
J[Move markdown file to ./docs/category];
|
||||
K[Copy image to ./docs/assets/images<br/>with same base file name as markdown file];
|
||||
L[Add markdown file to mkdocs.yaml];
|
||||
M[Locally run mkdocs to test mkdocs-material];
|
||||
N[Commit and push to repo];
|
||||
O{Is the file<br />correct?};
|
||||
P[Edit cook file];
|
||||
Q{Is the<br/>output correct?};
|
||||
R[Edit cook file];
|
||||
T{Does the page<br/>render correctly?};
|
||||
U[CI GitHub Action workflow<br/>deploys recipe site];
|
||||
V{Is the image<br/>format webp?};
|
||||
W[Convert the image<br/>to png using dwebp];
|
||||
|
||||
A --> |Yes|B;
|
||||
A --> |No|C;
|
||||
B --> D;
|
||||
C --> F;
|
||||
D --> |Yes|E;
|
||||
D --> |No|C;
|
||||
E --> F;
|
||||
F --> Q;
|
||||
I --> J;
|
||||
Q --> |Yes|G;
|
||||
H --> I;
|
||||
J --> K;
|
||||
K --> L;
|
||||
L --> M;
|
||||
I --> O;
|
||||
O --> |Yes|J;
|
||||
O --> |No|P;
|
||||
P --> H;
|
||||
Q --> |No|R;
|
||||
R --> F;
|
||||
S --> A;
|
||||
M --> T;
|
||||
T --> |Yes|N;
|
||||
T --> |No|P
|
||||
N --> U;
|
||||
G --> V;
|
||||
V --> |Yes|W;
|
||||
V --> |No|H;
|
||||
W --> H
|
||||
|
||||
click B "https://github.com/cooklang/cook-import"
|
||||
click C "https://github.com/nicholaswilde/cooklang-micro"
|
||||
click D "https://github.com/cooklang/cook-import"
|
||||
click F "https://cooklang.org/cli/help/#read"
|
||||
click H "https://nicholaswilde.io/cook-docs"
|
||||
click U "https://github.com/nicholaswilde/recipes/blob/main/.github/workflows/ci.yaml"
|
||||
```
|
||||
|
||||
## :frame_with_picture: Convert webp to png
|
||||
|
||||
```shell title="Installation"
|
||||
sudo apt install webp
|
||||
```
|
||||
|
||||
```shell title="Convert"
|
||||
dwebp file.webp -o file.png
|
||||
```
|
||||
@ -6,40 +6,13 @@ My collection of recipes made with [cooklang][1].
|
||||
The `cooklang` files are stored in the `cook` folder and the markdown files are stored
|
||||
in the `docs` folder.
|
||||
|
||||
## :runner: Workflow
|
||||
|
||||
1. Determine the category of the recipe.
|
||||
2. Change dir to the `./cook/<category>` or make dir.
|
||||
3. Use [`cook-import`][2] to download the recipe from a website if possible.
|
||||
4. Edit the `*.cook` file manually and compare to website.
|
||||
5. Download the image file.
|
||||
6. Convert from webp to png if required.
|
||||
7. Run [`cook-docs`][3] to create markdown.
|
||||
8. Edit the `*.md` file and add emoji if needed.
|
||||
9. Copy the image to the `./docs/assets/images` directory.
|
||||
10. Copy the `*.md` markdown file to the `./docs/<category>/` directory. Make dir if needed.
|
||||
11. Add the new recipe to the `nav` section in `mkdocs.yml`.
|
||||
12. Push the changes to the repo where GitHub action will update `mkdocs`.
|
||||
|
||||
### :frame_with_picture: Convert webp to png
|
||||
|
||||
```shell title="Installation"
|
||||
sudo apt install webp
|
||||
```
|
||||
|
||||
```shell title="Convert"
|
||||
dwebp file.webp -o file.png
|
||||
```
|
||||
|
||||
## :scales:License
|
||||
|
||||
[Apache 2.0 License](./LICENSE)
|
||||
|
||||
## :pencil:Author
|
||||
|
||||
This project was started in 2022 by [Nicholas Wilde][4].
|
||||
This project was started in 2022 by [Nicholas Wilde][2].
|
||||
|
||||
[1]: https://cooklang.org/
|
||||
[2]: https://github.com/cooklang/cook-import
|
||||
[3]: https://nicholaswilde.io/cook-docs
|
||||
[4]: https://github.com/nicholaswilde/
|
||||
[2]: https://github.com/nicholaswilde/
|
||||
|
||||
16
docs/javascripts/mathjax.js
Normal file
16
docs/javascripts/mathjax.js
Normal file
@ -0,0 +1,16 @@
|
||||
window.MathJax = {
|
||||
tex: {
|
||||
inlineMath: [["\\(", "\\)"]],
|
||||
displayMath: [["\\[", "\\]"]],
|
||||
processEscapes: true,
|
||||
processEnvironments: true
|
||||
},
|
||||
options: {
|
||||
ignoreHtmlClass: ".*|",
|
||||
processHtmlClass: "arithmatex"
|
||||
}
|
||||
};
|
||||
|
||||
document$.subscribe(() => {
|
||||
MathJax.typesetPromise()
|
||||
})
|
||||
@ -74,6 +74,8 @@ nav:
|
||||
- America's Test Kitchen Best Baked Sweet Potatoes: sides/america's-test-kitchen-best-baked-sweet-potatoes.md
|
||||
- Unexpected Cheddar Cheese Ball: sides/unexpected-cheddar-cheese-ball.md
|
||||
- Pressure Cooker: pressure-cooker.md
|
||||
- Cooklang Files: "https://github.com/nicholaswilde/recipes/tree/main/cook"
|
||||
- Development: development.md
|
||||
extra:
|
||||
social:
|
||||
- icon: fontawesome/solid/house
|
||||
@ -112,7 +114,11 @@ markdown_extensions:
|
||||
anchor_linenums: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
||||
- pymdownx.superfences:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||
- pymdownx.magiclink:
|
||||
repo_url_shorthand: true
|
||||
user: nicholaswilde
|
||||
|
||||
Reference in New Issue
Block a user