From b1ca48c2c59a1211f19f82683f3f648f966b7094 Mon Sep 17 00:00:00 2001 From: "Daniel J. Summers" Date: Tue, 26 Jul 2022 20:37:18 -0400 Subject: [PATCH] Add docs link to admin header (#25) - Change executable name in release packages --- build.fsx | 6 ++++-- src/MyWebLog/DotLiquidBespoke.fs | 2 +- src/admin-theme/_layout.liquid | 12 ++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/build.fsx b/build.fsx index c3dfbbd..c2521a7 100644 --- a/build.fsx +++ b/build.fsx @@ -34,7 +34,7 @@ let version = let zipTheme (name : string) (_ : TargetParameter) = let path = $"src/{name}-theme" !! $"{path}/**/*" - |> Zip.filesAsSpecs path //$"src/{name}-theme" + |> Zip.filesAsSpecs path |> Seq.filter (fun (_, name) -> not (name.EndsWith ".zip")) |> Zip.zipSpec $"{releasePath}/{name}-theme.zip" @@ -49,6 +49,8 @@ let packageFor (rid : string) (_ : TargetParameter) = if File.exists prodSettings then File.delete prodSettings [ !! $"{path}/**/*" |> Zip.filesAsSpecs path + |> Seq.map (fun (orig, dest) -> + orig, if dest.StartsWith "MyWebLog" then dest.Replace ("MyWebLog", "myWebLog") else dest) Seq.singleton ($"{releasePath}/admin-theme.zip", "admin-theme.zip") Seq.singleton ($"{releasePath}/default-theme.zip", "default-theme.zip") ] @@ -87,7 +89,7 @@ Target.create "RepackageLinux" (fun _ -> Shell.mkdir workDir Zip.unzip workDir zipArchive Shell.cd workDir - sh "chmod" [ "+x"; "./MyWebLog" ] + sh "chmod" [ "+x"; "./myWebLog" ] sh "tar" [ "cfj"; $"../myWebLog-{version}.linux-x64.tar.bz2"; "." ] Shell.cd "../.." Shell.rm zipArchive diff --git a/src/MyWebLog/DotLiquidBespoke.fs b/src/MyWebLog/DotLiquidBespoke.fs index 6fba67f..4cbd799 100644 --- a/src/MyWebLog/DotLiquidBespoke.fs +++ b/src/MyWebLog/DotLiquidBespoke.fs @@ -200,7 +200,7 @@ type UserLinksTag () = |> Seq.iter result.WriteLine /// A filter to retrieve the value of a meta item from a list -// (shorter than `{% assign item = list | where: "name", [name] | first %}{{ item.value }}`) +// (shorter than `{% assign item = list | where: "Name", [name] | first %}{{ item.value }}`) type ValueFilter () = static member Value (_ : Context, items : MetaItem list, name : string) = match items |> List.tryFind (fun it -> it.Name = name) with diff --git a/src/admin-theme/_layout.liquid b/src/admin-theme/_layout.liquid index ea5234e..78f2495 100644 --- a/src/admin-theme/_layout.liquid +++ b/src/admin-theme/_layout.liquid @@ -27,10 +27,22 @@