Permalink
Browse files

markdown syntax bump. support description

  • Loading branch information...
Hsiaoming Yang
Hsiaoming Yang committed Mar 23, 2013
1 parent 50e2375 commit 770aeb9cf3759a6b1389f1ed1962149c0c429fa0
@@ -3,6 +3,9 @@
{% block main %}
<div class="hentry">
<h1 class="entry-title">{{post.title}}</h1>
+ {%- if post.description %}
+ <div class="entry-description">{{post.description}}</div>
+ {%- endif %}
<div class="entry-content">
{{post.content}}
</div>
@@ -10,6 +10,8 @@
- category: life
- tags: tag1, tag2
+ Here is the description.
+
-----------------
Your content here. And it supports code highlight.
@@ -86,6 +88,9 @@ def _parse_meta(self, header):
value = item[index + 1:].lstrip()
meta[key] = value
+ desc = re.findall(r'<p>(.*?)</p>', header, re.S)
+ if desc:
+ meta['description'] = '\n\n'.join(desc)
return meta
@@ -2,6 +2,8 @@
- tags: tag1, tag2
+Here is a description.
+
------
first line

2 comments on commit 770aeb9

@microjo

This comment has been minimized.

Show comment
Hide comment
@microjo

microjo Mar 29, 2013

Contributor

what's the difference between summary meta and this new description?

Contributor

microjo replied Mar 29, 2013

what's the difference between summary meta and this new description?

@lepture

This comment has been minimized.

Show comment
Hide comment
@lepture

lepture Mar 29, 2013

Collaborator

@microjo I will merge them.

Collaborator

lepture replied Mar 29, 2013

@microjo I will merge them.

Please sign in to comment.