When designing a custom Koken theme you should always keep SEO (search engine optimization) in mind. This guide will contain recommendations and best practices for you to follow.
Every theme's template should include the standard set of document
<head> tags you know and love. Here's some example markup you can use to get started:
<head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <!-- Publishes dynamic author, description and keyword HTML tags --> <koken:meta /> <!-- Publishes dynamic page title --> <koken:title /> </head>
The global values for the
<koken:title /> and
<koken:meta /> tags are controlled through Settings > Site Publishing inside Koken. When a page on your site is loaded, Koken will automatically append content data to both of these tags. For example, a content page's title would include the image's title plus the global site title (e.g., "Image title / Site title) and the
meta tags would include the image's caption and tags (published as keywords).
img alt attributes
When publishing an image using
<koken:img />, Koken automatically assigns the image's title as its
alt attribute. These
alt properties are important for they tell Google and other search engines what an image is about. If a title isn't assigned, filename is used instead. If you don't want Koken to publish
alt, you may override it with a null value:
<koken:img alt="" />
Canonical links are important because some pages (most notably content.lens) may be accessed through multiple URLs. That's bad for SEO, so Koken automatically publishes canonical meta tags in the
<head> of any page that needs one. For example:
<link rel="canonical" href="http://yoursite.com/content/image-title/">
This is handled for you automatically, so there's nothing you need to edit or modify.
When creating markup for your theme you should always keep semantics in mind. Meaning, use HTML tags that adequately describe the content being presented and try to structure your content hierarchically. In general, lots -- and we mean lots -- of articles have been written about semantic markup, so dive in.
SEO isn't just about search engines, but social media too. We've published a separate article on integrating social media metadata and links that should be followed as well.