Nokogiri adds DOCTYPEs #1

neeklamy opened this Issue Aug 16, 2012 · 1 comment


None yet

2 participants


Nokogiri adds DOCTYPEs to the body of the output, from the cheat sheet:

Generally speaking, unless you expect to have a DOCTYPE and a single root node,
you don’t have a document, you have a fragment. For HTML, another rule of thumb
is that documents have html and body tags, and fragments usually do not.

Changing line 47 from doc = Nokogiri::HTML(content) to doc = Nokogiri::HTML.fragment(content) fixes it.

Jekyll 0.11.2
Nokogiri 1.5.5


Oh man, how silly! Can't believe I didn't notice that - thanks for pointing out.


@matthewowen matthewowen added a commit that referenced this issue Aug 16, 2012
@matthewowen #1 fix: Update use of nokogiri
Fix rather silly error resulting in outputting DOCTYPE, head, etc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment