thegeeklab/hugo-geekblog

Unable to get geeklab theme running on Hugo.

molitona opened this issue · 8 comments

Hi, I'm in trouble to get geeklab theme running in hugo.

First, I created a new hugo site using hugo new site mbz command on Linux.
Then, I made a clone of geeklab theme in themes folder of my site with that command git clone https://github.com/thegeeklab/hugo-geekblog.git.
After that, I copied

baseURL = "http://localhost"
title = "Geekblog"
theme = "hugo-geekblog"

# Geekblog required configuration
pygmentsUseClasses = true
pygmentsCodeFences = true
disablePathToLower = true

# Needed for mermaid shortcodes
[markup]
  [markup.goldmark.renderer]
    unsafe = true
  [markup.tableOfContents]
    startLevel = 1
    endLevel = 9

[taxonomies]
  author = "authors"
  tag = "tags"

[mediaTypes]
  [mediaTypes."application/atom+xml"]
    suffixes = ["xml"]

[outputFormats]
  [outputFormats.Atom]
    name = "Atom"
    mediaType = "application/atom+xml"
    baseName = "atom"
    isPlainText = false
    rel = "alternate"
    isHTML = false
    noUgly = true
    permalinkable = false

[outputFormats.outputs]
  home = ["HTML", "ATOM"]
  page = ["HTML"]
  section = ["HTML"]
  taxonomy = ["HTML"]
  term = ["HTML", "ATOM"]

to config.toml in my site as you mentioned here : https://hugo-geekblog.geekdocs.de/posts/getting-started/

so this is my website then

Screenshot from 2020-12-04 21-49-45

and when I run "hugo server -D" command, I get that error !

Screenshot from 2020-12-04 21-55-15

Please, could anyone help me, how to get that theme running without errors ? Thanks.

xoxys commented

Hi, please read the full getting started guide: https://hugo-geekblog.geekdocs.de/posts/getting-started/#option-2-clone-the-github-repository and/or the README of the theme

If you want to use the theme from a cloned branch instead of a release tarball you’ll need to install gulp locally and run the default pipeline once to create all required assets.

tl;dr If you want to use this theme from the git source you need to install and run gulp to build required assets. As an alternative and recommended way use the prebuild tarball from the release page.

Ok, I will follow the recommended way. I downloaded that file

Screenshot from 2020-12-04 23-40-42

from here
Screenshot from 2020-12-04 23-40-57

What should I do next ? if you can help me in steps, I'm not specialist.

xoxys commented

Extract the theme to the themes folder. Thats it.

I got the website with neither posts nor sections above, how can I get them ?
Screenshot from 2020-12-04 23-53-07

xoxys commented

I dont really unserstand the question. This is just a theme. You need to add the content on your own. Maybe you have to read first how hugo works in general.

Just, I want to add the content of geeklab demo site (posts,nav bar) to my site to learn from them.

They are here when I cloned the repo
Screenshot from 2020-12-05 00-02-45
Screenshot from 2020-12-05 00-03-15

xoxys commented

To get the demo site just copy the content folder and data folder from exampleSite to your own sites root folder.

Yeah, I've done it, big thanks friend 👍 , that's working .