diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 304d941..1674cdf 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,10 @@ +### 0.5.0+1de8f07 (Released 2022-7-8) +* Additions: + * latest commit #1de8f07 + * [[#6aec175](https://github.com/Freymaurer/Nfdi4Plants.Fornax/commit/6aec175b5141ad87f113b6a0ac5e7bcf9d740850)] Update to rm deprecated from test client + * [[#3036cf4](https://github.com/Freymaurer/Nfdi4Plants.Fornax/commit/3036cf47d8a46e9b4f3084d1e4430267d60173ae)] Merge branch 'main' of https://github.com/Freymaurer/nfdi4plants-fornax-template + * [[#1de8f07](https://github.com/Freymaurer/Nfdi4Plants.Fornax/commit/1de8f0722c7d61c82441e2f3af5536be9ee10f52)] add sidebar basepath logic + ### 0.4.0+9e56047 (Released 2022-7-8) * Additions: * latest commit #9e56047 diff --git a/src/Nfdi4Plants.Fornax/MarkdigExtensions/nfdi-sidebar-element-header.fs b/src/Nfdi4Plants.Fornax/MarkdigExtensions/nfdi-sidebar-element-header.fs index da659cb..ab2a12f 100644 --- a/src/Nfdi4Plants.Fornax/MarkdigExtensions/nfdi-sidebar-element-header.fs +++ b/src/Nfdi4Plants.Fornax/MarkdigExtensions/nfdi-sidebar-element-header.fs @@ -42,11 +42,10 @@ module NfdiSidebarElementHeader = let attr = hb.GetAttributes() attr.AddProperty("slot", "inner") + if href.IsSome then - attr.AddProperty( - "href", - if productionBasePath.IsSome then System.IO.Path.Combine(productionBasePath.Value, href.Value) else href.Value - ) + let nextHref = if productionBasePath.IsSome then "/" + productionBasePath.Value.Trim([|'/'|]) + "/" + href.Value.Trim([|'/'|]) else href.Value + attr.AddProperty("href", nextHref) if (renderer.EnableHtmlForBlock) then renderer.Write('<') |> ignore @@ -83,5 +82,6 @@ module NfdiSidebarElementHeader = // The Markdig to add the extension to static member UseSidebarHeader(pipeline : MarkdownPipelineBuilder, ?productionBasePath) = let x = if productionBasePath.IsSome then SidebarHeaderExtension(productionBasePath.Value) else SidebarHeaderExtension() + printfn "HIT: %A" productionBasePath pipeline.Extensions.Add(x) pipeline \ No newline at end of file diff --git a/tests/Nfdi4Plants.Fornax.Tests/nfdi-sidebar-element-header.tests.fs b/tests/Nfdi4Plants.Fornax.Tests/nfdi-sidebar-element-header.tests.fs index f1438eb..369bd2e 100644 --- a/tests/Nfdi4Plants.Fornax.Tests/nfdi-sidebar-element-header.tests.fs +++ b/tests/Nfdi4Plants.Fornax.Tests/nfdi-sidebar-element-header.tests.fs @@ -38,6 +38,6 @@ let tests = test "basePathPipeline" { let markdown = """# Start testing!:/docs/start-testing""" let result = Markdown.ToHtml(markdown, basePathPipeline) - Expect.equal result $"""

Start testing!

{'\010'}""" "" + Expect.equal result $"""

Start testing!

{'\010'}""" "" } ] \ No newline at end of file