-
Notifications
You must be signed in to change notification settings - Fork 131
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prevent error if front-matter key to be replaced does not exist
- Loading branch information
1 parent
fb21e82
commit 1aa2536
Showing
4 changed files
with
37 additions
and
2 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
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
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,10 @@ | ||
+++ | ||
title = "Replace custom keys" | ||
tags = ["front-matter", "keys", "replace", "custom"] | ||
draft = false | ||
myfoo = 1 | ||
mybar = 2 | ||
+++ | ||
|
||
This post will have the `foo` key in front-matter replaced with | ||
`myfoo` and `bar` replaced with `mybar`. |
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,8 @@ | ||
+++ | ||
title = "Attempt to replace non-existing keys" | ||
tags = ["front-matter", "keys", "replace", "non-existing"] | ||
draft = false | ||
+++ | ||
|
||
Here, attempt is made to replace a non-existing key `toto`, but still, | ||
there shouldn't be any error. |