ohnonot 13a547724d fiddling with styling & ToC ids | 4 years ago | |
---|---|---|
.. | ||
LICENSE.md | 5 years ago | |
README-tagblog.md | 4 years ago | |
README.md | 5 years ago | |
TableOfContent.php | 4 years ago |
Released under the MIT license. Copyright (c) 2013 mcbSolutions.at
Additional README for changes introduced by me for the Pico CMS tagblog theme
https://notabug.org/ohnonot/tagblog/
https://framagit.org/ohnonot/tagblog/
The ToC now generates id
's from the actual header text.
If you have links in your articles that rely on the old format (id="#c1", id="#c2" etc.) you will have to replace them.
The new format is more flexible and might still find the right chapter after re-ordering an article.
This is how the id
text is generated:
$text = preg_replace('~[^\\pL0-9_]+~u', '-', $sort->nodeValue);
$text = trim($text,'-');
$text = strtolower($text);
It replaces "weird" characters with -
and makes the resulting string nice & all lowercase.
A header like "This Works (for me)" would become this-works-for-me
.