lektor/lektor-markdown-highlighter

pygments.css gets pruned

Closed this issue · 1 comments

If I perform a clean build, Lektor does the following:

$ lektor build
Started build
U index.html
U static/pygments.css
[...]
Finished build in 0.75 sec
Started prune
D static/pygments.css
Finished prune in 0.02 sec

So it inserts the Pygments style sheet in the build output, but then later removes it again. Maybe the plugin is not registering ownership of the file and therefore Lektor decides it is a left-over old file and decides to remove it?

When testing interactively I can work around it by refreshing the build from the Lektor UI, but that is not an option when building non-interactively.

I'm using version 0.2 of the plugin because of issue #6, but I don't think the commits between 0.2 and 0.3 would make any difference.

The problem seems to be that configs/markdown-highlighter.ini is set as the "source" for pygments.css, so if that ini file does not exist, there is no valid source for the style sheet and it gets pruned.