.rst

2.4 What's the standard filename extension for a reStructuredText file?
It's ".txt". Some people would like to use ".rest" or ".rst" or ".restx", but why bother? ReStructuredText source files are meant to be readable as plaintext, and most operating systems already associate ".txt" with text files. Using a specialized filename extension would require that users alter their OS settings, which is something that many users will not be willing or able to do.

.rst.txt

This is openable by normal text editors, but also indicates that it's formatted using reStructuredText, so it can be rendered nicely by things like GitHub. It's better than both .txt and .rst alone.

.md

*.md are recognized by GitHub and rendered nicely, but not generally understood by plain text editors. There are a million other proposed extensions for markdown files, which alone is a problem:

.markdown

.mdown

.mkdn

.md

.mkd

.mdwn

.mdtxt

.mdtext

.text

The official extension is .text, but this is stupid, because it's already used for other incompatible formats and doesn't in any way indicate "markdown" for the benefit of renderers or syntax highlighting.

.md.txt

This is better than .md, .txt, or .text alone. Still openable by normal text editors, but also indicates that it's formatted using Markdown, without any other metadata in the file itself, so it could be rendered nicely by things like GitHub (but currently isn't).

Additionally, embedded documents with file names ending in .md.txt will also be displayed using markdown without needing the @pagedown preamble.

Tip: Using markdown with .md.txt and .txt files instead of .wiki ones has the advantage that browsers not supporting Javascript will still render the embedded document page in a readable way (a preformatted version of the raw text). Also, the .txt extension has a meaning outside of Fossil.

Tip: Since .md.txt files don't need the @pagedown preamble, they are pure markdown documents which can be converted straight away into other formats using other markdown tools.