radish icon indicating copy to clipboard operation
radish copied to clipboard

Support RSS

Open jakelazaroff opened this issue 2 years ago • 0 comments

Right now, Radish does a couple things that make the HTML authoring experience nicer:

  • HTML files are automatically nested in folders for nicer routing. For example, if a page is src/about.jsx, Radish will place the built file at about/index.html so that the path in the browser is /about/.
  • Radish generates an HTML "shell" — the doctype, html, head and body tags.

These are both convenient for normal pages, but unnecessary for RSS, which is accessed by visiting the file directly (/blog/feed.xml) and doesn't need any sort of "shell" around it.

A solution to the first might be allowing the paths function to return file names as well. If the last segment of a path has an extension, Radish would create a file with that name and extension, rather than creating a folder and placing an index.html inside it.

I'm not sure how to solve the second right now — maybe another export from pages (export const shell = false;) that instructs Radish not to generate the surrounding markup?

jakelazaroff avatar Apr 03 '22 16:04 jakelazaroff