Git Product home page Git Product logo

gatsby-plugin-pinterest's Introduction

Welcome to the Gatsby User Collective!

The Gatsby UC was born out of a desire to create higher quality plugins in the Gatsby ecosystem by reducing maintainer work loads.

Goals

Most Gatsby plugin projects aren't massive. Sometimes they need regular maintenance, a lot of the time they do not. Either way, original authors become unable or willing to maintain a plugin at any given moment or maybe indefinately. This is not a comdemnation, it's a fact of life that sometimes maintainers need to move on. No matter the cause, this results in plugins going un-maintained by their authors. Others are willing and able to help; but the bottle neck that cannot be bypassed. At times this means fixing bugs in less ideal ways, creating duplicate implementations of plugins, etc. The Gatsby User collective's goal is to demorcratize the maintenance of these plugins to allow more folks to assist in their maintenance.

Info

The details of this community is still being flushed out. As problems arrize we will solve them together and in an open fasion. For now check out

  • Code of conduct [TBA]
  • Submitting a plugin to the UC [TBA]
  • ...

gatsby-plugin-pinterest's People

Contributors

allcontributors[bot] avatar dependabot[bot] avatar michaeldeboey avatar moonmeister avatar osiux avatar robinmetral avatar robinske avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

gatsby-plugin-pinterest's Issues

Add ability to set data attributes on gatsby-image img tags to support pin type and source settings

According to the docs you can set attributes like data-pin-media or data-pin-url or data-pin-nopin "individually to images on your page."

However gatsby-image doesn't support setting attributes on the img tag so something like this won't work:

<Img
  fluid={image}
  data-pin-url="https://mysite.com/images/dinner-rolls.png" // ignored
/>

This prevents setting attributes when data-pin-hover is set to true or setting data-pin-nopin to ignore images on the page when any image (buttonBookmark) is set.

There's probably a workaround for this but I don't know one off the top of my head. Documenting it here for reference.

The CI is broken since v3.0.0

The recent Travis CI runs for PRs 13, 14 and 15 didn't report status checks back to GitHub.

The runs for the first 2 PRs succeeded and didn't trigger a release (expected), but the last run failed and didn't block the merge.

We should:

  1. address the CI issue (npm dependencies are failing to install with node 15)
  2. ensure Travis reports status checks to GH
  3. run the CI to trigger a release
  4. add branch security to the repo settings, merging should be blocked unless status checks have passed

Don't show bookmark button by default

@robinmetral After @osiux's PR to change the inject method (#3) and your comment (#3 (comment)), I found out that the plugin automatically add the bookmark button on each image you have on your gatsby site.

I'd like to have this default changed, so users of gatsby-remark-embedder won't have this side-effect if they just want to include an embedded board/pin/profile.
Then it's an opt-in for users who want to have this behaviour.

Of course this is for when @osiux's MichaelDeBoey/gatsby-remark-embedder#73 is merged, as gatsby-remark-embedder doesn't support Pinterest at this moment.

Add Button Style options 📌

See Pinterest Developers

Types of Save buttons

    • Image Hover: save any image on hover
    • One Image: save a single predefined image
    • Any Image: save any image from the page

Button Style options for each type

1. Image Hover

  • data-pin-hover: set to true to activate image hover
  • data-pin-tall: bigger button
  • data-pin-round: round logo button
  • data-pin-sticky: if false hover buttons won't appear on mobile devices

2. One Image

  • data-pin-tall: bigger button
  • data-pin-round: round logo button
  • data-pin-count: show Save count above button (Not for round buttons)

3. Any Image

  • data-pin-tall: bigger button
  • data-pin-round: round logo button
  • data-pin-count: show Save count above or beside the button (Not for round buttons)

Save Button only loads on page refresh for manually set `data-pin-do` tags

  • gatsby-plugin-pinterest version: 3.2.2

Problem description:

Save Button does not appear until page refresh if you don't include the saveButton attribute in the plugin options (which sets data-pin-hover) and instead include a tag where you want the pin it button to appear like so (which adds the save button for individual images):

<a href="https://www.pinterest.com/pin/create/button/" data-pin-do="buttonBookmark">
</a>

Suggested solution:
PR incoming

I can create a small reproduction if needed but wanted to submit the issue while it was fresh in my mind.

Pinterest script loaded only on the first page

This plugin uses onClientEntry gatsby hook, which runs only the first time gatsby page loads in the browser. If you're trying to use this plugin on a website with multiple pages, then the pin it button will only appear on the images on the first page you visit. Consider using onRouteUpdate instead of onClientEntry in the gatsby-browser.js file to inject the Pinterest script. You'd also have to ensure that you're only loading the Pinterest script just once in the head section of the document.

gatsby-plugin-pinterest is not working for latest Gatsby.

Invalid plugin options for "gatsby-plugin-pinterest":

  • 'round' is no longer supported. Use 'saveButton.round' instead by setting it to the same value you had before on 'round'.
  • 'tall' is no longer supported. Use 'saveButton.tall' instead by setting it to the same value you had before on
    'tall'.

not finished open and validate gatsby-configs, load plugins - 0.612s

I am trying to add gatsby-plugin-pinterest to the gatsby-shopify -starter project.

  • gatsby-plugin-pinterest version:
  • node version:
  • npm version:

Relevant code or config

What you did:

What happened:

Reproduction repository:

Problem description:

Suggested solution:

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot 📦🚀

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.