Spica Jekyll documentation
SEO and sharing
What Spica does for search engines and social sharing without any setup, how to keep pages out of search, and what to set before you launch.
What Spica does for you
- Titles and descriptions. Each page gets a title and a description, from
titleanddescriptionin its front matter, falling back to_config.yml. The home page has none of its own, so it uses the sitetitleanddescription. Thejekyll-seo-tagplugin writes them, along with the canonical address. - Social sharing. Open Graph and Twitter tags with a sharing image. A page without a picture of its own uses
spica.share_image(/assets/img/og.png). A post or project shares its ownimage. See Writing posts. - Breadcrumbs. Posts and category pages carry breadcrumb data, so search results can show “Home > Design > Post title”. This works for a category once it has a page in
category/, with thecategory:line in its front matter. See Writing posts. - A sitemap at
/sitemap.xml, from thejekyll-sitemapplugin. - A feed of your posts at
/feed.xml, fromjekyll-feed, linked from every page and from the footer’s RSS link. - Pages kept out of search. The search page, the thank-you page, the 404 page and the
/style-guide/page are markednoindexand left out of the sitemap. - Clean HTML. One main heading per page, headings in order, real links, a skip link, labeled form fields, and the whole page’s CSS inline by default, which helps speed.
The /elements/ page is the one demo page that is indexed. It’s useful while you build, but you probably don’t want it public. Delete elements.md, or hide it by adding two lines to its front matter (see below).
Keeping a page out of search
To hide any page, post or project from search engines, add these two lines to its front matter:
noindex: true
sitemap: false
noindex: true asks search engines to skip the page. sitemap: false takes it out of the sitemap too.
Analytics and site verification
Put any tags for the <head> of every page in _includes/custom-head.html. Use it for analytics and for site verification, such as Google Search Console or Bing. Paste the code your provider gives you into the file, below the comment at the top. Theme updates never change this file, so copy it across when you update.
Before you launch
- Set
urlin_config.ymlto your real address, with no slash at the end. Sharing tags, the sitemap, the feed and the thank-you redirect of Formspree and Web3Forms all need it. - Write a
titleanddescriptionin_config.ymlthat say what your blog is about. Give About, Contact and every other page its owndescriptiontoo. - Fill in
author:in_config.yml. - Replace
assets/img/og.pngwith your own 1200 × 630 picture. - Check that every post has an
excerpt, animageand animage_alt. - Switch both forms out of demo mode. See Newsletter and contact form.
- Decide what to do with
/elements/. - Add your site to Google Search Console and submit
https://your-domain.com/sitemap.xml.
Checking it
- Paste your address into PageSpeed Insights for speed, accessibility and SEO scores. Spica is aimed at a score of 100.
- The Rich Results Test shows the structured data search engines see.
- To check social sharing, paste a post’s address into a draft post on a social network before publishing it.