Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ItsEthra/typst-live
Hot reloading for your typst files
https://github.com/ItsEthra/typst-live
Last synced: 2 months ago
JSON representation
Hot reloading for your typst files
- Host: GitHub
- URL: https://github.com/ItsEthra/typst-live
- Owner: ItsEthra
- License: mit
- Created: 2023-03-26T14:08:21.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-10-26T19:28:02.000Z (3 months ago)
- Last Synced: 2024-10-26T21:37:31.241Z (3 months ago)
- Language: Rust
- Size: 85 KB
- Stars: 85
- Watchers: 1
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-typst - typst-live - Hot reloading of pdf in web browser (Integrations & Tools / CLI Tools)
- awesome-typst-cn - typst-live
README
# Typst-live
This is a simple utility to watch for changes in your [typst](https://github.com/typst/typst) file and automatically
recompile them for live feedback. `typst-live` allows you to open a tab in your browser with typst generated pdf and have it automatically reload
whenever your source `.typ` files are changed.## Difference from `--watch` flag
`typst-live` hosts a webserver that automatically refreshes the page so you don't have to manually reload it with `typst --watch`## Installation
If you have [rust](https://www.rust-lang.org) setup use the following command:
```
cargo install typst-live
```If you use Nix, you can run typst-live directly from the GitHub repository using the following command:
```
nix run github:ItsEthra/typst-live
```## Usage
### 1. With auto recompilation
* Launch `typst-live` from your terminal:
```
$ ./typst-live
Server is listening on http://127.0.0.1:5599/
```
* Go to `http://127.0.0.1:5599/` in your browser.
* Now edit your `file.typ` and watch changes appear in browser tab.### 2. With manual recompilation
You can use `typst-live` to reload pdf files without recompilation of source files.
For that you want to use `--no-recompile` option which disables recompilation and just hosts
your pdf file in browser tab, you will need to specify `filename` as pdf instead of source `.typ` file.
Whenever pdf file changes browser tab will be refreshed.