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: transformPageData hook #1492

Merged
merged 7 commits into from
Oct 18, 2022
Merged

Conversation

rigor789
Copy link
Contributor

@rigor789 rigor789 commented Oct 15, 2022

This allows injecting custom data into PageData.

This could be used to implement lastUpdated in a more dynamic way as well.

Primary motivation behind this change is to be able to inject data during build, in our case I want to be able to inject a list of contributors to a given page - this requires some async calls to be made & injected into the PageData to be accessible site-wide for any given page.

I've tried implementing the above without this change, and while I was able to do most of it, I was limited to the scope of the <Content> component, and wasn't able to display this new data in the sidebar for example.

@rigor789 rigor789 changed the title feat: transformpageData hook feat: transformPageData hook Oct 15, 2022
@brc-dd brc-dd merged commit afeb06f into vuejs:main Oct 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants