Skip to content

feat: compile site metadata #25

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

Merged
merged 4 commits into from
Sep 12, 2023
Merged

feat: compile site metadata #25

merged 4 commits into from
Sep 12, 2023

Conversation

svvimming
Copy link
Collaborator

This PR adds two plugins to help compile SEO and site metadata which is passed to the Nuxt 3 native composable useHead() which adds this data to the html document head tag.

The two plugins get-seo.js and compile-seo.js have been copied from our Nuxt 2 boilerplate with only slight adjustments to accommodate a new store structure with the Pinia store and the config object in Nuxt 3. A wrapping function around each has also been included as Nuxt 3 needs this in order to properly inject the functions into the app scope.

Also site content is now added to the store once fetched with the useAsyncData composable and from there is used throughout the app rather than accessing data directly from imported json objects.

Ticket link

https://www.notion.so/agencyundone/Open-graph-and-metadata-via-Nuxt-3-00cba4168fa2487fae3efe1f001b3563?pvs=4

@svvimming svvimming self-assigned this Sep 11, 2023
Copy link
Member

@orvn orvn left a comment

Choose a reason for hiding this comment

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

Looks good! The only issue is that for some reason, the open graph image comes through as an empty string?

@svvimming
Copy link
Collaborator Author

Looks good! The only issue is that for some reason, the open graph image comes through as an empty string?

weird... the correct urls are there in meta tags:
Screen Shot 2023-09-12 at 10 59 07 AM

@orvn do you think it has something to do with the preview url hash not matching the site url with the singularity.storage domain?

@orvn orvn self-requested a review September 12, 2023 16:48
Copy link
Member

@orvn orvn left a comment

Choose a reason for hiding this comment

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

do you think it has something to do with the preview url hash not matching the site url with the singularity.storage domain?

Hmm, it might, let's merge this and see. No harm in going to production at this point.

@orvn orvn merged commit 607002b into develop Sep 12, 2023
@orvn orvn deleted the feat-compile-site-metadata branch September 12, 2023 16:49
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.

2 participants