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

fix(gatsby-remark-images): allow showCaptions to accept array of valid strings #27998

Merged
merged 1 commit into from
Nov 12, 2020

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Nov 12, 2020

Description

showCaptions can receive either boolean (true which internally translates into array of ['title', 'alt']) or array of valid strings - see

const captionOptions = Array.isArray(options.showCaptions)
? options.showCaptions
: options.showCaptions === true
? [`title`, `alt`]
: false

Related Issues

Fixes #27983

@pieh pieh requested a review from a team as a code owner November 12, 2020 12:32
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Nov 12, 2020
mfrachet
mfrachet previously approved these changes Nov 12, 2020
Copy link
Contributor

@mfrachet mfrachet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you 🚀 🙏🏻

pvdz
pvdz previously approved these changes Nov 12, 2020
@pieh pieh dismissed stale reviews from pvdz and mfrachet via ea3abcd November 12, 2020 12:48
@pieh pieh force-pushed the fix/gatsby-remark-images/showCaptions-schema branch from 637ab9b to ea3abcd Compare November 12, 2020 12:48
@pieh pieh added hotfix and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Nov 12, 2020
@pieh pieh added the bot: merge on green Gatsbot will merge these PRs automatically when all tests passes label Nov 12, 2020
@gatsbybot gatsbybot merged commit 3675467 into master Nov 12, 2020
@delete-merged-branch delete-merged-branch bot deleted the fix/gatsby-remark-images/showCaptions-schema branch November 12, 2020 13:17
vladar pushed a commit that referenced this pull request Nov 13, 2020
vladar added a commit that referenced this pull request Nov 13, 2020
…27998) (#28035)

* fix(gatsby-remark-images): adding missing plugin options (#27944)

(cherry picked from commit 08447bd)

* fix(gatsby-remark-images): allow showCaptions to accept array of valid strings (#27998)

(cherry picked from commit 3675467)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

gatsby-remark-images: showCaptions option does not accept an array of attributes
4 participants