summaryrefslogtreecommitdiff
path: root/source/Render/Html/Layout.hs
diff options
context:
space:
mode:
Diffstat (limited to 'source/Render/Html/Layout.hs')
-rw-r--r--source/Render/Html/Layout.hs15
1 files changed, 12 insertions, 3 deletions
diff --git a/source/Render/Html/Layout.hs b/source/Render/Html/Layout.hs
index 6219107..c26b6b5 100644
--- a/source/Render/Html/Layout.hs
+++ b/source/Render/Html/Layout.hs
@@ -25,6 +25,7 @@ module Render.Html.Layout
, htmlPageRoute
, htmlSupportScriptRoute
, htmlMountUrlPrefixes
+ , layoutHtmlSources
, layoutHtmlSourceGraph
) where
@@ -263,11 +264,20 @@ layoutHtmlSourceGraph
:: [(SourceMountId, [Text])]
-> ResolvedSourceGraph
-> Either HtmlLayoutError HtmlLayout
-layoutHtmlSourceGraph specifications graph = do
+layoutHtmlSourceGraph specifications graph =
+ layoutHtmlSources
+ specifications
+ (sourceNodeResolved <$> sourceGraphNodes graph)
+
+layoutHtmlSources
+ :: [(SourceMountId, [Text])]
+ -> [ResolvedSource]
+ -> Either HtmlLayoutError HtmlLayout
+layoutHtmlSources specifications inputSources = do
prefixes <- validateMountPrefixes specifications
let sources =
List.sort
- (sourceNodeResolved <$> sourceGraphNodes graph)
+ inputSources
usedMounts =
Set.fromList (resolvedSourceMount <$> sources)
missingMounts =
@@ -548,7 +558,6 @@ supportScriptAssetComponents :: [Text]
supportScriptAssetComponents =
["_static", "naproche-html.js"]
--- Used by the current single-page writer until bundle publication lands.
percentEncodeUtf8 :: Text -> Text
percentEncodeUtf8 =
Text.pack