RSS Feeds for diffrent file types

#1

Hi,
I have the following Frontmatter for my podcast episodes

    ---
    title: "episode 1"
    categorie: funny
    audioformats:
    - mp3
    - mp4
    - ogg
    ---
    ---
    title: "episode 2"
    categorie: bad
    audioformats:
    - mp3
    - mp4
    - ogg
    ---

what I want to achive is to produce not just one rss feed for all funny / bad episodes but an rss feed for each file type.

Currently I use the taxonomie for categroies so I get two rss feeds one for funny one for bad episodes. Now I want to create a rss feed for each of the audioformats.
Is that possible?
what I currently get is the following output

/public/category/funny/index.xml
/public/category/bad/index.xml

what I need is

/public/category/funny/index.xml
/public/category/funny/index-mp3.xml
/public/category/funny/index.mp4.xml
/public/category/funny/index-ogg.xml
/public/category/bad/index.xml
/public/category/bad/index-mp3.xml
/public/category/baf/index.mp4.xml
/public/category/bad/index-ogg.xml

#2

Yep, just add audioformats as a taxonomy, and you are basically done (providing your theme and/or project uses a default RSS template for taxonomy terms…). :slight_smile:

#3

Thanks for the reply, I think i was not clear enought in my request

what I currently get is the following output

/public/category/funny/index.xml
/public/category/bad/index.xml

what I need is

/public/category/funny/index.xml
/public/category/funny/index-mp3.xml
/public/category/funny/index.mp4.xml
/public/category/funny/index-ogg.xml
/public/category/bad/index.xml
/public/category/bad/index-mp3.xml
/public/category/baf/index.mp4.xml
/public/category/bad/index-ogg.xml

I think your suggestion will result in

/public/posts/index.xml
/public/posts/index-mp3.xml
/public/posts/index.mp4.xml
/public/posts/index-ogg.xml
/public/category/funny/index.xml
/public/category/bad/index.xml

any idea? actually I need a hirachy of taxonomies

#4

If you have a repo available, I can clone it and show you what I mean. Please see Requesting Help, and considering making a small project to share with the content you are talking about (include your front matter). :slight_smile:

I am not certain what you mean, but all the taxonomies are β€œflat” in Hugo. To generate all those extra feeds you’ll have to do some extra work to associate terms to each other and then the templates for them all. Whereas if you include the following in your config, your audioformats should create the feeds you are looking for (presuming you are using YAML, please see configuring taxonomies):

taxonomies:
  audioformat: audioformats

I suggest sharing your repo, so we can see what you’ve got going. :slight_smile:

#5

Hi,


This is the repo which you asked for.

I have two problems:
first is that only the taxonomie term rss feesd are renderd but no categories. Why is that?
I would expect folders within the categories folder but there arent.

In addtion I don’t know how i can create in each of those subfolders (which are missing) e.g categroies/bad 4 rss feeds (one for each file type) thanks for your help

#6

Run hugo --buildDrafts. Your content isn't showing because it is a draft.

When I run that, I get the following output to public:

public
β”œβ”€β”€ audioformats
β”‚   β”œβ”€β”€ index.xml
β”‚   β”œβ”€β”€ mp3
β”‚   β”‚   └── index.xml
β”‚   β”œβ”€β”€ mp4
β”‚   β”‚   └── index.xml
β”‚   └── ogg
β”‚       └── index.xml
β”œβ”€β”€ categories
β”‚   β”œβ”€β”€ bad
β”‚   β”‚   └── index.xml
β”‚   β”œβ”€β”€ funny
β”‚   β”‚   └── index.xml
β”‚   └── index.xml
β”œβ”€β”€ index.xml
β”œβ”€β”€ posts
β”‚   └── index.xml
β”œβ”€β”€ sitemap.xml
└── tags
    └── index.xml

There isn’t a theme, but it uses the embedded RSS template.

