diff --git a/README.md b/README.md index bae2ec0..2833b13 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,23 @@ # notes -A typst template/lib for taking notes. \ No newline at end of file +A typst template/lib for taking notes. + +## Usage + +Install the package locally: + +``` +git clone https://git.pains-perdus.fr/Pains-Perdus/typ-notes.git ~/.local/share/typst/packages/local/notes/0.0.1 +``` + +Use it in `typ` files with: + +``` +#import "@local/notes:0.0.1": * +``` + +Or to create a new note: + +``` +typst init @local/notes +``` diff --git a/lib.typ b/lib.typ new file mode 100644 index 0000000..268854b --- /dev/null +++ b/lib.typ @@ -0,0 +1,2 @@ +#import "@preview/gviz:0.1.0": * +#show raw.where(lang: "dot-render"): it => render-image(it.text) diff --git a/template/main.typ b/template/main.typ new file mode 100644 index 0000000..ab6bfbc --- /dev/null +++ b/template/main.typ @@ -0,0 +1 @@ +#import "@local/notes:0.0.1": * diff --git a/typst.toml b/typst.toml new file mode 100644 index 0000000..8517188 --- /dev/null +++ b/typst.toml @@ -0,0 +1,12 @@ +[package] +name = "notes" +version = "0.0.1" +entrypoint = "lib.typ" +authors = ["Histausse"] +license = "AGPL-3.0-or-later" +description = "A typst template/lib for taking notes." +repository = "https://git.pains-perdus.fr/Pains-Perdus/notes.git" + +[template] +path = "template" +entrypoint = "main.typ"