Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Add "add support" yml docs metadata support (Issue #23)
Browse files Browse the repository at this point in the history
  • Loading branch information
Freymaurer committed Jul 15, 2022
1 parent affd55a commit 183bb9c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/Nfdi4Plants.Fornax/Components.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,15 @@ type Components = class end
!! docs.content

// support contact
h3 [] [!! "Dataplant Support"]
div [] [
!! "Besides these technical solutions, DataPLANT supports you with community-engaged data stewardship. For further assistance, feel free to reach out via our "
a [Href "https://support.nfdi4plants.org"] [!! "helpdesk"]
!! " or by contacting us "
a [Href "javascript:location='mailto:\u0069\u006e\u0066\u006f\u0040\u006e\u0066\u0064\u0069\u0034\u0070\u006c\u0061\u006e\u0074\u0073\u002e\u006f\u0072\u0067';void 0"] [!! "directly"]
!! "."
]
if docs.add_support then
h3 [] [!! "Dataplant Support"]
div [] [
!! "Besides these technical solutions, DataPLANT supports you with community-engaged data stewardship. For further assistance, feel free to reach out via our "
a [Href "https://support.nfdi4plants.org"] [!! "helpdesk"]
!! " or by contacting us "
a [Href "javascript:location='mailto:\u0069\u006e\u0066\u006f\u0040\u006e\u0066\u0064\u0069\u0034\u0070\u006c\u0061\u006e\u0074\u0073\u002e\u006f\u0072\u0067';void 0"] [!! "directly"]
!! "."
]

// Edit this page link
// https://github.com/nfdi4plants/nfdi4plants.github.io/tree/main/src/
Expand Down
6 changes: 6 additions & 0 deletions src/Nfdi4Plants.Fornax/Loaders.fs
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,18 @@ module Aux =
|> Array.tryFind (fun x -> fst x = "add toc")
|> Option.map (snd >> trimString >> System.Boolean.Parse)
|> Option.defaultValue true
let addSupport =
configArr
|> Array.tryFind (fun x -> fst x = "add support")
|> Option.map (snd >> trimString >> System.Boolean.Parse)
|> Option.defaultValue true
{
existingDocs with
title = title
authors = if author.IsSome then Author.createNameOnly author.Value |> Array.singleton else [||]
published = published
add_toc = addToc
add_support = addSupport
}

static member createFromConfig (configArr: (string * string) []) =
Expand Down

0 comments on commit 183bb9c

Please sign in to comment.