Browse Source

Remove <p> elements from autogenerated post excerpts

Michael Rose 3 years ago
parent
commit
e0b091cfb9
3 changed files with 5 additions and 5 deletions
  1. 1
    1
      articles/index.md
  2. 1
    1
      blog/index.md
  3. 3
    3
      index.html

+ 1
- 1
articles/index.md View File

@@ -7,6 +7,6 @@ search_omit: true
7 7
 
8 8
 <ul class="post-list">
9 9
 {% for post in site.categories.articles %} 
10
-  <li><article><a href="{{ site.url }}{{ post.url }}">{{ post.title }} <span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time></span>{% if post.excerpt %} <span class="excerpt">{{ post.excerpt }}</span>{% endif %}</a></article></li>
10
+  <li><article><a href="{{ site.url }}{{ post.url }}">{{ post.title }} <span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time></span>{% if post.excerpt %} <span class="excerpt">{{ post.excerpt | remove: '<p>' | remove: '</p>' }}</span>{% endif %}</a></article></li>
11 11
 {% endfor %}
12 12
 </ul>

+ 1
- 1
blog/index.md View File

@@ -7,6 +7,6 @@ search_omit: true
7 7
 
8 8
 <ul class="post-list">
9 9
 {% for post in site.categories.blog %} 
10
-  <li><article><a href="{{ site.url }}{{ post.url }}">{{ post.title }} <span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time></span>{% if post.excerpt %} <span class="excerpt">{{ post.excerpt }}</span>{% endif %}</a></article></li>
10
+  <li><article><a href="{{ site.url }}{{ post.url }}">{{ post.title }} <span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time></span>{% if post.excerpt %} <span class="excerpt">{{ post.excerpt | remove: '<p>' | remove: '</p>' }}</span>{% endif %}</a></article></li>
11 11
 {% endfor %}
12 12
 </ul>

+ 3
- 3
index.html View File

@@ -6,7 +6,7 @@ search_omit: true
6 6
 ---
7 7
 
8 8
 <ul class="post-list">
9
-{% for post in site.posts limit:10 %} 
10
-  <li><article><a href="{{ site.url }}{{ post.url }}">{{ post.title }} <span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time></span>{% if post.excerpt %} <span class="excerpt">{{ post.excerpt }}</span>{% endif %}</a></article></li>
9
+{% for post in site.posts limit:10 %}
10
+  <li><article><a href="{{ site.url }}{{ post.url }}">{{ post.title }} <span class="entry-date"><time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%B %d, %Y" }}</time></span>{% if post.excerpt %} <span class="excerpt">{{ post.excerpt | remove: '<p>' | remove: '</p>' }}</span>{% endif %}</a></article></li>
11 11
 {% endfor %}
12
-</ul>
12
+</ul>

Loading…
Cancel
Save