SEO and analytics
Page titles and descriptions#
Every page file starts with a title and a description:
{
"title": "Our story",
"description": "How a waterfront dining room built its menu around twelve local farms.",
"sections": [ … ]
}The browser tab and search results show Our story | Your name. Keep titles short and descriptions around 150 characters. Pages without a description use your tagline. Generated detail pages use placeholders, e.g. "title": "{item.title}", so each one gets its own title.
In the HTML files, change the <title> and <meta name="description"> in each page's <head>.
Sharing on social media#
Each page includes Open Graph tags, so a shared link shows the page title and description. To add a picture to shared links, put a 1200 × 630 px image online and set its full address:
"shareImage": "https://yourdomain.com/assets/img/share.jpg"A demo can set its own shareImage in demo.json, and a page in its page file.
Analytics, chat widgets and other code#
Paste snippets from analytics, chat or advertising tools into site.json. The build places them on every page:
"headHtml": "<script async src=\"https://www.example-analytics.com/script.js\" data-site=\"yourdomain.com\"></script>",
"bodyEndHtml": ""headHtmlgoes at the end of<head>(where most tools ask you to put their code).bodyEndHtmlgoes just before</body>.- Inside JSON, put a backslash before every double quote in the snippet (
\"), as in the example. - A demo can add its own with
headHtml/bodyEndHtmlindemo.json, and a single page withheadHtmlin its page file.
In the HTML files, paste the snippet before </head> on every page.
Good habits#
- Every page has one main heading (
h1) from its first section. Keep it descriptive. - Give every image meaningful text: the title or name fields are used as the image's
alttext. - Use your own photos compressed to a sensible size (see Images); fast pages rank better.
- Once your site is live, add it to Google Search Console and submit your home page.