11 Apr 2021 19:09:54 UTC
- Distribution: Statocles
- Module version: 0.098
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (115)
- Testers (74 / 198 / 9)
- KwaliteeBus factor: 1
- % Coverage
- License: perl_5
- Perl: v5.16.0
- Download (484.85KB)
- MetaCPAN Explorer
- Subscribe to distribution
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
- This version
- Latest version++ed by:10 non-PAUSE users
- SEE ALSO
- COPYRIGHT AND LICENSE
Statocles::Page - Base role for rendering files
The site this page is part of.
The application this page came from, so we can give it to the templates.
The absolute URL path to save this page to.
The MIME type of this page. By default, will use the path's file extension to detect a likely type.
The date of this page. Used for last updated date and blog post dates.
A hash of additional template variables for this page.
The markdown object to render document Markdown. Defaults to the markdown attribute from the Site object.
Any object with a "markdown" method will work.
How frequently a search engine should check this page for changes. This is used in the sitemap.xml to give hints to search engines.
Should be one of:
always hourly daily weekly monthly yearly never
NOTE: This is only a hint to search engines, not a command. Pages marked
hourlymay be checked less often, and pages marked
nevermay still be checked once in a while.
neveris mainly used for archived pages or permanent links.
How high should this page rank in search results compared to similar pages on this site? This is used in the sitemap.xml to rank individual, full pages more highly than aggregate, list pages.
Value should be between
1.0. The default is
This is only used to decide which pages are more important for the search engine to crawl, and which pages within your site should be given to users. It does not improve your rankings compared to other sites. See the sitemap protocol for details.
A Mojo::DOM object containing the HTML DOM of the rendered content for this page. Any edits made to this object will be reflected in the file written.
Editing this DOM object is the recommended way to edit pages.
Returns true if the page can render a DOM
my %vars = $page->vars;
Get extra template variables for this page
my $html = $page->render( %vars );
The result of this method is cached.
my $name = $page->basename;
Get the base file name of this page. Everything after the last
my $dir = $page->dirname;
Get the full directory to this page. Anything that isn't part of "basename".
There will not be a trailing slash unless it is the root directory.
A page that renders a single document.
A page that renders a list of other pages.
Doug Bell <firstname.lastname@example.org>
This software is copyright (c) 2016 by Doug Bell.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
|s||Focus search bar|
|?||Bring up this help dialog|
|g p||Go to pull requests|
|g i||go to github issues (only if github is preferred repository)|
|g a||Go to author|
|g c||Go to changes|
|g i||Go to issues|
|g d||Go to dist|
|g r||Go to repository/SCM|
|g s||Go to source|
|g b||Go to file browse|