# Show text file for post?

I've seen with other blogging engines that you can append ".md" or ".txt." to the end of a URL to see the raw text for that given post. Is that possible with Blot posts?

4 replies

If you append the query string ?source=true to any post or page on your Blot site, Blot will redirect you to the source file for that post. Would that work?

For example:

You could embed this link in your template, here's a rough sketch for what to add to say entry.html:

...
{{#entry}}
...
<a href="{{{url}}}?source=true">View source</a>
...
{{/entry}}
...

Oh, cool! That's a good start. I thought I could get clever, but it looks like a redirect like this doesn't work.

From: {{{url}}}.md
To: {{{url}}}?source=true

Would there be a redirect rule that could make appending ".txt" or ".md" (which would be a little more friendly to explain without adding the "View source" link to every entry) work?

Try something like this:

from: /(.*)\.md
to: /\$1?source=true