Daizu::Plugin::HeaderAnchor - add anchors to headings in all articles
This plugin filters articles and adds anchors (a elements with an id attribute but no href attribute) to all the headings (from h1 to h6). This allows people to link to a specific section of your web page.
a
id
href
h1
h6
The names used for the anchors are based on the textual content of the headings. All the names have a sec- prefix added.
sec-
Care is taken to ensure that anchor names aren't duplicated, although if the templates add any which start with the same prefix then it would be possible to get a duplicate value. Anchors are not added to headings which already contain an a element with either a name or id attribute.
name
To turn on this plugin, include the following in your Daizu CMS configuration file:
<plugin class="Daizu::Plugin::HeaderAnchor" />
Registers the plugin as a filter for all articles at or in $path.
$path
Does the actual filtering in-place on $doc and returns it. Currently $cms and $file are ignored.
$doc
$cms
$file
This software is copyright 2006 Geoff Richards <geoff@laxan.com>. For licensing information see this page:
http://www.daizucms.org/license/
To install Daizu, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Daizu
CPAN shell
perl -MCPAN -e shell install Daizu
For more information on module installation, please visit the detailed CPAN module installation guide.