Log in Sign up

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.


a year ago, 6 replies   drafts   bug   Edit 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 2 years ago · Edit answer

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

Answered 2 years ago · Edit 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 2 years ago · Edit 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 a year ago · Edit answer

Ditto, I’m seeing the same behavior.

Answered a year ago · Edit 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 a year ago · Edit answer