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

Remove built-in shortcodes for 3rd party services #7893

Closed
onedrawingperday opened this issue Oct 27, 2020 · 14 comments
Closed

Remove built-in shortcodes for 3rd party services #7893

onedrawingperday opened this issue Oct 27, 2020 · 14 comments

Comments

@onedrawingperday
Copy link
Contributor

onedrawingperday commented Oct 27, 2020

In light of the recent changes of the Instagram API that Facebook has enforced -see #7879 for the details-

I propose that all built-in shortcodes for 3rd party services (Twitter, Google Analytics, Instagram, YouTube, Vimeo etc) be removed from Hugo source.

Times have changed.

The onus of third party tracking cookies should be on individual website admins and Hugo should have nothing to do with enabling this practice anymore.

Also these shortcodes come with a maintenance cost that could be spent in other areas.

If a Hugo site admin wishes to continue having the functionality of the built-in shortcodes, then they can replicate these at the project level.

@marcusramberg
Copy link

I suspect I'll switch to another blog engine that supports embedding if this proposal goes through. 🤷‍♂️

@bitsapien
Copy link

@marcusramberg The OP here wants to remove it from the scope of the "Hugo" project and that would mean they would stop existing in Hugo's code base.

These would still live on, but as separate projects with their own software development lifecycle. They can just be plugged in as sensible defaults with the initial setup of Hugo (maybe?).

Documentation for this transition would be helpful though.

@bep
Copy link
Member

bep commented Oct 28, 2020

@bitsapien is correct.

@jasikpark
Copy link

🙋 I use the simple configuration of those shortcodes on my website, and I would find it harder to include the embeds in a privacy-preserving way without them. Perhaps instead they could be switched so that the simple version is the default, and the privacy-infringing embed is the switch you have to flip on?

  [privacy]
  [privacy.instagram]
    simple = true
  [privacy.twitter]
    simple = true
  [privacy.vimeo]
    simple = true
  [privacy.youtube]
    privacyEnhanced = true

@jasikpark
Copy link

i.e. make the default of all of those switches true rather than false, and require a privacyEnhanced = false clause in the config.toml

@jasikpark
Copy link

these have also provided good examples of how to write shortcodes for me when trying to figure it out myself -- I think including them in the base documentation should at least be replaced by similarly useful shortcode examples.

@capnfabs
Copy link
Contributor

I wonder if, as an alternative to disabling these services entirely, we could split things out into separate fetch and render steps? This wouldn't address the general privacy concerns, but would have prevented the Instagram breakage in #7879.

How I propose that this would work:

  • Fetch required data from remote service, cache it all on disk, keyed off the shortcode params.
  • Render from those cached files instead of relying upon remote servers and an internet connection for every rebuild.

The 'cache' can then be checked into source control, like what we recommend with processed images to keep build times down.

The outcome of a system like this in the Instagram breakage would be -- it would have prevented new shortcodes from being added, but everything that had already been fetched would still be able to be rendered.

This also gives you the ability to punt on the privacy problem a little bit -- the only compulsory communication with remote servers would be at build time. If we designed it right, theme / site implementors could then choose whether to present the fetched data using the service's standard embed code (i.e. what we have now), or render using custom, stripped down logic, which doesn't reference the host service.

@onedrawingperday
Copy link
Contributor Author

@capnfabs

Please do not post general thoughts that are not about this issue.

This issue is about removing the internal shortcodes.

General discussion goes in the forum: https://discourse.gohugo.io/

In the past there had been discussion about what you proposed. Please look it up in the forum or open another GitHub issue with your proposal or discuss it at the forum.

However I am a busy person and this issue should not pop-up in my notifications without good reason.

Thanks.

@gj52
Copy link

gj52 commented Dec 13, 2020

Remove all this 3rd party things ....
I've overwritten all this with my own to embed the used CSS framework.
Move it in the themes, if needed.

@rodrigoalcarazdelaosa
Copy link

rodrigoalcarazdelaosa commented Jan 4, 2021

Related to this, the tweet shortcode will soon need to be adapted to use the new v2 API: https://developer.twitter.com/en/docs/twitter-api/migrate

@sharebear
Copy link

Related to this, the tweet shortcode will soon need to be adapted to use the new v2 API: https://developer.twitter.com/en/docs/twitter-api/migrate

That day appears to have arrived, created #8130 to cover just that issue independantly of whether the code it split out of the core hugo repo.

@bep bep modified the milestones: v0.81, v0.82 Feb 19, 2021
@philoserf
Copy link
Contributor

philoserf commented Mar 20, 2021

On removing third-party short-codes from the Hugo codebase

TL;DR: I support moving third-party short-codes out of the core Hugo codebase.

Factors that contribute to my position are:

  • we have Hugo modules that allow Hugo users to add short-codes as a component
  • the move simplifies the core Hugo codebase
  • maintenance cadence for third-party APIs need not drive a Hugo release
  • developers with a focused interest in a third-party short-code have a simpler codebase
  • questions of third-party endorsement are moved out of core Hugo

@davidsneighbour
Copy link
Contributor

I said it at other places: Hugo is there to translate your layouts and your contents into a website. I think that ALL "internal" templates are basically holding the developers down and waste their time adapting to updates and changes in standards and implementations. An external repo with "internal layouts" would be ok. Moving them as sample into the documentation would be ok. I personally tend to NOT use anything that is internal or a Hugo based shortcode.

@bep bep removed this from the v0.82 milestone Mar 21, 2021
@bep bep added this to the v0.85 milestone Jun 18, 2021
@bep bep modified the milestones: v0.85, v0.86 Jul 5, 2021
@bep bep modified the milestones: v0.86, v0.87, v0.88 Jul 26, 2021
@bep bep modified the milestones: v0.88, v0.89 Sep 2, 2021
@bep bep modified the milestones: v0.89, v0.90 Nov 2, 2021
@bep bep modified the milestones: v0.90, v0.91.0 Dec 13, 2021
@bep bep modified the milestones: v0.91.0, v0.92.0 Dec 22, 2021
@bep bep modified the milestones: v0.92.0, v0.93.0 Jan 12, 2022
@bep bep modified the milestones: v0.93.0, v0.94.0 Mar 1, 2022
@bep bep modified the milestones: v0.94.0, v0.95.0, v0.96.0 Mar 9, 2022
@bep bep modified the milestones: v0.96.0, v0.97.0 Mar 24, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests