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

Should I copy /themes/kiss/data/* to /data ? #4

Closed
wildskyf opened this issue Nov 23, 2017 · 9 comments
Closed

Should I copy /themes/kiss/data/* to /data ? #4

wildskyf opened this issue Nov 23, 2017 · 9 comments

Comments

@wildskyf
Copy link

wildskyf commented Nov 23, 2017

I found that I can't access social base URL via $.Site.Data.theme.social.base.
Should I copy it to my own data folder?

If the answer is yes, maybe it is good to write it into README file. :)

@ribice
Copy link
Owner

ribice commented Nov 23, 2017

That shouldn't be the case. I'll test it and let you know.

@wildskyf
Copy link
Author

I found that even I copy it to /data,
I still can't access those variable...

Checking my config....

@wildskyf
Copy link
Author

wildskyf commented Nov 23, 2017

and FYI:
Hugo Static Site Generator v0.30.2 linux/amd64 BuildDate: 2017-10-22T12:02:52+08:00
Linux fedora 4.13.12-300.fc27.x86_64 #1 SMP Wed Nov 8 16:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

@wildskyf
Copy link
Author

don't know what happened, I can't access .toml in /data but I could access .yml in /data.

@wildskyf
Copy link
Author

it works after I add a theme.yml into /themes/kiss/data

social:
  base:
    codepen: "https://codepen.io/"
    email: "mailto:"
    facebook: "https://facebook.com/"
    github: "https://github.com/"
    instagram: "https://instagram.com/"
    linkedin: "https://linkedin.com/in/"
    twitter: "https://twitter.com/"

@ribice
Copy link
Owner

ribice commented Nov 23, 2017

I just tested it locally and everything works as expected.

If your site's repo is publicly available, I can test it with your repo then.

@wildskyf
Copy link
Author

wildskyf commented Nov 24, 2017

here is the repo for my blog: https://github.com/wildskyf/blog.wildsky.cc

simply comment themes/kiss/layouts/partials/nav.html L10 - L20 and site would work

thank you. :)

@wildskyf
Copy link
Author

I found it worked after my mis-deploy... https://blog.wildsky.cc/
Hugo Static Site Generator v0.30.2 linux/amd64 BuildDate: 0001-01-01T00:00:00Z

but it would still give me error message at my local...

ERROR 2017/11/24 12:55:14 Error while rendering "page": template: theme/_default/single.html:2:3: executing "theme/_default/single.html" at <partial "nav" .>: error calling partial: template: theme/partials/nav.html:11:51: executing "theme/partials/nav.html" at <index $.Site.Data.th...>: error calling index: index of untyped nil
ERROR 2017/11/24 12:55:14 Error while rendering "taxonomy": template: theme/index.html:2:3: executing "theme/index.html" at <partial "nav" .>: error calling partial: template: theme/partials/nav.html:11:51: executing "theme/partials/nav.html" at <index $.Site.Data.th...>: error calling index: index of untyped nil
ERROR 2017/11/24 12:55:14 Error while rendering "section": template: theme/index.html:2:3: executing "theme/index.html" at <partial "nav" .>: error calling partial: template: theme/partials/nav.html:11:51: executing "theme/partials/nav.html" at <index $.Site.Data.th...>: error calling index: index of untyped nil
ERROR 2017/11/24 12:55:14 Error while rendering "home": template: theme/index.html:2:3: executing "theme/index.html" at <partial "nav" .>: error calling partial: template: theme/partials/nav.html:11:51: executing "theme/partials/nav.html" at <index $.Site.Data.th...>: error calling index: index of untyped nil

@wildskyf
Copy link
Author

I update my hugo to 0.31 and it works now!
Thank you. :)

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

No branches or pull requests

2 participants