Coder Social home page Coder Social logo

RSS post content about astrowind HOT 1 CLOSED

onwidget avatar onwidget commented on August 27, 2024
RSS post content

from astrowind.

Comments (1)

prototypa avatar prototypa commented on August 27, 2024

Hello @fi0

Thank you for contacting. This is not a bug in the template. This is the way it is expected to work, and it is not recommended to include <content> in the RSS, partly because the content field is not recognized by the rss feed specification.

In any case, if you want to carry it out, before, take into account the following: according to the link you share, it specifies that you can use post.compiledContent() only if markdown is included, not for MDX.

However, if you create the list of RSS feed objects yourself, you can pass the content of Markdown files (not MDX), to the content key using the compiledContent() property.

If in the use that you are giving to the template you only include markdown (.md) then you can do the following:

  1. Go to this file https://github.com/onwidget/astrowind/blob/main/src/utils/posts.js#L1 and add in the getNormalizedPost method the return of the compiledContent property (in case it is available, only for markdown)
  2. In the https://github.com/onwidget/astrowind/blob/main/src/pages/rss.xml.js file do something similar to what is specified in the link you shared:
content: sanitizeHtml(post.compiledContent())

from astrowind.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.