The Perl Advent Calendar needs more articles for 2022. Submit your idea today!

NAME

App::Phoebe::PageHeadings - use headings instead of file names

DESCRIPTION

This extension hides the page name from visitors, unless they start digging.

One the front page, where the last ten pages of your date pages are listed, the name of the page is replaced with the level one heading of your page.

If you visit a page, the name of the page is similarly replaced with the level one heading of your page.

There is no configuration. Simply add it to your config file:

    use App::Phoebe::PageHeadings;

Beware the consequences:

Every time somebody visits the main page, the main page itself is read, and the ten blog pages are also read, in order to look for the headings to use; in some high traffic situations, this could be problematic.

Every page needs to have a top level heading: the file name is no longer shown to users.

Opening pages and looking for a top level heading doesn’t do regular parsing, thus if your first top level heading is actually inside code fences (“```”) it still gets used.

Beware the limitations:

The code doesn’t do the same for requests over the web.