Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ocramz/blaze-html-qq
Quasiquoter for blaze-html
https://github.com/ocramz/blaze-html-qq
htmx-template quasiquoter web
Last synced: 22 days ago
JSON representation
Quasiquoter for blaze-html
- Host: GitHub
- URL: https://github.com/ocramz/blaze-html-qq
- Owner: ocramz
- License: other
- Created: 2023-04-10T18:55:22.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-10T07:14:32.000Z (12 months ago)
- Last Synced: 2024-05-01T23:24:23.519Z (6 months ago)
- Topics: htmx-template, quasiquoter, web
- Language: Haskell
- Homepage:
- Size: 25.4 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# blaze-html-qq
[![CI](https://github.com/ocramz/blaze-html-qq/actions/workflows/ci.yml/badge.svg)](https://github.com/ocramz/blaze-html-qq/actions/workflows/ci.yml)
QuasiQuoter for [`blaze-html`](https://hackage.haskell.org/package/blaze-html). Parse inline HTML snippets at compile time and produce `MarkupM` values, e.g.
```haskell
{-# language QuasiQuotes #-}
-- blaze-html
import qualified Text.Blaze.Html.Renderer.Text as BT (renderHtml)
-- text
import qualified Data.Text.Lazy as TL (Text)import Text.Blaze.HTML.QQ (blaze)
test :: TL.Text
test = BT.renderHtml [blaze|
Hello!
|]
``````
> test
""Hello!
```This can play well alongside server-side web frameworks such as [HTMX](https://htmx.org/) and [`scotty`](https://hackage.haskell.org/package/scotty).