Links between files in multi-file documents

Paolo's Avatar

Paolo

22 Jul, 2015 08:18 AM

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!

  1. 1 Posted by Paolo on 22 Jul, 2015 08:20 AM

    Paolo's Avatar
  2. Support Staff 2 Posted by Brett on 22 Jul, 2015 01:59 PM

    Brett's Avatar

    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

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Already uploaded files

  • marked2.png 97.2 KB

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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