2023-03-27 15:08:00 +00:00
|
|
|
# Doc-generator
|
|
|
|
|
2023-03-29 00:18:06 +00:00
|
|
|
Here is the documentation of the language in markdown, and a program to
|
|
|
|
generate static HTML files from them.
|
2023-03-27 15:08:00 +00:00
|
|
|
|
|
|
|
## `src` folder
|
|
|
|
|
2023-03-29 00:18:06 +00:00
|
|
|
Rust code to generate HTML files from MD files.
|
|
|
|
|
|
|
|
The binary is called like:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
generator --input /path/to/markdown/folder/ --output /path/to/static/folder
|
|
|
|
```
|
|
|
|
|
|
|
|
## `markdown` folder
|
|
|
|
|
|
|
|
Contains the Markdown. All files inside are expected to be UTF-8 encoded
|
|
|
|
markdown, and have the `.md` file extension.
|
2023-03-27 15:08:00 +00:00
|
|
|
|
|
|
|
## `static` folder
|
|
|
|
|
2023-03-29 00:18:06 +00:00
|
|
|
Contains CSS, JS, and HTML templates. Here the MD files are written to
|
|
|
|
after being converted.
|
2023-03-27 15:08:00 +00:00
|
|
|
|
2023-03-29 00:32:06 +00:00
|
|
|
There must be a `template.html` file inside this folder. This file will be used to generate the HTML from MD files.
|
|
|
|
|
|
|
|
Inside `template.html` there must be a string `{{markdown}}`:
|
|
|
|
|
|
|
|
```html
|
|
|
|
<!-- Some html -->
|
|
|
|
{{markdown}}
|
|
|
|
<!-- More html -->
|
|
|
|
```
|
|
|
|
|
|
|
|
This string, `{{markdown}}`, will be replaced with the HTML generated
|
|
|
|
from Markdown
|
|
|
|
|
2023-03-27 15:08:00 +00:00
|
|
|
## `dist` folder
|
|
|
|
|
2023-03-29 00:18:06 +00:00
|
|
|
Coming soon, this folder will contain all HTML, CSS & JS minified after
|
|
|
|
running a script.
|