Skip to content

Commit

Permalink
(MAINT) Initial publishing of FrontMatter configs (#44)
Browse files Browse the repository at this point in the history
This change extends the functionality of memo for documenting a hugo
theme to enable a theme author to publish [FrontMatter][01] config
files, which users can then reference in their own projects instead of
having to find and copy all the values.

This change is in support of estruyf/vscode-front-matter#407, which adds
the `frontMatter.extends` key.

In this basic implementation:

- An author can define `memo.front_matter.configs` in their site params
or on a particular page to publish one or more configurations.

The implementation requires that the configurations be defined as
assets. The implementation allows you to specify the config path as a
remote asset, a site asset, or a page asset and resolves the config path
to the appropriate asset.

Authors can define either the `definition` or `merge` key in an item but
not both. Items with the `definition` key publish a single config and
have the option to specify the site-relative publish path with the
`publish` key. Items with the `merge` key merge the values from multiple
configs to publish as a merged blob to the site-relative path defined by
the mandatory `publish` key.
- Memo has been updated to take advantage of the merge-from-data feature
in Platen to allow setting the site parameters in a data file.
- The new configuration options are validated before use, warning and
discarding invalid values.
  • Loading branch information
michaeltlombardi committed Jan 16, 2023
2 parents abf3604 + d827e71 commit 3867fcc
Show file tree
Hide file tree
Showing 88 changed files with 2,240 additions and 1,389 deletions.
7 changes: 7 additions & 0 deletions .frontmatter/config/content/pageFolders/posts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "posts",
"title": "Platen blog posts",
"$schema": "https://beta.frontmatter.codes/config/content.pagefolders.schema.json",
"path": "[[workspace]]/content/posts",
"contentTypes": ["posts"]
}
23 changes: 0 additions & 23 deletions .frontmatter/config/content/snippets/hugo/embeds/gist.json

This file was deleted.

16 changes: 0 additions & 16 deletions .frontmatter/config/content/snippets/hugo/embeds/instagram.json

This file was deleted.

23 changes: 0 additions & 23 deletions .frontmatter/config/content/snippets/hugo/embeds/tweet.json

This file was deleted.

15 changes: 0 additions & 15 deletions .frontmatter/config/content/snippets/hugo/embeds/vimeo.json

This file was deleted.

32 changes: 0 additions & 32 deletions .frontmatter/config/content/snippets/hugo/embeds/youtube.json

This file was deleted.

119 changes: 0 additions & 119 deletions .frontmatter/config/content/snippets/hugo/figure.json

This file was deleted.

26 changes: 0 additions & 26 deletions .frontmatter/config/content/snippets/hugo/highlight.json

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions .frontmatter/config/content/snippets/hugo/links/permalink.json

This file was deleted.

15 changes: 0 additions & 15 deletions .frontmatter/config/content/snippets/hugo/param.json

This file was deleted.

36 changes: 0 additions & 36 deletions .frontmatter/config/content/snippets/platen/art/local.json

This file was deleted.

Loading

0 comments on commit 3867fcc

Please sign in to comment.