hugo-gentoo-theme

test-theme Netlify Status

This is a fork of the hugo-gentoo-theme theme for Hugo, which is archived now. This theme has a motif of Gentoo penguin.

hugo-gentoo-theme's screenshot

Features

  • Responsive Design
  • Supports tags and categories
  • Supports Google Analytics via Hugo configuration file file
  • Supports the social links
  • Supports post image thumbnails
  • Default Hugo shortcodes for hidden text and raw HTML

Preview the theme

For a live demo of this theme you can visit:

You can also preview this theme locally. It is shipped with a fully configured example site. For a quick preview clone this repository and execute:

$ cd exampleSite/
$ hugo serve  --themesDir ../..

Installation

Before installing this theme, be sure to install Hugo and create a new site.

To install the theme, run the following from the root directory of your Hugo site:

$ git submodule add https://github.com/grem11n/hugo-gentoo-theme.git themes/hugo-gentoo-theme

With a submodule you will be able to easily update the theme. However, you can also just download the repository contents and put it into your themes/ directory for your Hugo website. You can modify this theme for your needs as well.

Configuration

You need to modify your config.toml file in the root of your Hugo website. An example config.toml for Gentoo theme is listed below. Depends on your hosting provider some of the general parameters may be different.

baseURL = "https://example.com"
title = "Your Website Title"
languageCode = "en-us"
theme = "gentoo"
googleAnalytics = ""

copyright = "© Copyright Year, Your Name"
canonifyurls = true
paginate = 6

[params]
  description = "This website is using Gentoo theme"
  author = "Youe name"

  # mainSections configures, pages from which sections will be listed on the main page
  mainSections = ["post", "posts"]

[taxonomies]
  # categories are rendered in top menu
  category = "categories"
  tag = "tags"
  series = "series"


# You can also configure static pages on your website.
# to make it work, you need to have corresponding subdirectory under content/ dir with index.md
# In this particular case it would be:
# content/about/index.md
#
[[menu.global]]
    name = "About"
    url = "/about/"

# You can configure links to your social media
[params.social]
    twitter       = ""
    github        = ""
    telegram      = ""
    email         = ""
    linkedin      = ""
    stackoverflow = ""

Updating

To get updates to the theme, run the following from the root directory of your Hugo site:

$ git submodule update --remote themes/hugo-gentoo-theme

Preview your site locally

Use Hugo’s built-in server to see your site in action as you make changes.

$ hugo server -D -w --gc -F -t hugo-gentoo-theme

After that visit localhost:1313 in your browser.

Content Management

Add image thumbnails to your posts

To create a new blog post, run:

$ hugo new post/your-post-name.md

To add an image thumbnail to the post, add image parameter with a link to the image. Example of the configuration:

---
title: "Article"
description: "Lorem ipsum"
date: 2021-01-01
draft: false
slug: "article"
image: "https://example.com/img/picture.jpg"
categories: ["Blog"]
tags: ["gentoo", "theme", "hugo"]
---

Arrange images on a page

You can arrange images on a page to move them to the left, right, or in the center of a page. Image placed on the right hand side by default. To change its position, add a class parameter like on example below:

{{< figure src="/img/picture.jpg" class="left" >}}

Hidden text

You can hide text with HTML <details> tag. Use details shortcode for this:

{{< details Read more...>}}
... more text ...
{{< /details >}}

You can find an example on the Demo website

Raw HTML

Use raw HTML in your posts like this:

{{< rawhtml >}}
  <p class="speshal-fancy-custom">
    This is <strong>raw HTML</strong>, inside Markdown.
  </p>
{{< /rawhtml >}}

You can find an example on the Demo website

Netlify

You can connect to Netlify and deploy your site by just pressing this button!

Deploy to Netlify

Contributing

If you have an idea on how to improve this theme or found a bug feel free to use GitHub issues to let me know.

If you want to contribute to this theme, please, fork this repository and create a pull request.

License

This theme is released under the MIT license