Generating metadata


I’m actually running a blog with Hugo. Recently I posted a new article and tried to read from my RSS manager (Tiny Tiny RSS). What I found when I went to read the article is that metadata is not generated very good, I think, and I don’t know what is messing arround. Here’s a screenshot:

As you can see, it has a “Page” thing at right of the title, and I think it should’t.

To troubleshoot something like this, you’ll need to point to the feed and preferably a repo where your site’s code is located. :slight_smile:

Hello, thank you for replying!

My code is hosted in a VPS. What I can provide is a URL to the repo where the theme’s source code is or a gist with the config.

About the feed, the link is

In cases like this it is best to just share as many links as you can. So go ahead and share those.

In the meantime, the apparent issue is that your RSS template is setting the <author> element to the some variable in a template. Here are the two latest posts, with relevant lines:

<title>Using the C preprocessor</title>
<pubDate>Mon, 27 Mar 2017 00:00:00 +0000</pubDate>
<author>Page("Using the C preprocessor")</author>
<title>Isolate your ruby environment</title>
<pubDate>Tue, 16 Aug 2016 00:00:00 +0000</pubDate>
<author>Page("Isolate your ruby environment")</author>

From your GitHub history I see you forking after-dark, which has an author parameter for your site config. I am not sure if you’ve set it or not, but maybe if that isn’t set it will mess up like this.

One quick way to check if it is the theme settings would be to run a build with a different theme. Don’t commit it or anything, just run a local version and visit your RSS feed; you don’t even need to view the site, to check if the feed is working correctly.

What version of Hugo (hugo version) are you using?

I’m not using right now that theme, it’s for a future project.

I’m using this theme:

The author param doesn’t work as in after-dark’s theme.

I’m using 0.18.1 (Debian Stretch).

Well nothing in that theme sticks out to me, and I am not personally aware of any 0.18.0 specific issues with RSS (though it is worth looking for them here and in the issue tracker.

My next step would be to check the template files generating the site, but your’s are not in a repo, ne? You might want to throw them into a repo for debugging this.

You can see the author logic in the embedded RSS template for Hugo 0.18.1 here:

It’s virtually unchanged since 0.18.1. I’m afraid we’re going to need more information about your site config in order to help.

1 Like

I don’t use any template for generating my blog.

Do you mean a template for posts?

Here’s a GIST with my config.

As far as for folders and files, everything is like creating a new hugo blog.

@captainepoch your Hugo site is generated from templates. If is generated from Hugo, it uses templates to create it.

The issue you are having, and which @moorereason pointed out, is with your RSS template.

That means you either need to debug the RSS template on your own, or you need to share your repo so we can see what the conflict is. If you can’t share it for some reason, I am not sure how we will be able to help. Is there a reason you can’t share it?

Edit: I recalled that you posted earlier that you keep your site on a VPS, implying it was not kept in version control. That is fine, we don’t actually need the entire site, just the layouts directory (and you already shared your theme repo). You ought to just copy that directory and drop it in a repo and share it, so we can see what is happening.

Sorry for being late, it was a rough week.

As you can see, there’s nothing into the layouts folder, so I don’t know what I have to upload…