Skip to content

Commit 84fd02f

Browse files
author
Ram swaroop
committed
config added for prev/next nav
1 parent 9b64f82 commit 84fd02f

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ theme:
6363
paginate: 5
6464
paginate_path: "blog/page:num"
6565

66+
# POST NAVIGATION
67+
post_navigation: true
68+
6669
# BUILD SETTINGS
6770
markdown: kramdown
6871
highlighter: pygments

_layouts/post.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ <h1 class="title">{{ page.title }}</h1>
1616
</article>
1717

1818
<!-- Post navigation -->
19+
{% if site.post_navigation %}
1920
<div id="post_nav">
2021
{% if page.previous.url %}
2122
<a class="prev" href="{{ page.previous.url }}" {% if page.next.url == null %} style="border-right:1px solid rgba(0, 0, 0, 0.1)" {% endif %}><h3>{{ page.previous.title }}</h3> &laquo; {{ site.theme.str_prev }}</a>
@@ -24,6 +25,7 @@ <h1 class="title">{{ page.title }}</h1>
2425
<a class="next" href="{{ page.next.url }}" {% if page.previous.url == null %} style="margin-left:50%;border-left:1px solid rgba(0, 0, 0, 0.1)" {% else %} style="border-left:1px solid rgba(0, 0, 0, 0.1)" {% endif %}><h3>{{ page.next.title }}</h3> {{ site.theme.str_next }} &raquo;</a>
2526
{% endif %}
2627
</div>
28+
{% endif %}
2729

2830
<!-- Disqus -->
2931
{% if site.theme.disqus_shortname %}

0 commit comments

Comments
 (0)