Why does Jekyll generate two meta tags with charsets?

Why does Jekyll generate both of these meta tages even though I only have the <meta charset="utf-8"> in my template?

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">

Found the problem. It was the plugin ‘jekyll-loading-lazy’ that caused mayhem.

While you answered your question, I would say this is good advice to anyone reading this message.

Jekyll does not insert code into your files, but plug-ins can.

The only situation I can think of is when you use bundle exec jekyll serve --livereload. To achieve the livereload feature, Jekyll injects a little JavaScript, but that is for testing code, not when you are building the site.

1 Like