Skip to content

Commit

Permalink
add mirror and license information
Browse files Browse the repository at this point in the history
  • Loading branch information
PgBiel committed Jan 13, 2025
1 parent d64aded commit db9c5e5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Framework for custom elements and types in Typst. **Supports Typst 0.11.0 or lat

**Read the book:** https://pgbiel.github.io/elembic

**Mirrors:** [GitHub (pgbiel/elembic)](https://github.com/PgBiel/elembic); [Codeberg (pgbiel/elembic)](https://codeberg.org/PgBiel/elembic)

## About

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.
Expand Down
4 changes: 4 additions & 0 deletions docs/book/src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ Elembic ships with a **considerably flexible type system** through its `types` m
Not only does Elembic support **using and combining Typst-native types** (e.g. a field can take `e.types.union(int, stroke)` to support integers or strokes), but it also supports **declaring your own custom, nominal types**. They are represented as dictionaries, but **are strongly-typed,** such that a dictionary with the same fields won't cast to your custom type and vice-versa by default (unless you specify otherwise). For example, a data type representing a `person` won't cast to another type `owner` even if they share the same fields.

Custom types optionally support **arbitrary casting from other types.** For example, you may allow automatic casts from integers and floats to your custom type. This is mostly useful when creating "ad-hoc" types for certain elements with fully customized behavior. You can read more in the ["Custom types" chapter](./types/custom-types/.).

## License

Elembic is licensed under MIT or Apache-2.0, at your option.
2 changes: 1 addition & 1 deletion docs/book/src/about/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Currently, Elembic must be installed **as a local package** (or by **copying it

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`.
In particular, it involves downloading Elembic's files from either [GitHub (pgbiel/elembic)](https://github.com/PgBiel/elembic) or [Codeberg (pgbiel/elembic)](https://codeberg.org/PgBiel/elembic) and then 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):

Expand Down

0 comments on commit db9c5e5

Please sign in to comment.