Skip to content

Commit ce3fd44

Browse files
committed
Add theme.index_widgets to display widgets at the bottom of index pages (pagination == 2)
1 parent cf1583a commit ce3fd44

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

_config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ widgets:
1717
- archive
1818
#- recent_posts
1919

20+
# display widgets at the bottom of index pages (pagination == 2)
21+
index_widgets:
22+
# - category
23+
# - tagcloud
24+
# - archive
25+
2026
# widget behavior
2127
archive_type: 'yearly'
2228
show_count: false

layout/_partial/archive.ejs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
}) %>
1313
</nav>
1414
<% } %>
15+
<% if ( theme.index_widgets !== null ){ %>
16+
<% theme.index_widgets.forEach(function(widget){ %>
17+
<%- partial('_widget/' + widget) %>
18+
<% }) %>
19+
<% } %>
1520
<% } else { %>
1621
<% var last; %>
1722
<% page.posts.each(function(post, i){ %>

0 commit comments

Comments
 (0)