# Document base url

#### 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 Posted by Brett on 10 Mar, 2013 02:21 AM

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. Posted by mike on 28 Apr, 2019 02:30 AM

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 Posted by Brett on 28 Apr, 2019 02:47 AM

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

- Brett

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

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

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

### »

#### 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 Blurs the current field

### Comment Form

r Focus the comment reply box Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

## Recent Discussions

 13 Feb, 2020 09:22 PM Markdown Formatting 11 Feb, 2020 11:53 AM Custom themes not working 10 Feb, 2020 06:48 PM KaTex Preview Update 06 Feb, 2020 04:32 PM Using mermaid in Marked 2 29 Jan, 2020 12:45 AM MathJax rendering errors - Scrivener

## Recent Articles

 Using JavaScript in Marked Custom CSS: Writing custom CSS for Marked License code has already been utilized Highlight sentences longer than a certain number of words How do I retrieve a lost license (direct version)