-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] How to adapt/customize Frontmatter keys #31
Comments
The two approaches that I suppose I could take to solve the first issue (Frontmatter mappings) are:
Is the first approach feasible? If so, how? What about the second approach? By reading the documentation, I suppose that I have to write a |
The
As for setting the destination path, note that it's file-specific (as opposed to URL-like as in your example front matter). In other words, you've need to set something like
The featured image is entirely a function of the theme as well, and different themes will have different support for something like that. As for CleanBlog, it uses the |
Either could work! One of the main tenants of Statiq is flexibility and extensibility so there's tons of ways to do any given thing. A front matter mapping module hadn't even occurred to me, but it's certainly an option, if not probably a bit more than you need for this (but I like the enthusiasm!). Hopefully the computed metadata approach in a directory metadata file I mentioned above works for you to test things out quickly. If it doesn't let me know and we'll circle back around. |
Now I can tackle the two main issues: URL mapping and Images. My current structure is -/articles Does it mean that I have to transform the whole structure of my blog to keep the old format? Or maybe I can do something like DestinationPath: => $"{Document.GetString("path")}/index.html" (which is currently not working) |
How is this going? I kind of lost sync after the last round of comments... Have you been successful? |
Hello. I'm trying to port my blog to Statiq, using this theme.
My old blog uses Markdown files with this kind of Frontmatter:
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 exampleDestinationPath: => $"{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?The text was updated successfully, but these errors were encountered: