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(use-content-head): add helper for <head> binding #1295

Merged
merged 10 commits into from Jun 27, 2022

Conversation

Tahul
Copy link
Contributor

@Tahul Tahul commented Jun 27, 2022

❓ Type of change

  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)

πŸ“š Description

This PR adds useContentHead(document: ParsedContent, to: RouteLocationNormalized = useRoute()) function.

It gives easy access to <head> binding in both <ContentDoc> and documentDriven features.

It is easily toggleable for <ContentDoc /> via the new head props.

If you want to remove the binding from documentDriven, you can overwrite the default [...slug].vue page.

Documentation has been updated.

Also fixes the latest issues with documentDriven path errors. 😬

πŸ“ Checklist

  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Jun 27, 2022

βœ… Deploy Preview for nuxt-content ready!

Name Link
πŸ”¨ Latest commit bafa242
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/62b9d55139bcc7000a65db79
😎 Deploy Preview https://deploy-preview-1295--nuxt-content.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@Atinux Atinux self-requested a review June 27, 2022 13:48
@Atinux
Copy link
Member

Atinux commented Jun 27, 2022

Can you fix the lint error?

@Tahul Tahul requested review from Atinux and farnabaz June 27, 2022 15:42
@Atinux Atinux merged commit 105f690 into main Jun 27, 2022
@Atinux Atinux deleted the feat/use-content-head branch June 27, 2022 16:17
@farnabaz farnabaz mentioned this pull request Aug 12, 2022
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.

None yet

2 participants