Skip to content

Commit

Permalink
feat/fix(#345): add configuration of toc_linenumber support
Browse files Browse the repository at this point in the history
Merge pull request #346 from viosey/feat/toc
  • Loading branch information
neoFelhz authored May 15, 2017
2 parents d5fa0d6 + 7d05796 commit 57d2ce7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions _config.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ qrcode:
# Menu Settings
# ---------------------------------------------------------------

# TOC Button

toc:
# use: choose whether the line_number of toc will show or not.
# Available value of "linenumber": true | false
linenumber: true

# SNS Menu
sns:
email: youremail@email.com
Expand Down
4 changes: 3 additions & 1 deletion layout/_partial/toc_button.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ul class="post-toc-wrap mdl-menu mdl-menu--bottom-left mdl-js-menu mdl-js-ripple-effect" for="post-toc-trigger-btn" style="max-height:80vh; overflow-y:scroll;">
<%- toc(page.content, {
class: 'post-toc',
list_number: true,
list_number: <%= theme.toc.linenumber %>,
style: 'max-height:80vh; overflow-y:scroll;'
}) %>
Expand All @@ -33,5 +33,7 @@
Some Action
</li>
-->
</ul>
<% } %>

0 comments on commit 57d2ce7

Please sign in to comment.