Links between files in multi-file documents
Hello,
I'm trying to consolidate a multi-page wiki (i.e. https://github.com/marked2tests/wikitest/wikiI) into a single document using Marked2.
The resulting document works perfectly, apart from the fact that links between documents (that work without problems on Github) report a "missing file" error when viewed through Marked2.
Also in the final resulting export (please see https://github.com/marked2tests/wikitest/blob/master/marked2.html for an html example) links referencing portions of code originally contained in different md files do not work.
I'm sure there's something I'm missing, as I cannot get the expected result (i.e. a single html document with working internal links between sections).
Any advise or recommendation?
Thanks in advance!
- marked2.png 97.2 KB
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Paolo on 22 Jul, 2015 08:20 AM
Wiki url: https://github.com/marked2tests/wikitest/wiki
Support Staff 2 Posted by Brett on 22 Jul, 2015 01:59 PM
The links in your document are going to be file links, which of course
will look for external files that don't exist. You'd have to convert
them to anchor links (#ipsum instead of Ipsum), and have them point to a
headline with an id or manual anchor links you put into each section.
This could be done with a search and replace, or a custom preprocessor
that made the necessary changes, but it's not something Marked is going
to handle internally.
As far as code, I'm not sure how you're currently inserting it, but if
you use <<() syntax, it's going to treat the contents of the imported
file as code, and not recognize any import syntax in that document. It's
designed to import actual code files (like "example.js") and create a
code block with the contents. If the code is already in a Markedown file
and has fenced or indented code blocks, just import it as a regular file
(<<[]).
-Brett