mirror of
https://github.com/srid/ema.git
synced 2024-11-29 09:25:14 +03:00
4.3 KiB
4.3 KiB
Revision history for ema
Unreleased
- Handle URL anchors (#83)
- Fix bug in
Ex02_Basic.hs
(wasn't generating HTML files) - Fix
runEmaPure
not generating routes - Typeclass
- Change typeclass to be indexed only route (
Ema r
)
- Change typeclass to be indexed only route (
0.6.0.0 -- 2022-02-05
- Websocket API: Add
ema.switchRoute
to switch to other routes in live server. - Smaller core: remove helpers and examples (examples can be enabled by a flag)
- Helpers
Ema.Helpers.PathTree
moved to separate package pathtree.Ema.Helpers.FileSystem
moved to separate package unionmount.Ema.Helpers.Markdown
moved to separate package commonmark-simple.Ema.Helpers.Blaze
is no more. Seeema-template
if you need a ready made template using blaze HTML and TailwindCSS.
- Examples
with-examples
cabal flag is made False by default. Examples are not exposed modules. Ema.Route.Slug
moved to separate package url-slug
- Helpers
0.4.0.0 -- 2022-01-19
- Pin TailwindCSS to 2.x, because the 3.x broke our CDN url
- Remove unused Cabal deps (#61)
Tailwind.layoutWith
: don't hardcode<body>
attrs- Tailwind: module revamped and renamed to
Tailwind.Helper.Blaze
runEma
and friends:- return the monadic's action's return value or generated files (dependent type)
- CLI: add
run
subcommand that takes--host
and--port
(and remove environment hacks of $HOST and $PORT)
0.2.0.0 -- 2021-11-21
- TODO(doc) runEma's action gets the
CLI.Action
as argument, to prevent thegen
command from needing to monitoring files. - Live Server
- Avoid unncessary DOM patch on page load
- Handle invalid routes gracefully without breaking websocket
- Re-add
<script>
tags on hot reload - Scroll to top on route switches
- Use secure websockets when on HTTPS
- Bind to loopback (127.0.0.1) for security reasons
- Do not handle target=_blank links in websocket route switch
Asset
type- Introduce the
Asset
type to distinguishing between static files and generated files. The later can be one ofHtml
orOther
, allowing the live server to handle them sensibly. Ema
typeclass:- Drop
staticAssets
in favour ofallRoutes
(renamed fromstaticRoutes
) returning all routes including both generated and static routes. - Drop
Slug
and use plainFilePath
. Route encoder and decoder deal directly with the on-disk path of the generated (or static) files.
- Drop
- Make the render function (which
runEma
takes) return aAsset LByteString
instead ofLByteString
such that it can handle all routes, and handle static files as well as generation of non-HTML content (eg: RSS) - Allow copying static files anywhere on the filesystem
- Introduce the
routeUrl
:- Unicode normalize as well URI encode route URLs
- now returns relative URLs (ie. without the leading
/
)- Use the
<base>
tag to specify an explicit prefix for relative URLs in generated HTML. This way hosting on GitHub Pages without CNAME will continue to have functional links.
- Use the
- Fix: prevent encoding of non-HTML paths
- Now takes the
model
type as argument, inasmuch asencodeRoute
takes it as as well (to accomodate scenarios where route path can only be computed depending on model state; storing slug aliases for instance) - Add
routeUrlWith
for non-pretty URLs
Ema.Slug
- Add
Ord
,Generic
,Data
and Aeson instances toSlug
- Unicode normalize slugs using NFC
- Add
decodeSlug
andencodeSlug
- Add
- Add default implementation based on Enum for
allRoutes
- Warn, without failing, on missing static assets during static generation
- Static generation
- Use block buffering to prevent logging from slowing down site generation
- Write .nojekyll
- CLI
- Removed
-C
argument (orthogonal to Ema)
- Removed
- Helpers
- Helpers.FileSystem
- Add Union mount support; re-exported from
unionmount
library - enrich FileAction type to distinguish between existance and new and update states
- Add Union mount support; re-exported from
- Helpers.Tailwind
- add overflow-y-scroll to body
- Add twind shim before application's head
- CDN: Use latest version always.
- Helpers.Markdown
- add helpers to parse markdown;
parseMarkdownWithFrontMatter
andparseMarkdown
- add helpers to parse markdown;
- Helpers.FileSystem
- Examples
Remove Ex03_Documentation.hs (moved to separate repo,Back to ./docs, but using Emanote.ema-docs
)- Add Ex03_Basic.hs example
0.1.0.0 -- 2021-04-26
- First version. Released on an unsuspecting world.