Skip to content

Commit

Permalink
docs: installation and FAQ
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Jan 13, 2025
1 parent 00cc9b5 commit af870b0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Framework for custom elements and types in Typst. Supports Typst 0.11.0 or later

Elembic lets you create **custom elements,** which are **reusable document components,** with support for **typechecked fields, show and set rules** (without using any `state` by default), **revoke and reset rules, reference and outline support,** and more. In addition, Elembic lets you create **custom types,** which also support **typechecked fields** but also **custom casting**, and can be used in element fields or by themselves in arbitrary Typst code.

Elembic's name comes from "element" + "alembic", to indicate that one of Elembic's goals is to experiment with different approaches for this functionality, and to help shape a future update to Typst that includes native custom elements, which will eventually remove the need for using this package.
Elembic's name comes from "element" + ["alembic"](https://en.wikipedia.org/wiki/Alembic), to indicate that one of Elembic's goals is to experiment with different approaches for this functionality, and to help shape a future update to Typst that includes native custom elements, which will eventually remove the need for using this package.

It has a few limitations which are [appropriately noted in the book.](https://pgbiel.github.io/elembic/about/limitations.html)

Expand Down
2 changes: 2 additions & 0 deletions docs/book/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**Welcome to Elembic!** Elembic is a framework that lets you **create your own elements and types in Typst**, including **support for type-checking and casting** on the fly.

> **WARNING:** Elembic is currently experimental. Expect breaking changes before 0.1.0 is released and it is published to the package manager.
## Elements

Elembic allows you to create custom **elements,** which are **reusable visual components** of the document with **configurable properties** (through **styling**).
Expand Down
2 changes: 2 additions & 0 deletions docs/book/src/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
[Introduction](./README.md)

- [About](./about/README.md)
- [Installation](./about/installation.md)
- [Limitations](./about/limitations.md)
- [FAQ](./about/faq.md)

# Elements

Expand Down
5 changes: 5 additions & 0 deletions docs/book/src/about/faq.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Frequently Asked Questions

## Where does the name "Elembic" come from?

Elembic's name comes from "element" + ["alembic"](https://en.wikipedia.org/wiki/Alembic), to indicate that one of Elembic's goals is to experiment with different approaches for this functionality, and to help shape a future update to Typst that includes native custom elements, which will eventually remove the need for using this package.
13 changes: 13 additions & 0 deletions docs/book/src/about/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Installation

Currently, Elembic must be installed **as a local package** (or by **copying it to your project** in the web app).

To install Elembic as a local package in your system, see [https://github.com/typst/packages?tab=readme-ov-file#local-packages](https://github.com/typst/packages?tab=readme-ov-file#local-packages) for instructions.

In particular, it involves downloading Elembic's files from [https://github.com/PgBiel/elembic](https://github.com/PgBiel/elembic) and copying it to `$LOCAL_PACKAGES_DIR/elembic/0.0.1`.

If you're using a Linux platform, there is the following one-liner command to install the latest development version (note: does not remove a prior installation):

```sh
pkgbase="${XDG_DATA_HOME:-$HOME/.local/share}/typst/packages/local/elembic" && mkdir -p "$pkgbase/0.0.1" && curl -L https://github.com/PgBiel/elembic/archive/main.tar.gz | tar xz --strip-components=1 --directory="$pkgbase/0.0.1"
```

0 comments on commit af870b0

Please sign in to comment.