Getting Your Blogdown Blog Featured on R-Bloggers: A Guide

By incrementing a certain value and enclosing it within a specific function, we can obtain the initial date of the upcoming month. Conversely, by subtracting one from this value, we can acquire the final date of the present month. However, this approach is notably less efficient than utilizing matrix allocation. In fact, for a data frame with dimensions of 8000 x 8000, constructing the data frame required 36 seconds whereas constructing the matrix only took 1 second.


Question:

My blog is created with blogdown, however, it gets rejected by R-Bloggers due to an error in the feed when attempting to submit it.

The likely reason for the invalidity of this particular XML document is the presence of invalid characters. An error has been detected in the XML at line 6, column 35, specifically an undeclared entity error.

It seems that the RSS feed on my website is incomplete. What steps can I take to ensure that it displays the entire content?


Solution 1:

The Hugo documentation (https://gohugo.io/templates/rss/) includes the RSS xml file that comes with Hugo. As per the documentation, the RSS for a section will be displayed at /SECTION/ (e.g. http://spf13.com/project/index.xml). Therefore, the RSS for your posts can be found at http://spf13.com/post/index.xml.

The crucial sentence in the XML file included within the system is as follows:


<description>{{ .Summary | html }}</description>

According to this online conversation (https://discourse.gohugo.io/t/full-text-rss-feed/8368/2), it appears that there is a desire to modify the content of the description tags, replacing

.Summary

with

.Content

. To see an instance of this in action, check out the blog post found at https://randomgeekery.org/2017/09/15/full-
content-hugo
-feeds/.

The suggested modification involves altering a solitary line within the RSS xml of Hugo.


<description>{{ .Content | html }}</description>

The rss.xml file should be located in the

layouts/

directory, but with a modification to only one line.

It appears that there are alternative methods worth exploring, such as utilizing output formats in the

config.toml

document (https://github.com/gcushen/hugo-academic/issues/346; https://gohugo.io/templates/output-formats/) and incorporating your RSS in the

header.html

(https://gohugo.io/templates/rss/). However, modifying

.Summary

to

.Content

could resolve the problem.


Solution 2:

This seemed to work for me…

Make a new folder named tags within your layouts directory. Ensure that the folder structure appears like this:


<your_base_directory>/layouts/tags

This directory is not located within the themes directory, specifically the layouts directory.

Then create a new file:


<your_base_directory>/layouts/tags/rss.xml

Next, transfer this to the recently generated

rss.xml

.

Frequently Asked Questions

Posted in Xml