Hello!
I’m very new to hugo and am having trouble getting started.
I am using the pico theme and have already tried incorporating the advice from this post into the config.toml (and copied the theme’s assets/ folder into the root directory) but to no avail.
When trying to run hugo server, I receive the following error:
*Start building sites … *
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended darwin/amd64 BuildDate=2024-01-05T12:21:15Z VendorInfo=brew
ERROR render of “page” failed: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/_default/baseof.html:15:5”: execute of template failed: template: _default/single.html:15:5: executing “_default/single.html” at <partial “header.html” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/header.html:12:7”: execute of template failed: template: partials/header.html:12:7: executing “partials/header.html” at <partial “icon” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/icon.html:3:5”: execute of template failed: template: partials/icon.html:3:5: executing “partials/icon.html” at <slicestr .Site.Title 0 1>: error calling slicestr: slice bounds out of range
ERROR render of “page” failed: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/_default/baseof.html:15:5”: execute of template failed: template: blog/single.html:15:5: executing “blog/single.html” at <partial “header.html” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/header.html:12:7”: execute of template failed: template: partials/header.html:12:7: executing “partials/header.html” at <partial “icon” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/icon.html:3:5”: execute of template failed: template: partials/icon.html:3:5: executing “partials/icon.html” at <slicestr .Site.Title 0 1>: error calling slicestr: slice bounds out of range
ERROR render of “home” failed: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/_default/baseof.html:15:5”: execute of template failed: template: index.html:15:5: executing “index.html” at <partial “header.html” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/header.html:12:7”: execute of template failed: template: partials/header.html:12:7: executing “partials/header.html” at <partial “icon” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/icon.html:3:5”: execute of template failed: template: partials/icon.html:3:5: executing “partials/icon.html” at <slicestr .Site.Title 0 1>: error calling slicestr: slice bounds out of range
Total in 259 ms
Error: error building site: render: failed to render pages: render of “page” failed: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/_default/baseof.html:15:5”: execute of template failed: template: _default/single.html:15:5: executing “_default/single.html” at <partial “header.html” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/header.html:12:7”: execute of template failed: template: partials/header.html:12:7: executing “partials/header.html” at <partial “icon” .>: error calling partial: “/Users/kt/Documents/personal/kaitlynhobbs/layouts/partials/icon.html:3:5”: execute of template failed: template: partials/icon.html:3:5: executing “partials/icon.html” at <slicestr .Site.Title 0 1>: error calling slicestr: slice bounds out of range
my config.toml file looks like this:
# Use an empty string if you have multiple domain linking to your website
# This string is used to generate the absolute URL for your assets.
baseURL = 'https://kaitlynhobbs.github.io/'
defaultContentLanguage = 'en'
# Emoji in markdown files
enableEmoji = true
languageCode = 'en-us'
# Number of blog post per page
paginate = 10
theme = 'pico'
# Title of the website is used for the meta tag title
# and the square icon (not the favicon)
title = 'KT Portfolio'
[params]
customCSS = [] # Path relative to assets folder
customJS = [] # Path relative to assets folder
# Homepage description
# For blog page description you can overwrite it
# in the front matter
description = "Boilerplate website"
email = "khobbs3@uwo.ca"
favicon = '/favicon.ico'
# Dark mode support
# Supported value are :
# - off
# - always
# If commented the theme will use the browser theme.
darkMode = 'always'
# Social parameters for contact_icons widget
[[params.social]]
alt = "email icon"
icon = "/icons/email.svg"
name = "email"
url = "mailto:mail@example.com"
[[params.social]]
alt = "github icon"
blank = true
icon = "/icons/github.svg"
name = "github"
url = "https://github.com/"
[[params.social]]
alt = "medium icon"
blank = true
icon = "/icons/medium.svg"
name = "medium"
url = "https://medium.com/"
[[params.social]]
alt = "stack-overflow icon"
blank = true
icon = "/icons/stack-overflow.svg"
name = "stack-overflow"
url = "https://stackoverflow.com/"
[[params.social]]
alt = "twitter icon"
blank = true
icon = "/icons/twitter.svg"
name = "twitter"
url = "https://twitter.com/"
[[params.social]]
alt = "facebook icon"
blank = true
icon = "/icons/facebook.svg"
name = "facebook"
url = "https://facebook.com/"
# Navigation bar
[menu]
[[menu.main]]
identifier = "home" # identifier is use for translations
pre = "" # pre is inserted before the translation (icons, image, etc)
url = "/"
weight = 10
[[menu.main]]
identifier = "blog" # identifier is use for translations
pre = "" # pre is inserted before the translation (icons, image, etc)
url = "/blog/"
weight = 20
[[menu.main]]
identifier = "contact" # identifier is use for translations
pre = "" # pre is inserted before the translation (icons, image, etc)
url = "/#contact"
weight = 30
# Syntax highlighting
[markup.highlight]
guessSyntax = true
lineNumbersInTable = true
noClasses = false # Set to false to use the Pico default theme.
tabWidth = 2
[taxonomies]
category = "categories"
tag = "tags"
# Translation
# English, French and Italian are supported but you can contribute
# by adding translation to i18n/ folder.
[languages.en]
contentDir = 'content/en'
languageCode = 'en'
languageName = 'English'
weight = 0
[languages.fr]
contentDir = 'content/fr'
languageCode = 'fr'
languageName = 'Français'
weight = 2
# Uncomment the following lines to add an italian translation.
# [languages.it]
# contentDir = 'content/it'
# languageCode = 'it'
# languageName = 'Italiano'
# weight = 3
# Uncomment the following lines to add an spanish translation.
# [languages.es]
# contentDir = 'content/es'
# languageCode = 'es'
# languageName = 'Español'
# weight = 4
# Uncomment the following lines to add a German translation.
# [languages.de]
# contentDir = 'content/de'
# languageCode = 'de'
# languageName = 'Deutsch'
# weight = 5
Thank you in advance!