LukasJoswiak / etch

A simple, responsive writing theme for Hugo.
https://lukasjoswiak.github.io/etch/
MIT License
295 stars 166 forks source link

Example site: remove shortcode instagram_simple #34

Closed ksiwt closed 2 years ago

ksiwt commented 2 years ago

It would be appreciated if you could accept removing shortcode instagram_simple.

Because this shortcode uses a deprecated API, see this https://github.com/gohugoio/hugo/issues/7879#issuecomment-716058575 for details or https://gohugo.io/content-management/shortcodes/#example-instagram-display.

Since this shortcode doesn't work on the live demo site of the theme either, I removed the shortcode.

LukasJoswiak commented 2 years ago

Thanks for the PR! For reference, trying to build the example site without this PR results in the error:

ERROR 2022/03/26 17:03:40 instagram shortcode: Missing config value for services.instagram.accessToken. This can be set in config.toml, but it is recommended to configure this via the HUGO_SERVICES_INSTAGRAM_ACCESSTOKEN OS environment variable. If you are using a Client Access Token, remember that you must combine it with your App ID using a pipe symbol (<APPID>|<CLIENTTOKEN>) otherwise the request will fail.

which this PR fixes. Funny story, IIRC the reason the demo site doesn't contain the Instagram example is because I block Facebook domains on my computer, and so when generating the demo site I had to manually remove that section. The example site itself is from https://github.com/gohugoio/HugoBasicExample, and it's a little strange to me that they include a page of social media integrations, but it fits even less well for this theme which is focused mostly on text.

I also see the warning

WARN 2022/03/26 17:03:40 The "twitter_simple" shortcode will soon require two named parameters: user and id.

So I suppose that will need to get fixed at some point as well :)

ksiwt commented 2 years ago

First of all, I appreciate your message and approval of this PR.

I understand the background of demo doesn't contain the instagram example, thank for your explanation.

Regarding warning of hugo twitter shortcode, it seems that already fixed as per below. Also, shortcode twitter_simple is not exists and it seems to be replaced with tweet.

If its okay with you, I will create PR to fix twitter shortcode warning for your example site as well.

LukasJoswiak commented 2 years ago

I see a related issue on the example site repo as well. Happy to accept a PR that fixes the Twitter issue!

ksiwt commented 2 years ago

Thank for your kind acceptance! I created PR. Please check it when you have the time.