Don't generate excerpts for non-html pages (#8234)

Merge pull request 8234
This commit is contained in:
Ashwin Maroli
2020-06-08 18:09:50 +05:30
committed by GitHub
parent 0bb04d45c7
commit ee20e844aa
5 changed files with 16 additions and 3 deletions

View File

@@ -190,7 +190,7 @@ module Jekyll
def excerpt
return if excerpt_separator.empty? || !site.config["page_excerpts"]
return data["excerpt"] unless self.class == Jekyll::Page
return data["excerpt"] unless self.class == Jekyll::Page && html?
data["excerpt"] ||= Jekyll::PageExcerpt.new(self).to_liquid
end