Add comments about changes, improve config file support of multi author

This commit is contained in:
Corbin Crutchley
2019-09-11 15:15:41 -07:00
parent fc64391ccf
commit 5236d35964
7 changed files with 2947 additions and 1297 deletions

View File

@@ -133,7 +133,17 @@ module.exports = {
url: nodeUrl,
guid: nodeUrl,
custom_elements: [
{"dc:creator": frontmatter.authors.name }, //changed
/**
* We chose `dc:creator` in order to avoid having
* to list contact information from our contributors,
* as `dc:creator`
*
* FIXME: This does not have the functionality we'd expect
* it only lists the last author's name
*
* @see https://github.com/dylang/node-rss/issues/92
*/
{"dc:creator": frontmatter.authors.map(author => author.name) },
{comments: `${nodeUrl}#disqus_thread`}
],
}})
@@ -198,7 +208,7 @@ module.exports = {
{
name: "en",
// A function for filtering nodes. () => true by default
filterNodes: node => !!node.frontmatter && !!node.frontmatter.authors, //changed
filterNodes: node => !!node.frontmatter && !!node.frontmatter.authors,
},
],
// Fields to index. If store === true value will be stored in index file.
@@ -226,7 +236,14 @@ module.exports = {
excerpt: node => node.excerpt,
description: node => node.frontmatter.description,
slug: node => node.fields.slug,
authors: node => node.frontmatter.authors.name, //changed
/**
* FIXME: This does not work the way we'd want. We want the name
* the author rather than the username, but the node is not
* populated
*
* @see https://github.com/humanseelabs/gatsby-plugin-lunr/issues/24
*/
authors: node => node.frontmatter.authors.join(', '),
tags: node => node.frontmatter.tags,
},
},