reference between deck #243
-
when I reference a deck(a.md) in another deck (b.md), and then I used I want to have the correct link in possible? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
For to respect exact intent of the document author, Marp has no implicit replaces for hyperlink URLs when converted Markdown to HTML. Thus, If you have expected slides as published as a bunch of HTML, is there a reason why not set URL as ending with If you really need, Marp CLI can define a custom plugin through // engine.js
module.exports = ({ marp }) => marp.use((md) => {
const { normalizeLink } = md
md.normalizeLink = (...args) => {
const originalResult = normalizeLink(...args)
// Replace URL: ".md" -> ".html"
return originalResult.replace(/\.md$/, '.html')
}
}) npx marp --engine ./engine.js a.md Marp/Marpit is based on markdown-it, and |
Beta Was this translation helpful? Give feedback.
For to respect exact intent of the document author, Marp has no implicit replaces for hyperlink URLs when converted Markdown to HTML. Thus,
.md
extension in URL within converted HTML still will become.md
.If you have expected slides as published as a bunch of HTML, is there a reason why not set URL as ending with
.html
instead of.md
?If you really need, Marp CLI can define a custom plugin through
engine.js
.