simov / markdown-viewer

Markdown Viewer / Browser Extension
MIT License
1.02k stars 132 forks source link

Local .md file on macOS is rendered as text using Chrome #186

Closed andy-maier closed 1 year ago

andy-maier commented 1 year ago

I am struggling to get the extension working with local files on a macOS. After giving up with Firefox, I continued with Chrome because there at least the nasty download box did not appear.

Without the markdown-viewer extension active, a local .md file renders as text in Chrome, which is fine. With the markdown-viewer extension active, a local .md file also renders as text in Chrome.

From my earlier experiments with Firefox, I had created a ~/.mime.types file, but I'm not sure whether Chrome uses that file. In any case, I tried several variations with Chrome, with the file not present, or present with text/plain md, or present with type=text/plain exts=md,mkd,mkdn,mdwn,mdown,markdown desc="Markdown document". In none of the cases did I get a Markdown rendering of the local .md file.

Do I need to do something to enable the extension? Is the extension supposed to work with local .md files in Chrome on macOS?

Versions:

andy-maier commented 1 year ago

Update: I found out that it is required to enable the "Allow access to file URLs" setting of the markdown-viewer extension, in order to get local files rendered.

Just as documented in the readme

Reading usually helps ... :-(

This issue can be closed.