URL for plain markdown

There’s no documentation for this because it’s pretty damn strange TBH :wink:

If I understand correctly, example.com/changelog.md will return raw markdown to the browser, probably as content type text/plain.

I have never done this (not sure anyone has!) but try treating this as just another page content type as documented under Content Types.

The JSON example should be pretty close to what you want. However, instead of using the json_encode Twig filter, you’ll want something to suppress the markdown’s default conversion to HTML. Grav’s page object has a rawMarkdown() method which you may be able to invoke through Twig (page.rawMarkdown() ??), but more likely you will need to write a simple custom Twig function. For hints, see:

Also you probably need to add your custom type to system/config/media.yaml.

Good luck with that! At the very least you should learn a lot. Let us know how you go.