Skip to content

Commit

Permalink
docs: update routing in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Myriad-Dreamin committed Oct 29, 2023
1 parent 3016168 commit 3b8afa0
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 9 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ cargo install --locked --git https://github.com/Myriad-Dreamin/typst.ts typst-ts

Or Download the latest release from [GitHub Releases](https://github.com/Myriad-Dreamin/typst.ts/releases).

### Example: Render Typst document in browser (build from source with/without wasm-pack)
### Documentation

See [Documentation](https://myriad-dreamin.github.io/typst.ts/cookery).

### Build from source and check

Note: you could build from source with/without wasm-pack.

Note: see [Troubleshooting WASM Build](docs/troubleshooting-wasm-build.md) for (especially) **Arch Linux** users.

Expand All @@ -103,11 +109,11 @@ And open your browser to `http://localhost:20810/`.
You can also run `yarn run build:core` instead of `npx turbo run build` to build
core library (`@myriaddreamin/typst.ts`) and avoid building the WASM modules from source.

### Example: generate documentation site for packages developers.
<!-- ### Example: generate documentation site for packages developers.
- Link [typst-doc](https://github.com/Mc-Zen/typst-doc) by `typst-ts-cli package link --manifest ./typst.toml`.
- Generate documentation by `typst-ts-cli package doc --manifest ./contrib/templates/typst-ts-templates/typst.toml`.
- Generate documentation by `typst-ts-cli package doc --manifest ./contrib/templates/typst-ts-templates/typst.toml`. -->

### Concept: Precompiler

Expand Down
4 changes: 2 additions & 2 deletions packages/compiler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

The compiler can run in both the browser and node.js. See documentation for details:

- [Serverless Compiler](https://myriad-dreamin.github.io/typst.ts/cookery/guide/compiler/serverless.html)
- [Compiler for Node.js](https://myriad-dreamin.github.io/typst.ts/cookery/guide/compiler/node.html)
- [Get Started](https://myriad-dreamin.github.io/typst.ts/cookery/get-started.html)
- [Compiler interfaces](https://myriad-dreamin.github.io/typst.ts/cookery/guide/compilers.html)
4 changes: 3 additions & 1 deletion packages/renderer/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# typst-ts-renderer

See [Typst.ts](https://github.com/Myriad-Dreamin/typst.ts)
See [Typst.ts](https://github.com/Myriad-Dreamin/typst.ts) and documentation:

- [Get Started](https://myriad-dreamin.github.io/typst.ts/cookery/get-started.html)
18 changes: 15 additions & 3 deletions packages/typst.ts/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
# Typst.ts

## Usage
Usage:

```typescript
import { createTypstRenderer } from '@myriaddreamin/typst.ts';
const renderer = createTypstRenderer();
import { $typst } from '@myriaddreamin/typst.ts/dist/esm/contrib/snippet.mjs';
console.log(
(
await $typst.svg({
mainContent: 'Hello, typst!',
})
).length,
);
// :-> 7317
```

See [Typst.ts](https://github.com/Myriad-Dreamin/typst.ts) and documentation for details:

- [Get Started](https://myriad-dreamin.github.io/typst.ts/cookery/get-started.html)
- [Compiler interfaces](https://myriad-dreamin.github.io/typst.ts/cookery/guide/compilers.html)

0 comments on commit 3b8afa0

Please sign in to comment.