formspree/blogophonic-hugo

Blogophonic theme doesn't work with Fresh Hugo install

Closed this issue · 8 comments

I do not have any data in my folder/ hugo repository. Following the quick start guide from hugo, I added blogophonic to the themes folder and changed config.toml. Hugo server -D doesn't start succesfully.

Specific error:

Building sites … ERROR 2019/08/17 16:35:25 render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: template: _internal/opengraph.html:33:17: executing "_internal/opengraph.html" at <index $siteSeries $name>: error calling index: index of untyped nil
ERROR 2019/08/17 16:35:25 render of "page" failed: execute of template failed: template: blog/single-sidebar.html:3:8: executing "blog/single-sidebar.html" at <partial "head.html" .>: error calling partial: execute of template failed: template: _internal/opengraph.html:33:17: executing "_internal/opengraph.html" at <index $siteSeries $name>: error calling index: index of untyped nil
Total in 221 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: template: _internal/opengraph.html:33:17: executing "_internal/opengraph.html" at <index $siteSeries $name>: error calling index: index of untyped nil

Running it with a different theme (I tested hugo-lamp), and Hugo starts successfully, and I'm able to see a splash page with

There's nothing here.
Create an interesting post with the command:

$ hugo new post/hello-world.md

+1
Getting the same exact error.

Steps to reproduce:

% hugo new site test-site   
Congratulations! Your new Hugo site is created in /home/jsakkine/Projects/test-site.

Just a few more steps and you're ready to go:

1. Download a theme into the same-named folder.
   Choose a theme from https://themes.gohugo.io/ or
   create your own with the "hugo new theme <THEMENAME>" command.
2. Perhaps you want to add some content. You can add single files
   with "hugo new <SECTIONNAME>/<FILENAME>.<FORMAT>".
3. Start the built-in live server via "hugo server".

Visit https://gohugo.io/ for quickstart guide and full documentation.
% cd test-site 
% git init   
Initialized empty Git repository in /home/jsakkine/Projects/test-site/.git/
% git add .
% git submodule add https://github.com/formspree/blogophonic-hugo/ themes/blogophonic
Cloning into '/home/jsakkine/Projects/test-site/themes/blogophonic'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 335 (delta 0), reused 0 (delta 0), pack-reused 332
Receiving objects: 100% (335/335), 9.66 MiB | 52.00 KiB/s, done.
Resolving deltas: 100% (111/111), done.
% echo 'theme = "blogophonic"' >> config.toml
% hugo
Building sites … ERROR 2020/06/21 19:38:19 render of "page" failed: execute of template failed: template: blog/single-sidebar.html:3:8: executing "blog/single-sidebar.html" at <partial "head.html" .>: error calling partial: execute of template failed: template: _internal/opengraph.html:41:17: executing "_internal/opengraph.html" at <index $siteSeries $name>: error calling index: index of untyped nil
ERROR 2020/06/21 19:38:19 render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: template: _internal/opengraph.html:41:17: executing "_internal/opengraph.html" at <index $siteSeries $name>: error calling index: index of untyped nil
Total in 173 ms
Error: Error building site: failed to render pages: render of "page" failed: execute of template failed: template: _default/single.html:3:8: executing "_default/single.html" at <partial "head.html" .>: error calling partial: execute of template failed: template: _internal/opengraph.html:41:17: executing "_internal/opengraph.html" at <index $siteSeries $name>: error calling index: index of untyped nil

I decided not to use this theme in the end. I actually switched to using a Gatsby theme.

yeah, there is something fishy with the theme because you have to copy lots of files to your hugo site from the theme folder

this should put a bandage on the problem:

cd test-site/
cp -a themes/blogophonic/* .

Hi! Sorry for the delay.

This as a full website, not a hugo theme. The correct way to deploy it is:

git clone git@github.com:formspree/blogophonic-hugo.git
cd blogophonic-hugo
hugo server

Then you can edit or discard the pages under content.

This repo should not be cloned into a git submodule. It's meant to be the top-level folder and includes a /content folder with several pre-made pages.

We chose to package it this way because at the time it was difficult to distribute a hugo theme with a lot of pre-made pages, images, static content, etc.

I'm not sure if there's an easier way to do this today?

I'll update the docs with these installation instructions.

Ok I updated the README file. Let me know if this clarifies things, if not we can re-open this issue.

Hi @colevscode, you said:

This as a full website, not a hugo theme.

The title of the Readme still says a Hugo blog theme by Formspree. Is it not a hugo theme?

EDIT: oh i see, you previously called this project a theme, but decided to stop calling it that from now on.

Yeah it's a bit nuanced. I think this is still a theme by the generally understood definition of the word. It's just not a hugo theme.