From 286f51a5619763c6c81f359643338693867c75e5 Mon Sep 17 00:00:00 2001 From: Dooho Yi Date: Sat, 2 May 2020 19:21:33 +0900 Subject: [PATCH] =?UTF-8?q?+=20=E2=80=98patch/pelican=5Freaders.patch.new?= =?UTF-8?q?=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- patch/pelican_readers.patch.new | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 patch/pelican_readers.patch.new diff --git a/patch/pelican_readers.patch.new b/patch/pelican_readers.patch.new new file mode 100644 index 0000000..fc01497 --- /dev/null +++ b/patch/pelican_readers.patch.new @@ -0,0 +1,32 @@ +230c230 +< def _parse_metadata(self, document, source_path): +--- +> def _parse_metadata(self, document, source_path, nowarning_about_missing_title): +236,240c236,241 +< if document.first_child_matching_class(docutils.nodes.title) is None: +< logger.warning( +< 'Document title missing in file %s: ' +< 'Ensure exactly one top level section', +< source_path) +--- +> if nowarning_about_missing_title is False: +> if document.first_child_matching_class(docutils.nodes.title) is None: +> logger.warning( +> 'Document title missing in file %s: ' +> 'Ensure exactly one top level section', +> source_path) +292,294c293,298 +< +< metadata = self._parse_metadata(pub.document, source_path) +< metadata.setdefault('title', parts.get('title')) +--- +> title = parts.get('title') +> if title: +> metadata.setdefault('title', title) +> metadata = self._parse_metadata(pub.document, source_path, nowarning_about_missing_title=False) +> else +> metadata = self._parse_metadata(pub.document, source_path, nowarning_about_missing_title=True) +410c414 +< elif self._in_head and tag == 'title': +--- +> elif tag == 'title':