-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #142 from nullnein/main
Small Jekyll YAML Metadata package
- Loading branch information
Showing
3 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
This package lets you add some yaml-metadata to a jekyll post. | ||
|
||
Typing `:newpost` yields the following: | ||
|
||
``` | ||
--- | ||
date: 2024-12-05 | ||
author: YourName | ||
tags: | ||
category: | ||
title: | ||
--- | ||
``` | ||
|
||
Date is set to the current date and authorname can obviously be adjusted. | ||
|
||
Change the value `YourName` in line 5 of this package's `package.yml`. | ||
|
||
Please make sure to add tags like the following and remain consistent: | ||
|
||
``` | ||
author: | ||
tags: | ||
- tag1 | ||
- tag2 | ||
category: | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: "jekyll-yaml" | ||
title: "Jekyll YAML metadata" | ||
description: A simple package to add metadata to your jekyll posts before writing. | ||
version: 0.1.0 | ||
author: mathis | ||
tags: ["jekyll", "yaml"] | ||
homepage: https://github.com/nullnein/espanso-hub/tree/main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
global_vars: | ||
- name: autorname | ||
type: echo | ||
params: | ||
echo: YourName | ||
matches: | ||
- trigger: ":newpost" | ||
replace: "---\ndate: {{mydate}}\nauthor: {{autorname}}\ntags:\ncategory:\ntitle:\n---" | ||
vars: | ||
- name: mydate | ||
type: date | ||
params: | ||
format: "%Y-%m-%d" |