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

Does not run locally out of box #139

Open
Samurai336 opened this issue Dec 3, 2023 · 2 comments
Open

Does not run locally out of box #139

Samurai336 opened this issue Dec 3, 2023 · 2 comments

Comments

@Samurai336
Copy link

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:

  1. hugo new site exampleSite
  2. cd exampleSite/themes
  3. git clone https://github.com/gurusabarish/hugo-profile.git
  4. cd ..
  5. cp -r themes/hugo-profile/exampleSite/* ./
  6. 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
@jochavez
Copy link
Contributor

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 👍

@devTechi
Copy link

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.

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

3 participants