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 title and description in its front matter, falling back to _config.yml. The home page has none of its own, so it uses the site title and description. The jekyll-seo-tag plugin 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 own image. 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 the category: line in its front matter. See Writing posts.
  • A sitemap at /sitemap.xml, from the jekyll-sitemap plugin.
  • A feed of your posts at /feed.xml, from jekyll-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 marked noindex and 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).

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

  1. Set url in _config.yml to 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.
  2. Write a title and description in _config.yml that say what your blog is about. Give About, Contact and every other page its own description too.
  3. Fill in author: in _config.yml.
  4. Replace assets/img/og.png with your own 1200 × 630 picture.
  5. Check that every post has an excerpt, an image and an image_alt.
  6. Switch both forms out of demo mode. See Newsletter and contact form.
  7. Decide what to do with /elements/.
  8. 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.