Skip to content

[QUESTION] How to adapt/customize Frontmatter keys  #31

Description

@bellons91

Hello. I'm trying to port my blog to Statiq, using this theme.

My old blog uses Markdown files with this kind of Frontmatter:

---
title: "3 ways to inject DateTime and test it"
path: "/blog/inject-and-test-datetime-dependency"
tags: ["CSharp", "Tests", "MainArticle"]
featuredImage: "./cover.jpg"
excerpt: "DateTime, Guid, and Random values are not under your direct control. You should abstract them to write better code and testing. We'll see 3 ways to inject and test them in .NET Core projects."
created: 2021-01-12
updated: 2021-01-12
---

I'm looking for a way to adapt the "old" structure with the one required by this theme.

In particular, I'll have to map

  • title => Title
  • created => Published
  • excerpt => Lead

Then, I'll also have to perform 2 transformations:

path must be used as Destination Path ( how can I customize the example DestinationPath: => $"{Document.GetDateTime("Published").ToString("yyyy/MM")}/{Document.Destination.FileName}" ? )

Then, how can I define the cover image for each blog post, using the one defined in the featuredImage field?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Discussion/QuestionDiscussions or questions about the code

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions