mirror of
https://github.com/10h30/wordpress-export-to-markdown.git
synced 2026-07-11 18:56:14 +09:00
Comments about decoding
This commit is contained in:
@@ -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 [];
|
||||
|
||||
@@ -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,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,4 +1,4 @@
|
||||
// get array of tags for post
|
||||
// get array of decoded tag names
|
||||
module.exports = (post) => {
|
||||
if (!post.data.category) {
|
||||
return [];
|
||||
|
||||
@@ -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];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user