A light responsive Hugo AMP theme for blogger.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 03cffab Jul 13, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
archetypes Initial commit May 28, 2018
exampleSite Update config setting and template May 31, 2018
images Replace screenshot image Jul 13, 2018
layouts Update style build Jun 17, 2018
static Initial commit May 28, 2018
styles Remove random hash for font file Jun 17, 2018
.editorconfig Initial commit May 28, 2018
.gitignore Initial commit May 28, 2018
LICENSE.md Initial commit May 28, 2018
README.md Add guide for content config Jun 18, 2018
index.js Initial commit May 28, 2018
package-lock.json Update class name for Logo May 31, 2018
package.json Initial commit May 28, 2018
theme.toml Update theme info May 31, 2018

README.md

hugo-lamp

A light responsive Hugo ⚡ AMP theme for blogger.

hugo-lamp

Installation

Go to the directory where you have your Hugo site and run:

$ mkdir themes
$ cd themes
$ git clone https://github.com/huyb1991/hugo-lamp
$ rm -rf hugo-lamp/.git

For more information read the official setup guide of Hugo.

Guide

Add image to article (content)

This is an AMP page, to add image, you have to use amp-img shortcodes, the syntax is:

{{< amp-img width="width-value" height="height-value" layout="responsive" src="image-url" alt="image alt" >}}

Replace width-value, height-value, image alt and image-url by your image.

A note: Hugo is static-site-generator, to add image to your site, please follow this solution [SOlved] How to… insert image in my post?.

Content config for SEO

In Front Matter section for each post, you should add title and description for SEO, example:

---
title: "Getting Started with AMP"
description: "Getting started with AMP. Implement these key steps to get up and running with AMP"
---

The title is the H1 tag on HTML page, and <title> in head section. The description is the meta tag for description <meta name="description" content=""> in head section.

Configuration

Take a look inside the exampleSite at config.toml and update by your own:

Site Info

# Base config for your site
baseURL = "http://localhost:1313/"      # Your domain
languageCode = "en-us"
title = "Hugo LAMP"                     # Default site title
theme = "hugo-lamp"
googleAnalytics = "UA-XXXXXXXX-X"       # Google Analytics UA number

Main Menu

[[menu.main]]
  name = "Hugo"
  weight = 1
  identifier = "hugo"
  url = "/hugo/"
[[menu.main]]
  name = "AMP Project"
  weight = 2
  identifier = "amp"
  url = "/amp/"
[[menu.main]]
  name = "Tags"
  weight = 3
  identifier = "tags"
  url = "/tags/"

Taxonomies

For more details, take a look on official document for taxonomies

[taxonomies]
  tag = "tags"
  category = "categories"

SEO

[params]
  subtitle = "Light responsive AMP theme"
  author = "Huy Nguyen"                     # Your name
  logo = "/img/avatar.jpg"                  # Logo
  description = "A light responsive Hugo AMP theme for blogger"          # Meta description tag
  paginate = 10

  # SEO configs
  seotitle = "Hugo Blog Title (SEO Version)"                  # Overwrite site title for SEO purpose
  googleSiteVerification = "google_site_verification_code"    # Google Webmaster
  msValidate = "bing_site_verification_code"                  # Bing Webmaster

Publisher

Currently only support Google Adsense as usual, maybe implement amp-auto-ads for future.

  # Google Adsense
  adsensePublisher = "ca-pub-XXX"       # Required if you want to include Google Adsense
  adsenseSlot = "XXX"                   # Required slot to display ads
  adsenseSlotSticky = "XXX"             # Enables sticky ads feature, value maybe the same with adsenseSlot, remove if you don't want display sticky ads

Social networks & connections

  # Social networks
  email = "name@domain.com"
  github = "github_username"
  twitter = "twitter_username"
  linkedin = "linkedin_username"
  facebook = "facebook_username"
  google = "googleplus_id_number"
  instagram = "instagram_username"
  youtube = "youtube_username"
  dribbble = "dribbble_username"

Contributing

If you found a bug or got an idea for a new feature feel free to add a new issues.

Thanks

Thanks to Steve Francia for creating Hugo and the awesome community around the project.