Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/falkz/hypst
https://github.com/falkz/hypst
Last synced: 4 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/falkz/hypst
- Owner: FalkZ
- Created: 2023-04-24T12:00:29.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-04-11T18:48:29.000Z (7 months ago)
- Last Synced: 2024-04-12T00:05:05.655Z (7 months ago)
- Language: Haskell
- Size: 643 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Hypst
> EDSL to create html documents in Haskell with a Markdown / Typst inspired syntax
## Example
This project allows the following haskell code:
```haskell
module Main whereimport Hypst
import Prelude hiding ((+), (-), (>))
import Styles (styles)main :: IO ()
main = do
document "build/index.html"
# "Inspiration"`img` "./typst.webp"
- "Alternative zu Latex"
- "Erinnert an Markdown"
- "Erlaubt Scripting:"`img` "./scripting.png"
> "Typst ist eine DSL"
# "Idee: Hypst"
> "Haskell basierte EDSL die das Verhalten von Typst imitiert"## "Aufbau 2"
- "Infix Notation auf 'Dokument'"
- "Deep Embedding"
- "Pattern Matching für HTML Rendering"`input` styles
|> end_document
```To be compiled into:
```html
Inspiration
Typst ist eine DSL
Idee: Hypst
Haskell basierte EDSL die das Verhalten von Typst imitiert
Aufbau 2
li { font-size: 1rem; padding: 0.25em 0; } p, blockquote { font-size: 1rem } blockquote { border-left: 2px solid #ccd; background: #ccccdd22; margin: 0; padding: 1em; } img { margin: 1em 0; }
```
Full example: [app/Main.hs](./app/Main.hs)