zerodevx / zero-md

Ridiculously simple zero-config markdown displayer
https://zerodevx.github.io/zero-md/
ISC License
436 stars 48 forks source link

nginx example #80

Closed ssipos90 closed 1 year ago

ssipos90 commented 1 year ago

Hi,

Cool project!

I've set up an nginx docker container that serves an index.html as per the docs. I've also mounted my obsidian notes and it works fine rendering the initial md file, but whenever I click a link, the browser downloads the file from my server instead of rendering it. Do I have to do something more besides including the script tag and using the component?

 <script
      type="module"
      src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@2/dist/zero-md.min.js"
    ></script>

and

 <zero-md src="Notes/0000.md"></zero-md>

Thank you!

zerodevx commented 1 year ago

Hey sorry for the late reply. I'm assuming the link is in the contents of your markdown. What does it link to? Behaviour is exactly like a normal webpage - if the anchor links to another webpage, that webpage will be visited; if it links to a .md file for example, the browser downloads it per usual.

zerodevx commented 1 year ago

Closing this issue for now - feel free to re-open if needed.

ssipos90 commented 1 year ago

Oh, ok, so that's what I was getting (md downloads).

I thought the library allowed me to navigate md links in my notes and I didn't configure it properly somehow.