GreenHat SBS website configuration

The website’s configuration settings are in the _config.yaml file. For more information about YAML data, see: Or if you find that a bit dry there’s a brief introduction here:

Main settings

Here are some of the most important website config parameters:

cache(optional) switch on caching. See the How-To for more details.
copyright(compulsory) The copyright statement for your site.
defaultArticleImage(recommended) This is an image that will be used as a default when your article is pushed out to external sites (like via RSS, for example). This is only used if the article itself has no images of its own.
defaultAuthor(compulsory) This is the author to be used if you do not specify one in your article's front-matter. This is a pointer to tag in the authors block. See next section for details.
description(compulsory) The description of your website.
devAddr(optional) The local website address for development runs. Defaults to
devPort(optional) The local website port for development runs. Defaults to 8081.
generateSchema(optional) If you want to stop the generation of schema, set this to false. This flag is true by default. See here for more details: Schema
googleAnalytics(optional) If you want Google Analytics tracking, set this to your Google Analytics ID.
headerLogo(optional) If you want a logo in your header by way of the default templates, specify it here.
imageExts(optional) Specifies the file extensions that are to be treated as image files. By default these will be: gif, jpg, jpeg, png, webp, tiff and svg.
imageSizes(optional) Specifies the images sizes you want to generate. See the section on images for more details.
lang(optional) The language of this site. It's used in the HTML section and defaults to 'en'.
lazyload(optional) Set this to 'true' if you want to lazy load images. Other changes are necessary: see the section on lazyloading.
msgLevel(optional) This controls the level of output you see when you run SBS to build your site. Available options (in descending order of importance) are: critical, error, alert, notice, warning, info, advice, debug and trace. By default it will be set to 'advice' and it's highly recommended you use 'warning' or below.
postsPerHomePage(optional) This is the number of posts you want per page when visiting the home page. The default is 30.
prodUrl(compulsory) The root URL of your live site.
siteLogo(recommended) An over all logo for your site. This is not an icon and it should be a minimum of 768px wide. NOTE: all images are root-relative, so specify the path to the image without the leading domain name.
scssCompile(optional) This lists the SCSS files you want SBS to compile. By default it will just compile /assets/main.scss. See the section about Styles and CSS for more details.
showBreadcrumbs(optional) Setting this to true will display breadcrumbs at the top of most pages. The default is false. You can read more about this here: Breadcrumbs
title(compulsory) The title of your website.
useCatTagIcons(optional) If you want to display icons for categories and tags (on the category and tag pages), set this to 'true'. Note that you will have to create these icons yourself in the '/assets/caticons' and '/assets/tagicons' directories respectively. Such icons must be named: icon_slug-name.png, where 'slug-name' is a slug for your category or tag (ie. spaces are converted to a '-').
wantRelatedPosts(optional) If you want SBS to find a list of related posts and display it below your articles, set this to 'true'. SBS does this by comparing an article's tags.
wantShareLinks(optional) If you want various share link icons after your articles, set this to 'true'.

Authors block

The authors block looks something like this:

    name: Feed Blogs
    url: /about
    sameAs: [,]
author-tag(compulsory) This is a tag used to refer to this author. It's what you will use in your article's front matter to specify the author.If you do not specify an author, the 'defaultAuthor' specified in the section above will be used.
name(compulsory) The name of the author.
url(optional) A URL with more information about the author. This will be linked to from the author's byline.
sameAs(optional) This specifies social media IDs that represent this particular author.

Publisher block

The publisher block looks something like this:

  name: Publisher Name
  logo: /assets/images/whatever-60x60.png
  sameAs: [,]
  description: Publisher of this fantastic site.
  twitter: publisher-twitter-id
name(compulsory) The name of the publisher. If this is a personal site this might just be your own name.
logo(recommended for good schema) A log that will represent this publisher via schema. If you want to comply with Google's recommendations it should be 60px high.
url(optional) A URL with more information about the publisher or just a URL to your site.
sameAs(optional) This specifies social media IDs that represent this particular publisher.
description(optional) A description of this publisher.
twitter(optional) A Twitter ID to use when an article is shared (see next section).

Share links block

SBS can automatically display little share link icons after your posts but it will only do so for the entities you specify in this block.

My share links look like this:

  facebook: "[URL]&t=[TITLE]"
  twitter: "[URL]&text=[TITLE]&via=[TWITTER]&related=[TWITTER]"
  reddit: "[URL]&title=[TITLE]"
  linkedin: "[URL]&title=[TITLE]&source=[WSTITLE]&summary=[WSURL]"
  mix: "[URL]"
  email: "mailto:?subject=[TITLE]&body=[URL]"    
  permalink: "[URL]"

In the above, SBS will automatically replace the following for each article:

  • [URL] is replaced with the URL of the article.
  • [TITLE] is replaced with the title of the article.
  • [WSTITLE] is replaced with the title of your website.
  • [WSURL] is replaced with the URL of your website.
  • [TWITTER] is replaced with the publisher's twitter ID (from the publisher block above).

If you've set wantRelatedPosts to true in main settings, SBS will use an article's tags to try and find other posts related to that article, which it will displays links to at the bottom of the article. You can control aspects of that with the following settings:

relatedIgnoreTagsThis specifies a list of tags that will be ignored for the purposes of detecting related posts. For example, setting it to [Tech] would ignore the 'Tech' tag and setting it to [Blah, Boing] would ignore the 'Blah' and 'Boing' tags. It won't ignore any tags by default.
relatedMaxPostMatchesThis specifies the maximum number of related posts you want to try and get for an article. The default is 4.
relatedMinTagMatchesThis is the minimum number of tags that must match before a post can be considered to be related. The default is 2.
relatedSingleMatchAllowedTagIf relatedMinTagMatches is greater than 1, you can use this to specify tags you want to make related with just a single tag match.
relatedPostIntroThis is the introduction to related posts that you see at the bottom of an article. It defaults to: "You might also be interested in:".