One file drop-in Markdown file browser and viewer for text files served using basic directory listing.
markdown.html
is designed to be a drop-in file browser and viewer that does not require any configuration or other files.
To use it, copy the ./src/markdown.html
file into a folder that is served over HTTP using the web server's folder listing functionality. markdown.html
basically uses the folder listing as an API for enumerating the files and folders. It should work with almost any web server, but it has only be tested against NGINX, Apache, and IIS.
- Only 1 file with zero external dependencies
- Viewer for text files with syntax highlighting and markdown rendering
- Sharable URL that will load
markdown.html
with the same document and folder location - Text file metadata (file size, mime-type, etc)
- Keyboard shortcuts (press
?
to see the list) - May be installed as a PWA (Progressive Web App) app. Dynamically generated inline data URI manifest file.
SVG images
are inlined- Social media metadata (
og:\*
,twitter:\*
) - Support for viewing text files directly from OneDrive and Google Drive. You must supply the appropriate keys in the
app.options.cloud
AND register your app with Microsoft and/or Google. Instructions are in the code.markdown.html
also must be served over HTTPS for the Microsoft and Google auth flows to work. Remix this Glitch to easily check it out over HTTPS with your own API keys.
The latest version of these browsers is supported:
- Edge (Chromium)
- Firefox
- Safari (Mac, iPadOS, iOS)
- Chrome
The latest version of these web servers (others may work as well):
- NGINX (
autoindex
on) - Apache (
mod_autoindex
) - IIS (enable
Directory Browsing
)
markdown.html
uses `folder.api to consume HTTP directory listings like an API
© 2020 Paul Ellis