Closed schoettl closed 4 years ago
Try adding disableKinds = ["RSS", "taxonomy", "taxonomyTerm"]
somewhere around version
aka as a root level config.
This is not done in the starter repo, but probably should. Good catch. We should also look into taxonomy as well as RSS support again. @mpourismaiel
Thank you @stp-ip ! I tried this, but now I get this error:
Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: _default/list.html:10:7: executing "_default/list.html" at <partial "helpers/fragments-renderer.html" (dict "page_scratch" .Scratch)>: error calling partial: execute of template failed: template: partials/helpers/fragments-renderer.html:18:8: executing "partials/helpers/fragments-renderer.html" at <partial (print "fragments/" .Params.fragment ".html") $context>: error calling partial: "/home/jakob/projects/syna-start/themes/syna/layouts/partials/fragments/hero.html:106:12": execute of template failed: template: partials/fragments/hero.html:106:12: executing "partials/fragments/hero.html" at <.page.File.Dir>: error calling Dir: runtime error: invalid memory address or nil pointer dereference
Sorry, I don't understand this error message neither. Your config snippet was TOML, right?
Yes it was TOML. Will see that I get some time to dive into this, if @mpourismaiel doesn't before me ;)
Either we have fixed this issue while fixing something else or I can't replicate the issue. I tried the following:
git clone --recurse-submodules https://github.com/schoettl/syna-start.git
cd syna-start
Append the following to config.toml
, before the [params]
section:
DefaultContentLanguage = "en"
[languages]
[languages.en]
title = "My blog"
weight = 1
[languages.fr]
title = "Mon blogue"
weight = 2
[params]
DefaultContentLanguage = "en"
hugo server -D
or hugo
The site builds successfully and can run the development server without any errors. The French page is empty as expected. I'm investigating the multi lingual issue happening as mentioned in #759 .
Thanks! I'll test again on the weekend and close the issue, if it's solved!
@schoettl Please note I added params.DefaultContentLanguage = "en"
after an edit. The documentation of multilingual mode contains this line but I forgot to add to my "steps to reproduce" comment above.
Sorry for the rapid fire of misinformation. I found the problem. Until we create a PR to fix the issue, please do the following to create a multilingual website using syna-start.
git clone --recurse-submodules https://github.com/schoettl/syna-start.git
cd syna-start
Append the following to config.toml
, before the [params]
section:
DefaultContentLanguage = "en"
[languages]
[languages.en]
title = "My blog"
weight = 1
[languages.fr]
title = "Mon blogue"
weight = 2
[params]
DefaultContentLanguage = "en"
mv content/_index/index.md content/ # create section page creation, it was in the wrong place
sed '2d' content/index.md > content/tmp; mv content/tmp content/index.md # Remove url from section page
echo "+++\nheadless = true\n+++" > content/_index/index.md # create a headless page to fill the section page
hugo server -D # or hugo
Since we added the index page without multilingual in mind, the structure doesn't allow multilingual mode to be setup. This change will allow the config to take effect without any issues.
Also if by the time you use syna-start
, the themes/syna
submodule is at #v0.17.0
, please run git checkout #v0.17.2
in order to get the latest released version of Syna.
Again, sorry for the misinformation earlier. I didn't realize I was working in a modified state.
I pushed a fix and created a PR at https://github.com/okkur/syna-start/pull/36
Let us know if the problem persists.
@mpourismaiel Thanks a lot for your work! So for, hugo runs again. I'll next test the other issue.
BTW, the command to create the _index/index.md
file had the -e
option missing.
echo -e "+++\nheadless = true\n+++" > content/_index/index.md # create a headless page to fill the section page
Is this a BUG REPORT or FEATURE REQUEST?: bug
What happened: On my way to produce a minimal example for issue #759 , I encountered this problem:
I prepared the
config.toml
file to support a secondary language. I did not translate anything except the title in the config file.I get this error (see also below):
What you expected to happen: Hugo should generate the static site without errors.
How to reproduce it (as minimally and precisely as possible): see code block below and specifically this commit introducing the error: https://github.com/schoettl/syna-start/commit/af02744f612184500b8848a548b534ea02f93a2e
Anything else we need to know?: I did not understand the error message and I could not find solutions on the web.
Environment: