Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There are a number of things going on here:
New Tag Feeds
There is now an XML feed for every tag on the site. This fixes #105. It also sets up #48 for being able to add a link to follow the topic, as well as #310 in setting up more enhanced "topics" for the future.
Tag feeds are located at
/blog/tag/[tag]/feed.xml
.As a bonus, this doesn't introduce any new referential logic. I was able to get this working using object associations and collections that were already in place.
This method has what I originally thought to be a drawback, which is that it must respect the pagination rules of the tag page. However, this seems okay to me. Tag content doesn't change rapidly enough to make a difference. And if it started to, I'd likely also increase the pagination size.
I will want to run a test on feedly after this is deployed to ensure it all worked as I expect it to.
Debugging Helpers
There was a
debug
filter that ranJSON.stringify()
on the input and printed to the screen. This doesn't always work. There are some circularly-dependent objects in Eleventy. Sometimes logging to the console is a better move.In addition, I've found that I often want to look at the shape of the objects being printed without needing to get all the values (values can be big).
Now there are three debugging filters:
console
: Logs the entire input to the console.console.keys
: Logs the keys of the object to the console.print
: RunsJSON.stringify()
on the object and renders it on screen.Site Feed Improvements
I also noticed that the author wasn't being rendered in the feed, so I added that, which now supports guest authors. I'll have to test to see the effect this has in various readers, but it should get the job done.
And last, I have truncated the main feed to only 20 items. In normal times, that's about 1-2 months of content. Eventually it might not be as much and I'll have to expand. But it should work great for now, and cut down slightly on build time for that particular file.