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

feat: add prismic provider #269

Merged
merged 6 commits into from
May 17, 2021
Merged

feat: add prismic provider #269

merged 6 commits into from
May 17, 2021

Conversation

lihbr
Copy link
Member

@lihbr lihbr commented May 14, 2021

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Add Prismic provider~ cc @pi0

closes #150

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly. (PR: feat: add prismic provider #269 (this PR))
  • I have added tests to cover my changes (if not applicable, please state why)
  • All new and existing tests are passing.

src/runtime/providers/prismic.ts Outdated Show resolved Hide resolved
src/runtime/providers/prismic.ts Outdated Show resolved Hide resolved
src/runtime/providers/prismic.ts Outdated Show resolved Hide resolved
@lihbr
Copy link
Member Author

lihbr commented May 14, 2021

Thanks for the review! Addressed your suggestions, wasn't aware of those new utilities on UFO. Looks better like that! Let me know if anything else~

@atinux atinux requested a review from danielroe May 17, 2021 08:52

Integration between [Prismic](https://prismic.io/docs) and the image module.

To use this provider you just need to specify an empty object at `prismic` key in Nuxt Image options object.
Copy link
Member

Choose a reason for hiding this comment

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

Something along the lines of:

Suggested change
To use this provider you just need to specify an empty object at `prismic` key in Nuxt Image options object.
No specific configuration is required for Prismic support. You just need to specify `provider: 'prismic'` in your configuration to make it the default, or pass it directly when you need it, for example:
```html
<nuxt-img provider="prismic" src="..." />

src,
{ modifiers = {}, baseURL = PRISMIC_IMGIX_BUCKET } = {}
) => {
const operations = operationsGenerator(modifiers)
Copy link
Member

Choose a reason for hiding this comment

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

Perf: We serialize modifiers to operations and use parseQuery in return statement! (postponing since it is mostly a utility refactor for all providers with operationsGenerator)

@pi0 pi0 merged commit 306064b into nuxt:main May 17, 2021
procrates pushed a commit to procrates/nuxt-image that referenced this pull request Feb 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plans to support Prismic as a provider?
3 participants