/bootstrap-bp-hugo-theme

Bootstrap based Hugo theme which provides out of the box best practices.

Primary LanguageJavaScriptMIT LicenseMIT

Bootstrap-BP hugo theme

Bootstrap v4 based Hugo theme which provides out of the box best practices like performance and SEO readiness. Featured images will be resized automatically. This is based on the Hugo docs, hugo-best-practices, Front-End Checklist and the Front-End Performance Checklist.

Install the theme

With Git installed, run the following commands inside the Hugo site folder. If Hugo has not yet been installed, read the setup guide here.

mkdir themes
cd themes
git clone https://github.com/spech66/bootstrap-bp-hugo-theme.git

You can get a zip of the latest version of the theme from the home page and extract it to the themes folder.

Theme settings

Most settings should be done with hugo specific variables. There are only a few (optional) additional [params].

  • startPageColumns = true will show the start page in a Masonry-like mode.
  • customDateFormat to override the date format.

startPageColumns = true

startPageColumns = false

Google Analytics

This theme uses the internal asynchronous template for Google Analytics tracking. You only have to provide your tracking id in your configuration file:

googleAnalytics = "UA-123-45"

Schema.org support

Provide one author to enable the Schema.org support.

[Author]  
  name = "Sebastian Pech"

Images, Open Graph and Twitter Cards

This theme uses Hugos feature/cover name method to set the optimized feature image. The image named *feature* or *cover* is used for the posts featured image and get resized. This will also be in the Twitter Cards and Open Graph block.

# Site Config toml
title = "My hugo site"

[params]
  description = "Text about the site"

# Post yaml
---
title: "{{ replace .Name "-" " " }}"
date: {{ .Date }}
publishdate: {{ now.Format "2006-01-02" }}
lastmod: {{ now.Format "2006-01-02" }}
draft: true
description: "Text about this post"
tags:
    - "tag 1"
---