mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-04 18:28:02 +00:00
docs(typlite): add examples for --assets-path
and --assets-src-path
(#1396)
* Update README.md * docs: update README.md to enhance usage instructions and contextual content rendering details
This commit is contained in:
parent
15f2329bc1
commit
791a7f8314
1 changed files with 20 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
Converts a subset of typst to markdown.
|
||||
|
||||
## Usage
|
||||
## Basic Usage
|
||||
|
||||
```shell
|
||||
# default output is main.md
|
||||
|
@ -13,4 +13,23 @@ typlite main.typ output.md
|
|||
|
||||
## Feature
|
||||
|
||||
- **Contexual Content Rendering**: Contents begin with `context` keyword will be rendered as svg output. The svg output will be embedded inline in the output file as **base64** by default, if the `--assets-path` parameter is not specified. Otherwise, the svg output will be saved in the specified folder and the path will be embedded in the output file. By specify the `--assets-src-path` parameter, the source code of the context will also be saved in the specified folder.
|
||||
|
||||
For example, the following folder structure is generated by the following command:
|
||||
|
||||
```shell
|
||||
typlite main.typ --assets-path assets --assets-src-path assets-src
|
||||
```
|
||||
|
||||
```bash
|
||||
.
|
||||
├── assets # when --assets-path is specified
|
||||
│ ├── 1_Dark.svg
|
||||
│ └── 1_Light.svg
|
||||
├── assets-src # when --assets-src-path is specified
|
||||
│ └── 1.typ # 1 is the numbering of the context block
|
||||
├── main.md # output file
|
||||
└── main.typ # input file
|
||||
```
|
||||
|
||||
- **Raw Output**: Raw codes with `typlite` language will be directly output into the Markdown result.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue