Skip to content

TristanCacqueray/haskell-xstatic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

XStatic package for Haskell

Hackage Hackage Hackage Hackage Hackage License

Similar to xstatic-py, the goal of XStatic family of packages is to provide static file as Haskell library to be installed using cabal.

Usage

  • Create a XStaticFile using xstatic-th or file-embed.
  • Serve the files using xstatic (for wai) or servant-xstatic (for servant).
  • Add the files to your html page using lucid-xstatic or lucid2-xstatic.

Checkout the demo, demo-xterm or websockets-ki-htmx for examples.

  • Use this collection by adding this configuration to your cabal.project:
source-repository-package
    type: git
    location: https://github.com/TristanCacqueray/haskell-xstatic
    tag: 205506d8b53af9f9e448bfd0e2eadec349058eca
    subdir: xstatic-htmx xstatic-tailwind

Notes

  • The files are embedded in the code.
  • Compressed files are served as-is by automatically adding the Content-Encoding: gzip headers.
  • When adding new packages, keep the original files license. XStatic only adds metadata.

Contribute

Contributions and bug reports are welcome! To work on this project you need a Haskell toolchain: get-started.

Validate your change with:

$ cabal build -O0 all --ghc-option=-Werror && cabal test -O0 all

About

Low-Fat static file packaging for Haskell projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published