Skip to content

Commit 5f71508

Browse files
committed
added before TOC PARAGRAPH
1 parent 91c6f23 commit 5f71508

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

_layouts/post.html

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,21 @@ <h1 class="posttitle">{{ page.title }}</h1>
5050
{% if page.image %}<img class="featured-image img-fluid" src="{% if page.image contains "://" %}{{ page.image }}{% else %}{{ page.image | absolute_url }}{% endif %}" alt="{{ page.title }}">{% endif %}
5151
<!-- End Featured Image -->
5252

53-
<!-- Toc if any -->
54-
{% if page.toc %}
55-
<div class="toc mt-5 mb-5 lead">
56-
<h3 class="font-weight-bold">Summary</h3>
57-
{% include toc.html html=content %}
58-
</div>
59-
{% endif %}
60-
<!-- End Toc -->
53+
6154

6255
<!-- Post Content -->
6356
<div class="article-post">
57+
<!-- Toc if any -->
58+
{% if page.toc %}
59+
{% if page.beforetoc %}
60+
<p><em>{{page.beforetoc}}</em></p>
61+
{% endif %}
62+
<div class="toc mt-4 mb-4 lead">
63+
<h3 class="font-weight-bold">Summary</h3>
64+
{% include toc.html html=content %}
65+
</div>
66+
{% endif %}
67+
<!-- End Toc -->
6468
{{content}}
6569
</div>
6670

_posts/2018-06-12-education.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: "Education must also train one for quick, resolute and effective thinkin
44
author: john
55
categories: [ Jekyll, tutorial ]
66
image: assets/images/3.jpg
7+
beforetoc: "Markdown editor is a very powerful thing. In this article I'm going to show you what you can actually do with it, some tricks and tips while editing your post."
78
toc: true
89
---
910
There are lots of powerful things you can do with the Markdown editor

0 commit comments

Comments
 (0)