Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat/fix(#345): add configuration of toc_linenumber support #346

Merged
merged 2 commits into from
May 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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>

<% } %>