Skip to content
Discussion options

You must be logged in to vote

Hi, thanks for the guidance again. I followed your hints and from some other places and got to create this hook:

# hooks.py
def on_post_page(output,page,config):
    output = output.replace('feed_rss_created.xml','feed.xml')
    output = output.replace('feed_rss_updated.xml','feed-updated.xml')
    return output

I didn't think it was that easy, but it is.

So I put in some bs4 to specify the elems, and also coded in the filenames gotten from the RSS plugin. The final code becomes:

# hooks.py

from bs4 import BeautifulSoup

def on_post_page(output,page,config):

    soup = BeautifulSoup(output)
    # find all rss links with rel="alternate" and type="application/rss_xml"
    rssLinks = soup.f…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@stratself
Comment options

Answer selected by kamilkrzyskow
@kamilkrzyskow
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants