Comments about decoding

This commit is contained in:
Will Boyd
2024-02-26 11:20:29 -05:00
parent a46e6cffc7
commit d0330f05d8
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
const settings = require('../settings');
// get array of categories for post, filtered as specified in settings
// get array of decoded category names, filtered as specified in settings
module.exports = (post) => {
if (!post.data.category) {
return [];
+2 -2
View File
@@ -1,5 +1,5 @@
// get cover image filename, previously set on post.meta
// this one is unique as it relies on logic executed by the parser
// get cover image filename, previously decoded and set on post.meta
// this one is unique as it relies on special logic executed by the parser
module.exports = (post) => {
return post.meta.coverImage;
};
+1 -1
View File
@@ -1,4 +1,4 @@
// get slug, previously set on post.meta
// get slug, previously decoded and set on post.meta
module.exports = (post) => {
return post.meta.slug;
};
+1 -1
View File
@@ -1,4 +1,4 @@
// get array of tags for post
// get array of decoded tag names
module.exports = (post) => {
if (!post.data.category) {
return [];
+1 -1
View File
@@ -1,4 +1,4 @@
// get simple post title
// get simple post title, but not decoded like other frontmatter string fields
module.exports = (post) => {
return post.data.title[0];
};