Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme won't start #3

Closed
paskal opened this issue Mar 20, 2018 · 9 comments
Closed

Theme won't start #3

paskal opened this issue Mar 20, 2018 · 9 comments
Labels
enhancement New feature or request

Comments

@paskal
Copy link

paskal commented Mar 20, 2018

Hello!

My blog won't start with your theme:

➜  blog git:(master) ✗  docker-compose run --service-ports blog-preview
Building sites … ERROR 2018/03/20 09:45:43 Error while rendering "page" in "post/": template: /srv/hugo/themes/hugo-nederburg-theme/layouts/_default/single.html:86:51: executing "main" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 09:45:43 Error while rendering "page" in "": template: /srv/hugo/themes/hugo-nederburg-theme/layouts/_default/single.html:86:51: executing "main" at <absURL>: wrong number of args for absURL: want 1 got 0
ERROR 2018/03/20 09:45:43 Error while rendering "home" in "": template: /srv/hugo/themes/hugo-nederburg-theme/layouts/index.html:3:9: executing "/srv/hugo/themes/hugo-nederburg-theme/layouts/index.html" at <partial "head.html" ...>: error calling partial: template: theme/partials/head.html:3:76: executing "theme/partials/head.html" at <safeHTML>: wrong number of args for safeHTML: want 1 got 0

I've tried to move all "content" to "post" subfolder, no luck. I guess input handling could be improved to provide clearer error messages than "wrong number of args for safeHTML".

Thanks for the effort!

@appernetic
Copy link
Collaborator

Hi,
it's Hugo built in error messages so we have to stick with them.

Did you use the settings in the config.toml from the exampleSite folder?

Also use at least Hugo version 0.34.

There should be no problem if you configure it right as you can see here:

https://themes.gohugo.io/theme/hugo-nederburg-theme/

@paskal
Copy link
Author

paskal commented Mar 21, 2018

The thing I'm trying to achieve is to be able to look at the theme without adjusting my configuration.

My Hugo version is 0.37, you could find a good example on what could be done here for making life easier for someone migrating existing site to your theme by link: yursan9/manis-hugo-theme#4

@appernetic
Copy link
Collaborator

I don't have time to look at it at the moment. But you can always do a PR.

@appernetic appernetic added the enhancement New feature or request label Mar 22, 2018
@appernetic
Copy link
Collaborator

Be my first Patreon and I start with it ASAP!

@paskal
Copy link
Author

paskal commented Mar 23, 2018

I'm waiting:)

@appernetic appernetic reopened this Mar 23, 2018
@appernetic
Copy link
Collaborator

Check it out and see if it works as you would prefer it!

@paskal
Copy link
Author

paskal commented Mar 23, 2018

It works and it's nice! Two things:

  1. Author block could be hidden in case there are no variables set
    image

  2. I've stumbled upon the very same issue as the Images missing max-width property dim0627/hugo_theme_beg#19, only part of the image visible on the screenshot where whole should be:

image

It breaks all the formatting. Source code:

![Shinken simple distributed architecture](https://shinken.readthedocs.io/en/latest/_images/shinken-architecture.png)

@appernetic
Copy link
Collaborator

appernetic commented Mar 23, 2018 via email

@appernetic
Copy link
Collaborator

appernetic commented Apr 2, 2018

I added check for author before the author-meta now:

{{ if and (isset .Site.Params "author") .Site.Params.author }}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant