CSS for Markdown not used/found

I have an old issue with CSS for Markdown again:

In the location ```

_resources / default.css

I have a CSS file. This is referenced in a Markdown file at the location

entries / MyDoc.md

Demo database with the CSS and the document is attached.
<a class='attachment' href='//devontech-discourse.s3.dualstack.us-east-1.amazonaws.com/uploads/original/2X/5/51f30322564dd1cba7ec59ac17b557d76bb305f5.zip'>css-links 2018-12-26.dtBase2.zip</a> (7.87 KB)


have you tried to use " " in front of the md-document as there “style.css” is your css file?

Hope that helps.

You cannot use an underscore before a name like this (remembering and underscore is a reserved character in Markdown, not just MultiMarkdown). This is clearly documented in MultiMarkdown’s documentation.

Also, Steffi’s suggestion of standard method of using is a good one, regardless. (I actually use this method all the time.)
Using either method with the reference URL also works.

Thanks Steffi for the suggestion.

Unfortunately it does not seem to work for my default.css. If I add the LINK tag line (after the MultiMarkdown header which I need for other things) the CSS file is still not picked up.

The whole demo Markdown document now looks like this:

Title: My Markdown

<link rel="stylesheet" type="text/css" href="/_resources/default.css">

# [%Title]


It does work however when I put the style sheet in the same group as the document, then I use the line ```

But if I need to use a CSS file in one fixed location for all Markdown files referenced with an absolute path, how do I do it? Either I do something wrong or is this a bug in DTP?

Many thanks,

If I am not mistaken, Fletcher talks in the the Metadata block paragraph about metadata keys (that is what’s left of the colon), not about the values (right of the colon). As values the MultiMarkdown metadata block expects IMHO a string, which in the case of the CSS key is interpreted as a path or URL. - And paths and URLs can contain underscores, can’t they?

Furthermore the HTML tag line

<link rel="stylesheet" type="text/css" href="/_resources/default.css">

doesn’t seem to work either, so I don’t think it is a problem with the Metadata block.

Criss would have to look into this (and people are on holiday schedules right now). Perhaps there’s a parse issue, but you could also take the underscore off and it would work.

Thanks Jim. Would be great if you could pass it on to Criss when he comes back. And I’d appreciate it a lot if he could post an update here when he looks into the underscore issue. Thanks again.

(The reason I want to use the underscore is that directories/groups with an underscore get sorted in DEVONthink and in the default filesystem listings above - i.e. separated from - the normal directories/groups.)

Hi HelloLeo,

try the following:

delete the quotes in the href-section like this: href=/_resources/default.css>

After restarting DTPO it will work.

Having said that, I would not recommend to use it that way. Instead I would prefer to use the UUID of the style.css (default.css) with a link like this:

without the quotes.

Using the second way, it does not matter in which folder the css file is as the UUID will find it and more importantly you do not have to worry about the underscore.

For both ways: Please note, if you change the style file you would need to restart the application in order to apply the style to your markdown docs.

Hope that helps.

Thanks, Steffi.

My main aim is to have the Markdown files viewable (when converted to HTML via MultiMarkdown) outside DEVONthink, that’s why I have them on the file system on their own volume which I just index with DEVONthink.

This works mainly pretty well and I am happy to harness DEVONthink’s great search power for this, but using the DEVONthink item link is obviously not an option in this use case.