I use a lot of Markdown docs with a linked CSS file.
That works generally fine in DTP, but when I change the CSS (in DTP or outside) the rendered version of a Markdown document linking to this CSS file does not always change, only sometimes… Looks like the CSS is cached somewhere in Devonthink.
The only certain way I know of to force using the changed CSS is shutting down DTP!!! Is there a better way?
Did you try to empty the cache, see DEVONthink menu?
Tried it - does not do the trick.
My test workflow:
- Double-click the Markdown document to view layout.
- Close Markdown document window.
- Double click the CSS file.
- Change something (say color of headers)
- Save and close CSS file.
- Click menu item Empty cache.
- Double-click the Markdown document to view layout. - Color has not changed.
- Restart DTP.
- Double-click the Markdown document to view layout. - Color has changed.
Maybe it’s a limitation of the WebKit, we’ll check this.
Thanks for this. I’m curious what you find out.
Right-click and convert the file to HTML to preview the change has been made.
This often will immediately affect the rendering of the Markdown file when subsequently viewed.
@BLUEFROG Clever ideam but unfortunately this does not work: The converted HTML file is still displayed with the old style sheet information.
@cgrunenberg The HTML source does use the correct in-database path in the LINK tag drawing in the CSS file. So I assume it has nothing to do with Markdown or HTML but with the fact that DTP somehow caches the CSS file itself.
Would be great to be able ti flush this cache without restarting DTP…
Clever ideam but unfortunately this does not work: The converted HTML file is still displayed with the old style sheet information.
You have something else going on, and yes potentially a cached file. I use this mechanism whenever I run into this issue and it works without fail.
Actually DEVONthink doesn’t cache this on its own (otherwise this would be easy to fix ) but the WebKit might.
Makes sense. Any chance to trigger a WebKit refresh in DTP?
It’s not a cache issue of the WebKit either (or emptying the cache doesn’t work as expected) but the next maintenance release will slightly revise the handling, maybe this will help.
FYI for anyone finding this thread and wondering about other solutions: I describe a simple method in another posting that is useful for iterating CSS designs.