zzossig / hugo-theme-zzo

Make a blog with hugo zzo theme!
https://themes.gohugo.io//theme/hugo-theme-zzo/en/
MIT License
743 stars 256 forks source link

Cannot build site because of Instagram shortcode - "This endpoint is deprecated" #339

Closed tangodev closed 4 years ago

tangodev commented 4 years ago

Hello Everyone!

I'm working on a static site and I've chosen Hugo with the zzo theme. I'm running into an issue: the site fails to build, because an Instagram post is unavailable with the generated URL.

The Instagram resource is available: https://www.instagram.com/p/BGvuInzyFAe/ but not with this URL: https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true

Error from API:

This endpoint is deprecated. Please read https://developers.facebook.com/docs/instagram/oembed to learn how to migrate your endpoint.

Full from gitlab builder:

Submodule 'themes/zzo' (https://github.com/zzossig/hugo-theme-zzo.git) registered for path 'themes/zzo'
20 Cloning into '/builds/tangodelta/hugo-poc-website-3/themes/zzo'...
21 Submodule path 'themes/zzo': checked out 'e09bbc6d4e7cd88ca327b74bd855794c246ebc36'
22 Entering 'themes/zzo'
24
Executing "step_script" stage of the job script
00:02
25 $ hugo
26 Start building sites … 
27 ERROR 2020/10/29 13:12:51 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": Failed to retrieve remote file: Bad Request
28 Total in 1333 ms
29 Error: Error building site: logged 1 error(s)
31
Cleaning up file based variables
00:01
33 ERROR: Job failed: exit code 255

This is similar to this issue: https://github.com/zzossig/hugo-theme-zzo/issues/239

When I remove the shortcode, the site builds.

File affected:

content/en/posts/rich-content.md
zzossig commented 4 years ago

It is the Hugo issue. Just delete the Instagram shortcode from your markdown file. https://github.com/gohugoio/hugo/issues/7893 https://github.com/gohugoio/hugo/issues/7879 https://github.com/gohugoio/hugo/issues/7866

tangodev commented 4 years ago

Ooooh! OK. Thank you for the info!