RadiusNetworks / doc_repo

MIT License
0 stars 0 forks source link

Use the file extension if it is provided #3

Closed csexton closed 7 years ago

csexton commented 8 years ago

If the slug provided has an extension try to fetch that resource from Github and render it. If there is no extension add a .md and try to fetch that.

When all else fails render a 404.

This lets us link to files the same way in the app as on github.

/ios would pull up the file from docs/ios.md

But that wouldn't work when linking between markdown files, since the first url would be a 404 when browsing the repo. So to fix that, allow linking to files ending in .md:

/ios.md would pull up the file from docs/ios.md