Configurations

Luiz F. A. de Prá edited this page Sep 24, 2018 · 6 revisions

Configurations

About Hugo Configurations

This theme supports:

Theme Parameters

These are the basic parameters used by hugo-coder theme.

Configuration Type Required Description Example
author string Yes Author name. "John Doe"
info string Yes An headline, job title or similar. "Full Stack Developer"
description string Yes Description of the site. "John Doe's personal website"
keywords string Yes Site keywords. "blog,developer,personal"
avatarurl string No Photo of the author. "images/avatar.jpg"
favicon_32 string No Custom path to a 32x32 favicon. "/img/favicon-32x32.png"
favicon_16 string No Custom path to a 16x16 favicon. "/img/favicon-16x16.png"
footercontent string No Extra text shown in the footer section. "Hi, I'm a footer message!"
hidecredits bool No If active, hide the footer credits. true or false
hidecopyright bool No If active, hide the footer copyright. true or false
rtl bool No Enable the Right To Left mode. true or false
math bool No Enable MathJax Module and add JS into your site. :'( true or false
custom_css list No Add extra CSS files to the website. ["css/extra-style.css"]

Social Icons Configuration

Social Icons are optional. To use them you will need to set all the following parameters for each icon.

Configuration Type Required Description Example
name string Yes Icon name. "Github"
icon string Yes FontAwesome icon classes. "fab fa-github"
weight int Yes Icon order. 1
url string Yes URL to redirect. "https://github.com/johndoe/"

Menu Items Configurations

Menu Items are optional. To use them you will need to set all the following parameters for each icon.

Configuration Type Required Description Example
name string Yes Menu Item name. "Posts"
weight int Yes Menu Item order. 1
url string Yes URL to redirect. "/posts/"

Complete Example

This is a complete configuration example with some recommended values.

baseurl = "http://www.example.com"
title = "johndoe"
theme = "hugo-coder"
languagecode = "en"
defaultcontentlanguage = "en"

paginate = 20
canonifyurls = true

pygmentsstyle = "bw"
pygmentscodefences = true
pygmentscodefencesguesssyntax = true

disqusShortname = "yourdiscussshortname"

[params]
    author = "John Doe"
    info = "Full Stack DevOps and Magician"
    description = "John Doe's personal website"
    keywords = "blog,developer,personal"
    avatarurl = "images/avatar.jpg"

    favicon_32 = "/img/favicon-32x32.png"
    favicon_16 = "/img/favicon-16x16.png"

    footercontent = "Enter a text here."

    hidecredits = false
    hidecopyright = false

    rtl = false

    math = true
    custom_css = ["css/custom.css"]

# Social links
[[params.social]]
    name = "Github"
    icon = "fab fa-github fa-2x"
    weight = 1
    url = "https://github.com/johndoe/"
[[params.social]]
    name = "Gitlab"
    icon = "fab fa-gitlab fa-2x"
    weight = 2
    url = "https://gitlab.com/johndoe/"
[[params.social]]
    name = "Twitter"
    icon = "fab fa-twitter fa-2x"
    weight = 3
    url = "https://twitter.com/johndoe/"

# Menu links
[[menu.main]]
    name = "Blog"
    weight = 1
    url  = "/posts/"
[[menu.main]]
    name = "About"
    weight = 2
    url = "/about/"
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.