1
1
mirror of https://github.com/srid/ema.git synced 2024-11-25 20:12:20 +03:00
ema/CHANGELOG.md

99 lines
5.5 KiB
Markdown
Raw Normal View History

2021-04-19 18:07:52 +03:00
# Revision history for ema
2022-06-08 19:01:51 +03:00
## 0.8.0.0 (Unreleased)
2022-06-22 17:38:56 +03:00
This releases brings a significant rewrite of Ema. If you choose to upgrade your apps from 0.6, see https://ema.srid.ca/howto/upgrade for guidance.
2022-04-07 19:36:09 +03:00
- GHC 9.0 support
2022-03-24 21:58:35 +03:00
- Better handling of URL anchors (#83; #87)
2022-06-11 19:01:42 +03:00
- `routeUrl` uses `UrlDirect` by default. Use `routeUrlWith` if you want to change that.
- Ema status indicator now works independently (requires no Tailwind)
- Multisite rewrite (Ema is mostly rewritten)
- Add the notion of route `Prism_` (first-class values), along with a `IsRoute` class to define them.
- Optional generic deriving of route prisms, so you do not have to hand-write them.
2022-06-08 19:01:51 +03:00
- Automatic isomorphism checks ensures that encoding and decoding are isomorphic.
- Composable Ema apps
2022-06-28 02:35:07 +03:00
- There are two ways of composing Ema apps. Using heterogenous lists (see `Ema.Route.Lib.Multi`), or by defining a top-level route type (see `Ex04_Multi.hs`).
2022-06-08 19:01:51 +03:00
- Replace `LVar` with `Dynamic`.
- Ema still uses `LVar` internally (for live server updates), but on the user-side one only needs to provide a `Dynamic` which is a tuple of initial value and an updating function. The [unionmount](https://github.com/srid/unionmount/pull/1) library was changed to provide this tuple.
- Add `EmaSite` typeclass to "connect them all"
- `SiteArg`: Type of value to pass from the environment.
- `siteInput`: Define the `Dynamic` model for the site.
- `siteOutput`: Asset (eg: HTML) to produce for each route.
2022-02-05 20:05:54 +03:00
## 0.6.0.0 -- 2022-02-05
2022-01-29 21:46:24 +03:00
- 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. See `ema-template` if you need a ready made template using blaze HTML and TailwindCSS.
2022-02-05 20:05:54 +03:00
- Examples `with-examples` cabal flag is made False by default. Examples are not exposed modules.
2022-02-05 19:55:40 +03:00
- `Ema.Route.Slug` moved to separate package *url-slug*
2022-01-29 21:46:24 +03:00
2022-01-20 06:03:11 +03:00
## 0.4.0.0 -- 2022-01-19
2021-12-10 02:37:17 +03:00
- Pin TailwindCSS to 2.x, because the 3.x broke our CDN url
2021-12-19 19:23:06 +03:00
- Remove unused Cabal deps (#61)
2022-01-02 20:09:13 +03:00
- `Tailwind.layoutWith`: don't hardcode `<body>` attrs
2022-01-20 06:03:11 +03:00
- Tailwind: module revamped and renamed to `Tailwind.Helper.Blaze`
2022-01-09 00:06:07 +03:00
- `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)
2021-12-10 02:37:17 +03:00
2021-11-22 02:16:03 +03:00
## 0.2.0.0 -- 2021-11-21
2021-04-27 00:42:00 +03:00
2021-05-26 05:40:56 +03:00
- TODO(doc) runEma's action gets the `CLI.Action` as argument, to prevent the `gen` 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
2021-07-10 16:13:13 +03:00
- 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
2021-05-22 20:06:27 +03:00
- `Asset` type
- Introduce the `Asset` type to distinguishing between static files and generated files. The later can be one of `Html` or `Other`, allowing the live server to handle them sensibly.
- `Ema` typeclass:
- Drop `staticAssets` in favour of `allRoutes` (renamed from `staticRoutes`) returning all routes including both generated and static routes.
- Drop `Slug` and use plain `FilePath`. Route encoder and decoder deal directly with the on-disk path of the generated (or static) files.
- Make the render function (which `runEma` takes) return a `Asset LByteString` instead of `LByteString` 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
2021-05-22 20:06:27 +03:00
- `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.
- Fix: prevent encoding of non-HTML paths
- Now takes the `model` type as argument, inasmuch as `encodeRoute` 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`
2021-05-16 00:52:23 +03:00
- Add `Ord`, `Generic`, `Data` and Aeson instances to `Slug`
- Unicode normalize slugs using NFC
2021-05-22 20:06:27 +03:00
- Add `decodeSlug` and `encodeSlug`
- 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
2021-07-01 17:38:42 +03:00
- Write .nojekyll
2021-06-28 18:05:48 +03:00
- CLI
- Removed `-C` argument (orthogonal to Ema)
2021-05-08 15:57:20 +03:00
- Helpers
- Helpers.FileSystem
- Add Union mount support; re-exported from `unionmount` library
- enrich FileAction type to distinguish between existance and new and update states
2021-05-08 15:57:20 +03:00
- Helpers.Tailwind
- add overflow-y-scroll to body
- Add twind shim *before* application's head
2021-06-18 00:37:49 +03:00
- CDN: Use latest version always.
2021-11-22 02:16:03 +03:00
- Helpers.Markdown
2021-05-08 15:57:20 +03:00
- add helpers to parse markdown; `parseMarkdownWithFrontMatter` and `parseMarkdown`
- Examples
2021-05-19 20:20:10 +03:00
- ~~Remove Ex03_Documentation.hs (moved to separate repo, `ema-docs`)~~ Back to ./docs, but using Emanote.
- Add Ex03_Basic.hs example
2021-04-27 00:42:00 +03:00
2021-04-26 21:22:49 +03:00
## 0.1.0.0 -- 2021-04-26
2021-04-19 18:07:52 +03:00
* First version. Released on an unsuspecting world.