toc icon indicating copy to clipboard operation
toc copied to clipboard

feature idea: alternative heading text value for SEO reasons

Open nikolastanin opened this issue 2 years ago • 1 comments

H2 added in content(or any other heading) appears as is in the content table list item, but sometimes I want to use a shorter version for SEO reasons...

actual h2 : <h2 id="text"> iPhone 15 Pro : Specs and Features Reviewed</h2>

output: <li><a href="#text"> iPhone 15 Pro : Specs and Features Reviewed</a></li>

I would like to have something like this: actual h2 : <h2 id="text" data-alternative-text="iPhone 15 Pro"> iPhone 15 Pro : Specs and Features Reviewed</h2> output: <li><a href="#text"> iPhone 15 Pro</a></li>

So if specified we use the data-alternative-text="" value instead. If not specified just carry on as usual.

Hope this seems like a reasonable idea :) Cheers!

nikolastanin avatar Oct 09 '23 17:10 nikolastanin

actually while looking more deeply in the code i found out title="xxxxx" can be used.

nikolastanin avatar Oct 09 '23 17:10 nikolastanin