Hugo Themes
triple-hyde
A simply cool Hyde inspired theme
- Author: derme302
- GitHub Stars: 6
- Updated: 2023-10-07
- License: MIT
- Tags: Blog Personal Responsive
Triple-hyde
Triple-hyde
is a Hugo’s theme that extends @htrn’s Hyde-hyde theme that was originally derived from @spf13’s Hyde and Nate Finch’s blog.
Main changes
hyde-hyde
has been paused in development for awhile, this fork implements the following changes:
- PR #1 adds support for Google Analytics v4
- PR #5 by @eatingbrb adds support for Mastodon in social sidebar
- PR #6 adds support for img shortcodes, allowing you to align an image inside of markdown by adding
#center
,#left
or#right
at the end of an image link. E.g.![Metal](/uploads/2014/06/metal_icon.png#center)
- PR #7 correctly breaks out the about section on the sidebar as a partial
- PR #8 updates theme to Font Awesome v6 and adds the Threads icon
- PR #10 by @MarcoIeni adds support for giscus
For more details, please refer to CHANGELOG. A real site in action can be found here and the example site for reference.
Usage
Installation
triple-hyde
can be easily installed as many other Hugo themes:
$ cd HUGO_PROJECT
# then either clone hyde-hyde
$ git clone https://github.com/derme302/triple-hyde.git themes/triple-hyde
# or just add hyde-hyde as a submodule
$ git submodule add https://github.com/derme302/triple-hyde.git themes/triple-hyde
After that, choose triple-hyde
as the main theme.
config.toml
theme = "triple-hyde"
config.yaml
theme : "triple-hyde"
That’s all. You can render your site using hugo
and see triple-hyde
in action.
Options
Triple-hyde
essentially inherits most of Hyde’s options. There are some extra options though
highlightjs = true
: use highlight.js instead of Hugo built-in support for code highlightinghighlightjsstyle="highlight-style"
: only whenhighlightjs = true
, please choose one of many highlight.js’s styles.- Since v2.0.1, highlighting for each page can be fine-tuned in the front matter, for example
highlight = false
(defaulttrue
)highlightjslanguages = ["swift", "objectivec"]
postNavigation = true|false
(defaulttrue
): Setting tofalse
will disable the navigation Previous Post/ Next PostrelatedPosts = false|true
(defaultfalse
): Setting totrue
allows related posts. Please refer here for more details on related contents with Hugo.GraphCommentId = "your-graphcomment-id"
: to use GraphComment instead of the built-in Disqus. This option should be used exclusively withdisqusShortname = "disqus-shortname"
.UtterancesRepo = "owner/repo-name"
: to use Utterances instead of the built-in Disqus. This option should be used exclusively withdisqusShortname = "disqus-shortname"
.UtterancesIssueTerm = "pathname"
Method for Utterances to match issue’s to posts (pathname, url, title, og:title)UtterancesTheme = "github-light"
Theme for Utterances (github-light, github-dark)
Commento = true
: to use Commento instead of the built-in Disqus. This option should be used exclusively withdisqusShortname = "disqus-shortname"
.CommentoHost = "your-commento-instance"
Self-hosted Commento instance. This is not required if you’re a Commento.io user.
[params.social]
: in this section, you can set many social identities such as Twitter, Facebook, Github, Bitbucket, Gitlab, Instagram, LinkedIn, StackOverflow, Medium, Xing, Keybase.[params.social] mastodon = "https://mastodon.gamedev.place/@derme302" github = "derme302" ...
include_toc = false
: Setting tofalse
in FrontMatter will disable too short TOC data as your want.Per PR #56, Gravatar pics can be used exclusively to
.Site.Params.authorimage
via the parameter.Site.Params.social.gravatar
[params.social] gravatar = "your.email@domain.com"
Customisations
- Most of the customisable SCSS styles in assets/scss/hyde-hyde and Hugo templates in hyde-hyde/layouts are modularised and can be altered/adapted easily.
Portfolio
Since version 2.0+, I added a portfolio page just in case. If you need it, simply add a menu section ‘Portfolio’ in config.toml
as following.
[[menu.main]]
name = "Portfolio"
identifier = "portfolio"
weight = xyz
url = "/portfolio/"
In the folder content
, create a subfolder portfolio
and use the following folder/content structure as reference.
$ tree portfolio
portfolio
├── _index.md
├── p1.md
├── p1.png
├── p2.md
├── p2.png
...
├── pn.md
└── pn.png
As I design the section portfolio to be rendered as list, _index.md
can be used to set the title for your portfolio (you can read more about _index.md
here). For instance, when I want to set the title of my portfolio “Projects”, the front matter of _index.md
will be:
---
title: 'Projects'
---
The remaining of _index.md
will be ignored.
For each project, just create a Markdown file with the following parameters in the front matter:
---
title: "Project P1's Title"
description: "A short description"
date: '2018-01-02'
link: 'https://project-p1.com'
screenshot: 'p1.png'
layout: 'portfolio'
featured: true
---
Here is a longer summary of the project. You can write as long as you wish.
Note:
date
is important to sort the project chronologicallylayout 'portfolio'
is important as you don’t want your project’s page appear in the list of posts in the main page of your Web site but only in the Portfolio ;)featured: true
: when you want to show a project as featured project. It is default tofalse
. Note that only one project should be markedfeatured: true
, otherwise, the result could be random as the Hugo template will take the first one.- The body of the Markdown file will be the summary of the project.
If you want to adjust the portfolio page to your needs, please have a look at the main template, that uses this partial template and this SCSS style.
Posts in home page
By default hugo will show in your home page the most populated section.
This means that if you have more projects than posts, by default your home page will list your projects instead of your posts.
If you want to change this behaviour you can change the mainsections.
For example, for the exampleSite this is how you should change the config.toml
file:
[params]
mainSections = ["posts"]
Some Screenshots
Main page
A post
Portfolio
Mobile Mode with Collapsible Menu
Author(s)
hyde-hyde
originally developed by Alex TOriginal developed by Mark Otto
Hugo’s
hyde
ported by Steve Francia
License
Open sourced under the MIT license