Thanks for the post. For those looking, you can validate the RSS feed generated here: validator.w3.org/feed/
For those using Next.js with MDX files (located under src/pages), you can get the posts this way :
src/pages
const globby = require("globby"); const fs = require("fs"); const path = require("path"); const frontmatter = require("@github-docs/frontmatter"); const getAllPostsXmlData = async () => { const pages = await globby([ "src/pages/**/*.mdx", "!src/pages/_*.js", "!src/pages/*.js", "!src/pages/api", ]); const posts = pages.map((page) => { const fullPath = path.join(process.cwd(), page); const fileContents = fs.readFileSync(fullPath, "utf8"); const matter = frontmatter(fileContents); return { ...matter.data, url: getPostUrl(page) }; }); return posts; };
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for the post. For those looking, you can validate the RSS feed generated here: validator.w3.org/feed/
For those using Next.js with MDX files (located under
src/pages
), you can get the posts this way :