SEO support is built directly into the framework. Every page automatically gets a full set of <meta> tags and OpenGraph properties in the <head>, drawn from that page's metadata block and your site-wide config defaults.
The Metadata Block
Every page file should begin with this block of HTML comments:
<!-- pagetitle: My Page Title -->
<!-- pagelayout: page-html -->
<!-- pagedate: 2024-06-15 -->
<!-- pageimage: pages/images/my-image.webp -->
<!-- pageexcerpt: A short description of this page, around 120 characters. -->
<!-- pagekeywords: keyword one, keyword two, keyword three -->
<!-- pageauthor: Jane Smith -->
<!-- pagetype: article -->
None of these fields are strictly required — the framework has fallbacks for all of them. But filling them in for every page gives search engines and social media platforms the best possible information.
Field Reference
pagetitle
The page's title. Appears as the <h1> on the page, in the browser tab, and in the OpenGraph og:title tag. If not set, the framework falls back to the page's filename (capitalised).
pagelayout
Controls which layout template is used to render the page. If not set, defaults to page-html. See the Page Layouts page for a full list of available layouts.
pagedate
The publication date of the page. Accepted formats:
YYYY-MM-DD HH:MM:SS(e.g.2024-06-15 00:00:00)m/d/Y(e.g.06/15/2024)l F jS, Y(e.g.Saturday June 15th, 2024)
The date is normalised to YYYY-MM-DD HH:MM:SS format before being written to the og:article:published_time tag. On article type pages, it is also displayed in a human-readable format beneath the page title. If not set, the file's last-modified timestamp is used.
pageimage
Path to the page's representative image, relative to the site root (e.g. pages/images/my-photo.webp). Used in the og:image tag, which controls the thumbnail shown when the page is shared on social media. If not set, falls back to $WebsiteImage from config.
pageexcerpt
A short description of the page, ideally under 160 characters. Used in <meta name="description"> and og:description. If not set, falls back to $WebsiteDescription from config.
pagekeywords
A comma-separated list of keywords for <meta name="keywords">. If not set, falls back to $WebsiteKeywords from config.
pageauthor
The author's name, used in <meta name="author">. On article type pages, it is also displayed beneath the page title. If not set, falls back to $WebsiteAuthor from config.
pagetype
The OpenGraph content type for the og:type tag. If not set, defaults to website. Accepted values: website, article, blog, profile, video, music, book, product.
Fallback Chain
The framework never outputs blank meta tags. The fallback order for every field is:
- The value set in the page's metadata block
- The site-wide default set in
config/config.php - A built-in hardcoded fallback (e.g.
"website"forpagetype, the filename forpagetitle)
You can see exactly what values a page is resolving to at any time using the Meta Debug Tool (?meta=yes).
What Gets Output
The skeleton theme's header.php outputs the following tags, populated from the metadata above:
| Tag | Source |
|---|---|
<title> |
pagetitle + $WebsiteTitle |
<meta name="description"> |
pageexcerpt |
<meta name="author"> |
pageauthor |
<meta name="keywords"> |
pagekeywords |
<link rel="canonical"> |
Current URL |
og:title |
pagetitle |
og:description |
pageexcerpt |
og:url |
Current URL |
og:image |
pageimage |
og:type |
pagetype |
og:site_name |
$WebsiteTitle |
og:locale |
$WebsiteLanguageLocale |
og:article:published_time |
pagedate (normalised) |