A light responsive Hugo β‘ AMP theme for blogger.
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.
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?.
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.
Take a look inside the exampleSite at config.toml
and update by your own:
# 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
[[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/"
For more details, take a look on official document for taxonomies
[taxonomies]
tag = "tags"
category = "categories"
[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
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
email = "[email protected]"
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"
If you found a bug or got an idea for a new feature feel free to add a new issues.
- gohugo-amp for the build tool
- hugo-nuo for the template
Thanks to Steve Francia for creating Hugo and the awesome community around the project.