Document base url

Sébastien Gaïde's Avatar

Sébastien Gaïde

06 Feb, 2013 10:25 AM

Hi,

First thanks for this great tool. I try all markdown previewers/editor when a new one comes in, and I'm still using the Marked/Byword combination.

Since a few days now I work with markdoc to build a site. In my .md files I use some relative and/or absolute urls, like /images/icon.png. I can preview my images using Marked after creating a symbolic link (/images -> /my/markdoc/project/images/folder), but it's really a hack at this stage.

I have a local http server, to test the site during the development, and it would be really great to be able to set a document base url somewhere in the prefs (like http://localhost/) so that /images/icon.png will be displayed by fetching http://localhost/images/icon.png

I saw a few discussions about a base url in the forum, many of them file system oriented. One of then saying the feature will be available sometimes in the future. Is it still planned to have that ?

thanks a lot,

Sébastien.

  1. Support Staff 1 Posted by Brett on 10 Mar, 2013 02:21 AM

    Brett's Avatar

    It's on the long list. In the next version Marked is automatically setting a base url in the preview based on the document location, and omitting it from the export to avoid issues. It's a matter of making everybody's individual situations work. A custom option is my current plan, but I'm not sure when I'll have a chance to implement it yet.

  2. 2 Posted by mike on 28 Apr, 2019 02:30 AM

    mike's Avatar

    Need help.

    It seems Marked begin exporting this 'base href' automatically? I thought I was going crazy with my server config for several hours before I discovered this new line being created in my html export...??

  3. Support Staff 3 Posted by Brett on 28 Apr, 2019 02:47 AM

    Brett's Avatar

    Apparently my fix for this in the last update didn't solve it… I'll get another fix out soon.

    - Brett

  4. 4 Posted by mike on 28 Apr, 2019 03:07 AM

    mike's Avatar

    False alarm on my part. I failed to get that latest update. It seems to be fixed now in 2.5.33 (974).

Reply to this discussion

Internal reply

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

Attaching KB article:

»

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