Closed dsas closed 5 years ago
Hi, the content is in the HTML form by design.
So you need the HTML to be text back again?
I use strip tags, see my website rss: https://github.com/TomasVotruba/tomasvotruba.cz/blob/master/source/rss.twig
Ideally I'd have the HTML as text again, yes. Given that post.content is a complete HTML document with title and site navigation and so forth, then just strip tagging won't work as I'll get the contents of the title element and so forth.
Perhaps I need to generate a post.perex, either automatically or as a one-off.
If you want to add content_raw
property to the post object in PR, I'll guide you.
Is it necessary? AbstractGeneratorFile already has rawContent / getRawContent which is the markdown content converted to HTML and then strip tagged. I can then just use post.rawcontent in my twig file.
Perhaps I'm missing something or you prefer content_raw, I'm happy to help :)
Well, have you tried it?
Sorry, yes I gave it a quick try and seems to be fine.
This is more of a question than an issue. I want my blog to have an rss feed. I tried to do this by:
However by the time this is being rendered post.content is actually the html for the entire post webpage rather than just the contents of the post (i.e. the html conversion of my markdown file). It appears that Statie just keeps replacing the content in place as it generates the page
I see some other people using statie have avoided this issue by using a "perex" in their frontmatter and including that, I'd rather not have to go and add that to each of my posts by hand though.
Do you have any suggestions?