bubkoo / hexo-toc

📖 Insert a markdown TOC before posts be rendered.
MIT License
127 stars 17 forks source link

Is this plugin still maintained? #24

Open oupala opened 6 years ago

oupala commented 6 years ago

The activity on this git repository seems to get flat this months.

Is this plugin still maintained?

noraj commented 6 years ago

Seems like more one year without a commit or answer on issues.

oupala commented 6 years ago

Yes, you're right. And that makes me doubt about hexo. Maybe I should use another static website generator, such as hugo.

Or there might be an alternative to hexo-toc?

noraj commented 6 years ago

@oupala Hexo is good even if some plugins are not maintained sometimes. But for TOC a plugin is not mandatory: see http://hsin919.github.io/2015/02/11/Add-TOC/, you can use an external tool such as doctoc or add this in the template layout of your theme the following piece of code.

<% if(post.toc !== false){ %>
<div id="toc" class="toc-article">
    <strong class="toc-title">Table of contents</strong>
<%- toc(post.content) %>
</div>
<% } %>
oupala commented 6 years ago

I agree TOC could be generated on the writer side, when saving. But generating the TOC on static generation step, automatically, whatever the writers have installed or not, is a must have.

On the contrary, we might want to have a TOC on long articles only, which is not feasible when modifying the template.

Thanks anyway for pointing out workarounds.