Shpadoinkle-template: Read standard file formats into Shpadoinkle with Template Haskell

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

This package provides TH functions to read files at compile time and embed them into Shpadoinkle views.


[Skip to Readme]

Properties

Versions 0.0.0.1, 0.0.0.1, 0.0.0.2
Change log CHANGELOG.md
Dependencies base (>=4.12.0 && <4.16), html-parse, Shpadoinkle, Shpadoinkle-backend-static, template-haskell, text (>=1.2.3 && <1.3) [details]
License BSD-3-Clause
Author Isaac Shapira
Maintainer fresheyeball@protonmail.com
Category Web
Source repo head: git clone https://gitlab.com/fresheyeball/Shpadoinkle.git
Uploaded by fresheyeball at 2021-03-13T04:52:44Z

Modules

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for Shpadoinkle-template-0.0.0.1

[back to package description]

Shpadoinkle Template

Goldwater Haddock BSD-3 built with nix Hackage Hackage Deps Hackage CI

This module provides the ability to read files into Shpadoinkle views.

Usage

Lets say you have template.html

<h1>Hi!</h1>
<div>Nice to meat you</div>

you can now embed it into a Shpadoinkle

view :: Html m a
view = div [ className "my-view" ] $(embedHtml "./template.html")

which will render as

<div class="my-view">
  <h1>Hi!</h1>
  <div>Nice to meat you</div>
</div>