General Installation Configure Scheduled Updates List of Projects Supported Static Site Generators Fornax Common Erros Web Components Style nfdi-navbar nfdi-footer nfdi-body nfdi-sidebar-element nfdi-sidebar-eleneo nfdi-header nfdi-toc nfdi-code Development

Supported Static Site Generators

last updated at 2022-06-27 Fornax

These docs are created using this setup, so you can always have a look at the source repo if you find something missing.

Docs for version: ^1.0.2

Setup
  1. dotnet new --install Nfdi4Plants.Fornax.Template, to install the current version of the template.
  2. dotnet new NFDIdocs, after navigating to the folder in which you want to initiate the template.
  3. dotnet tool restore
  4. dotnet paket install
  5. Navigate to the src folder (cd src) and start the application with dotnet fornax watch
  6. Set up gh-pages.
  7. (Optional, recommended) Set up scheduled updates.
Markdown syntax

To add more documentation, add a markdown file to \src\docs. The file MUST start with a metadata block:

--- layout: docs title: Metadata date: 2022-05-09 author: Dominik Brilhaus add toc: true add sidebar: _sidebars/mainSidebar.md status: draft todos: - Update links to other KB articles --- Author

Examples:

# Allows duplicates, all "author" fields are parsed author: Dominik author: Martin # Allows json object syntax # "name" MUST exist # "github" and "orcid" MAY exist author: {name: Dominik} author: {name: Martin D'vloper, github: https://github.com/exampleUrl, orcid: 0000-0000-0000-0000} Date/Published

Format is date: yyyy-MM-dd.

Examples:

# Can use "date" ... date: 2020-05-09 # ... or "published" published: 2020-05-09 # If both exist, "date" is preferred even if it comes after "published". published: 2020-05-09 # This is ignored date: 2020-10-09 Sidebar

Sidebar files MUST be in ANY subdirectory of \src\docs, which is excempted from docs layout parsing.

// example for folder excemption let files = Directory.GetFiles(docsPath, "*") |> Array.filter (fun n -> n.Contains @"\_sidebars\" |> not && n.Contains "/_sidebars/" |> not)

useNewSidebar = true decides which type of sidebar is preferred:

// src/loaders/docloader.fsx Docs.loadFile(projectRoot, contentDir, filePath, useNewSidebar = true, includeSearchbar = true)

Sidebar markdown files must start with a metadata block:

--- published: 2022-05-09 Article Status: Publishable To-Dos: - Update links to other KB articles --- New Sidebar

To add a sidebar element use header syntax in combination with links. Any lower level header will be nested to into its higher level header.

# [General](/) ## [Installation](/docs/Installation.html) ## [Configure Scheduled Updates](/docs/ScheduledUpdates.html) ## [List of Projects](/docs/ProjectList.html) ## [Supported Static Site Generators](/docs/SupportedStaticSiteGenerators.html) ### [Fornax](/docs/SupportedStaticSiteGenerators.html#fornax) ## [Common Erros](/docs/CommonErrors.html) Old Sidebar

This is not the default sidebar anymore

To add a sidebar element to the page, use the codeblock syntax:

```Data Management Plan
# Data Management Plan:/docs/DataManagementPlan.html
## Advantages of a DMP:/docs/DataManagementPlan.html#advantages-of-a-dmp
### Elements of a DMP?:/docs/DataManagementPlan.html#elements-of-a-dmp
# DataPLANT's Data Management Plan Generator:/docs/DataManagementPlan.html#dataplants-data-management-plan-generator
```
Searchbar

We use Pagefinder as basis for static website search. It generates the src/_public/_pagefind folder, containing css and js to power the searchbar.

If the searchbar is not visible (should be above sidebar) you need to rerun pagefind.

npm run index

This will create the necessary files. But at the moment will not correctly work when using the testclient. It will show the ui part but will not function.

To test the searchfunction you can use: npm run indexserve.

Activate with useNewSidebar = true.

// src/loaders/docloader.fsx Docs.loadFile(projectRoot, contentDir, filePath, useNewSidebar = true, includeSearchbar = true) Include in deploy gh-action

Add the following part after the Build step in .github/workflows/deploy.yml.

- name: Index run: npm run index

DataPLANT Support

Besides these technical solutions, DataPLANT supports you with community-engaged data stewardship. For further assistance, feel free to reach out via our helpdesk or by contacting us directly .
Contribution Guide 📖
✏️ Edit this page