npm / marky-markdown

npm's markdown parser
https://www.npmjs.com/package/@npmcorp/marky-markdown
405 stars 71 forks source link

[QUESTION] How do I set a subdirectory? #446

Open kasbah opened 4 years ago

kasbah commented 4 years ago

Judging by https://github.com/npm/marky-markdown/pull/435 something is done on NPM to allow setting the subdirectory of the markdown file, so that relative image URLs resolve properly. How can I make use of this when using marky-markdown as a library?

I tried doing:

html = marky(markdown, {
  package: {repository: {url: 'https://..', directory: 'subdirectory/'}}
})

But that has no effect.