statiqdev / Statiq.Web

Statiq Web is a flexible static site generator written in .NET.
https://statiq.dev/web
Other
1.64k stars 234 forks source link

How to set FrontMatterRegexes to use custom Frontmatter? #1007

Closed bellons91 closed 1 year ago

bellons91 commented 1 year ago

I'm porting my GatsbyJS blog to Statiq.Web.

All my article (~130) have the frontmatter set such as:

---
title: "How to customize Conventional Commits in a .NET application using GitHooks"
path: "/blog/conventional-commit-with-githooks"
tags: ["dotNET", "npm", "MainArticle"]
featuredImage: "./cover.png"
excerpt: "Using Conventional Commits you can define a set of rules useful for writing meaningful commit messages. Using NPM. Yes, in a dotNET application!"
created: 2023-02-07
updated: 2023-02-07
---

Since some of those section names are not supported, I have to write a custom FrontMatterRegexes - I suppose.

Where can I find some documentation and some examples?

The documentation does not provide any example

You can also customize the front matter styles using the following settings:

FrontMatterRegexes: Defines the default set of regular expressions used for identifying front matter. Changing this setting will overwrite the defaults above. AdditionalFrontMatterRegexes: Defines additional regular expressions used for identifying front matter in addition to the defaults described above.

Any idea?

bellons91 commented 1 year ago

Note: I'm using CleanBlog as main theme.

bellons91 commented 1 year ago

Moved to the Discussion section

daveaglick commented 1 year ago

Thanks for moving this over to discussions - we can always circle back around and open an actual issue if that discussion results in work items.