So that works as I expect, does it make sense to you? :slight_smile:

#7

Thanks a lot!
o dear… that draft thing was a shame :flushed: .

Thanks that helped already so now to the thing which I realy don’t know which isn’t just dump misuse :zipper_mouth_face:

If we take for example the categories:
public

β”œβ”€β”€ categories
β”‚   β”œβ”€β”€ bad
β”‚   β”‚   └── index.xml
β”‚   β”œβ”€β”€ funny
β”‚   β”‚   └── index.xml
β”‚   └── index.xml

i would like to get something like this:

    β”œβ”€β”€ categories
    β”‚   β”œβ”€β”€ bad
    β”‚   β”‚   └── index.xml
    β”‚   β”‚   └── index.ogg.xml
    β”‚   β”‚   └── index.mp4.xml
    β”‚   β”‚   └── index.mp3.xml
    β”‚   β”œβ”€β”€ funny
    β”‚   β”‚   └── index.xml
    β”‚   β”‚   └── index.ogg.xml
    β”‚   β”‚   └── index.mp4.xml
    β”‚   β”‚   └── index.mp3.xml
    β”‚   └── index.xml
    β”‚   └── index.mp3.xml
    β”‚   └── index.ogg.xml
    β”‚   └── index.mp4.xml

I know it has to be something with the custom output formats. but i realy don’t get how they work in this scenario.

#8

I currently try something like that
but no mp4.xml get generated.

[outputs]
  home = ["RSS","mp4"]
  section = ["RSS","mp4"]
  taxonomyTerm = ["RSS","mp4"]
  taxonomy =["RSS","mp4"]

[outputFormats]
[outputFormats.mp4]
mediaType = "application/rss+xml"
baseName = "mp4"

I also created some templates. I commited the change to the repo

#9

I got it running at least basically. a baseof.xml is needed if one wants to use xml without default rss.xml!

#10

@sukramlitt it is easier for me to think about a problem if I understand the goal. Why do you want the feeds to be that specific? It doesn’t seem like it’s useful for a human, and there are better, easier ways to make it consumable for computers. What’s your use case?

Also, media attachements in RSS are a whole other thing, and I am pretty sure you can include all the files in a single node. So… I just don’t see how this example with audioformats actually works for users. :slight_smile:

#11

The goal is quite simple.
There is a pod cast. Pod casts can be subscribed via the rss feed. But most players can’t choose between available formats. The user can (if he wants to / and we have those in our case) subscribe to diffrent feeds so he gets the format he wants to consume. So I need one rss feed for each file type

imagine one user who wants to download low res files <20mb
and others which want to download vorbis >100mb

#12

Are your categories β€œcategories” of kinds of shows (funny or bad), or are they the names of shows?

I’d make a single podcast a section, and each episode would be a page bundle so I could put all the formats together with a show’s page. Then for that section I’d create custom outputs, one for each audio format.

No taxonomies at all!

Then, if I had a different show, I’d make a new section for it. My content would look like:

.
└── project
    └── content
        β”œβ”€β”€ the-talk-show
        └── after-talk-the-show

Taxonomies are a good way to link relevant web pages, but are no good for custom RSS feeds. :slight_smile:

#13

the categories are kind of shows. So users are like to be intrested in one of them but the shows are all published in one posts folder

#14

Well, looks like you figured out what works for you. :slight_smile:

I don’t think you need to set outputs for each page kind. Only taxonomy will work for what you want.

#15

I’m intrested how?
How could I do it just with taxonomies?
As I understood I would get rss feeds for each audiotype but not for each show + audiotype

#16

I thought you had figured out how to add a custom output, up in

If you got mp4 working, then you just create a new format for each audioformat, correct?

#17

Yes but im still unhappy that Formats are static

#18

Sorry, I don’t understand what you mean. What does β€œstatic” refer to in this instance? Because, ya know, Hugo is a static site generator. :slight_smile: