Your sites Log in Sign up Menu

What to do with HTML files that are duplicating md files?

Most – though not all – of my blog posts, which are written in md, appear to have an html equivalent. The filename is exactly the same, just with the html extension, e.g. filename.md has a filename.md.html twin.

What is causing this and what should I do now to clear out the current html files and in the future to stop them appearing in the first place?

I'm using Git to sync my posts, if that makes any difference.

Thanks.


4 months ago, 6 replies   drafts   bug   Improve this question

Those are local previews of your posts that use your theme. You can open them on a computer to see what your post will look like once it’s published. They are only generated for drafts, and they remove themselves when the Markdown file is published as a post.

Answered a year ago · Improve this answer

Are these files appearing for posts that are not drafts? If so, this might be a bug

Answered a year ago · Improve this answer

I upload drafts, then preview online, then when I’m happy to publish, I set draft to no. The html files stick around, however.

Answered a year ago · Improve this answer

I'm seeing the same behavior. Wrote the post with YAML draft set to 'yes', then updated to 'no', and the HTML file persists. Published the post about an hour ago.

example

Answered 4 months ago · Improve this answer

Ditto, I’m seeing the same behavior.

Answered 4 months ago · Improve this answer

You might have to remove the preview file yourself for drafts set in metadata – I will investigate why these are not automatically removed

Answered 4 months ago · Improve this answer