A script for data that imitates frontmatter #1599
TheRealWolfick
started this conversation in
Templates Showcase
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The idea here is pretty simple. This script uses a stock template for frontmatter but will prefer the format of frontmatter you have already used in files for the folder you are creating the new file inside. It replicates the frontmatter structure of the most recent file in the folder, retaining any non boolean/false default values. The key here is that you can use just the one template for all your data!
It comes in three parts, the default template, and two user scripts that are abstracted away for simplicity.
Template
User Scripts
getFilesInFolder.js
getFmDictionary.js
Beta Was this translation helpful? Give feedback.
All reactions