1
0
Fork 0
forked from github/pelican

update documentation and remove commented out code

This commit is contained in:
dave mankoff 2013-01-28 22:25:15 -05:00
commit d5bfec3a8b
2 changed files with 3 additions and 12 deletions

View file

@ -202,23 +202,17 @@ of ``meta`` tags, the title out of the ``title`` tag, and the body out of the
<meta name="date" contents="2012-07-09 22:28" />
<meta name="category" contents="yeah" />
<meta name="author" contents="Alexis Métaireau" />
<meta name="summary" contents="Short version for index and feeds" />
</head>
<body>
This is the content of my super blog post.
<!-- PELICAN_END_SUMMARY -->
Content continues down here.
</body>
</html>
With HTML, there are two simple exceptions to the standard metadata. First,
With HTML, there is one simple exception to the standard metadata.
``tags`` can be specified either with the ``tags`` metadata, as is standard in
Pelican, or with the ``keywords`` metadata, as is standard in HTML. The two can
be used interchangeably. The second note is that summaries are done differently
in HTML posts. Either a ``summary`` metadata tag can be supplied, or, as seen
above, you can place an HTML comment, ``<!-- PELICAN_END_SUMMARY -->``, that
Pelican will recognize. Everything before the comment will be treated as a
summary. The content of the post will contain everything in the body tag, with
the special comment stripped out.
be used interchangeably.
Note that, aside from the title, none of this metadata is mandatory: if the date
is not specified, Pelican will rely on the file's "mtime" timestamp, and the

View file

@ -226,9 +226,6 @@ class HTMLReader(Reader):
self._data_buffer += self.build_tag(tag, attrs, True)
def handle_comment(self, data):
# if self._in_body and data.strip() == 'PELICAN_END_SUMMARY':
# self.metadata['summary'] = self._data_buffer
# else:
self._data_buffer += '<!--{}-->'.format(data)
def handle_data(self, data):