hugo-profile
hugo-profile copied to clipboard
Does not run locally out of box
Describe the bug If you try to run this hugo theme out of the box with the sample config you get a twitter API error
'''ERROR 2023/12/03 11:20:55 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=GoHugoIO&dnt=false": Failed to retrieve remote file: Bad Request'''
To Reproduce Steps to reproduce the behavior:
-
hugo new site exampleSite
-
cd exampleSite/themes
-
git clone https://github.com/gurusabarish/hugo-profile.git
-
cd ..
-
cp -r themes/hugo-profile/exampleSite/* ./
-
hugo server -D
After step six server fails to run with the JSON request error.
Expected behavior Local hugo instance runs with sample site
Desktop (please complete the following information):
- OS: Linux Mint 20.3
Hey @Samurai336 , This issue might be connected to the now closed issue #141 . The twitter_cards align with the error you were seeing. You should try now with the updates 👍
In case the error really was the following (added some new lines):
Error: error building site: render: failed to render pages: render of "page" failed: "/Users/HOMEFOLDER/website/themes/hugo-profile/layouts/_default/baseof.html:5:6":
execute of template failed:
template: _default/gallery.html:5:6: executing "_default/gallery.html" at <partial "head.html" .>: error calling partial:
execute of template failed: template: _internal/opengraph.html:6:15: executing "_internal/opengraph.html" at
<partial "_funcs/get-page-images" .>: error calling partial: execute of template failed: template:
partials/_funcs/get-page-images.html:24:18: executing "partials/_funcs/get-page-images.html" at
<urls.Parse>: error calling Parse: error in Parse: unable to cast map[string]interface {}
{"src":"https://iso.500px.com/wp-content/uploads/2016/03/stock-photo-142984111-1500x1000.jpg"} of type map[string]interface {} to string
The solution for me was in the linked PR's commit #141.
Changing my own gallery.md
with images
-key to galleryImages
solved the issue.