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: new [components <Head> and <Config>](https://vike.dev/useConfig#config-head) #174

Merged
merged 22 commits into from
Aug 17, 2024

Conversation

brillout
Copy link
Member

@brillout brillout commented Aug 8, 2024

Is it possible to implement the <Config> and <Head> components for Vue?

How can the children be "accessed" so that we can pass it to useConfig({ Head })?

Directly using useConfig() does work, see this example. So the only thing missing is to be able to "access" the children of <Head>. Vue seems to work in terms of slots, not in terms of children; I don't know how we can "pass the children" with Vue.

Contribution welcome 💚

@pdanpdan
Copy link
Collaborator

pdanpdan commented Aug 8, 2024

There is this: https://github.com/unjs/unhead/blob/main/packages/vue/src/components/Head.ts

@pdanpdan pdanpdan force-pushed the brillout/head-components branch 3 times, most recently from 76ffe81 to 09c8831 Compare August 15, 2024 18:26
Copy link
Collaborator

@pdanpdan pdanpdan left a comment

Choose a reason for hiding this comment

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

I should have put a comment. The regex must work as if 's' modifier is set for '.', so instead of writing a positive it's easier to write a negative for something that it's not there.

@brillout
Copy link
Member Author

Yea I've realized, let me add support for regex flags to @brillout/part-regex.

examples/full/.testRun.ts Outdated Show resolved Hide resolved
@brillout brillout merged commit ca92f98 into main Aug 17, 2024
5 checks passed
@brillout brillout deleted the brillout/head-components branch August 17, 2024 09:49
@brillout
Copy link
Member Author

Merged 🚀

Thank you for the nice collaboration 🤝

I've added our work to https://vike.dev/releases/2024-08#improved-head-management.

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