Skip to content

Commit

Permalink
live server: Avoid re-creating Tailwind script tags
Browse files Browse the repository at this point in the history
Update ema for this.
  • Loading branch information
srid committed Feb 1, 2025
1 parent f1dd3a0 commit c8dd6bb
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
1 change: 1 addition & 0 deletions emanote/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- Stork search index is now uses note path from their associated layer ([\#495](https://github.com/srid/emanote/pull/495))
- Performance
- Browser-side performance improvement using `idiomorph` ([\#567](https://github.com/srid/emanote/pull/567))
- Fix memory leak and performance gradation overtime in the browser due to Tailwind when using live server
- UI
- prevent the external link icon from wrapping ([\#528](https://github.com/srid/emanote/pull/528))
- [live server] Update Tailwind CDN to 3.4.16
Expand Down
2 changes: 1 addition & 1 deletion emanote/emanote.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: emanote
version: 1.3.22.1
version: 1.3.23.0
license: AGPL-3.0-only
copyright: 2022 Sridhar Ratnakumar
maintainer: srid@srid.ca
Expand Down
6 changes: 4 additions & 2 deletions emanote/src/Emanote/View/Common.hs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ module Emanote.View.Common (
TemplateRenderCtx (..),
mkTemplateRenderCtx,
defaultRouteMeta,
) where
)
where

import Data.Aeson.Types qualified as Aeson
import Data.Map.Syntax ((##))
Expand Down Expand Up @@ -53,7 +54,7 @@ data TemplateRenderCtx n = TemplateRenderCtx
}

{- | Create the context in which Heist templates (notably `pandoc.tpl`) will be
rendered.
rendered.
-}
mkTemplateRenderCtx ::
-- | Current model.
Expand Down Expand Up @@ -198,6 +199,7 @@ commonSplices withCtx model meta routeTitle = do
$ SR.staticFileSiteRoute
$ LiveServerFiles.tailwindJsFile model
H.script
! H.customAttribute "data-ema-skip" "true"
! A.src (H.toValue localCdnUrl)
$ mempty

Expand Down
7 changes: 4 additions & 3 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
flake-root.url = "github:srid/flake-root";
nixos-unified.url = "github:srid/nixos-unified";

ema.url = "github:srid/ema";
ema.url = "github:srid/ema/data-ema-skip";
ema.flake = false;

heist-extra.url = "github:srid/heist-extra";
Expand Down

0 comments on commit c8dd6bb

Please # to comment.