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 charset and viewport meta tags (#68) #77

Merged
merged 1 commit into from
Sep 4, 2020
Merged

Conversation

kiaking
Copy link
Member

@kiaking kiaking commented Sep 4, 2020

close #68

This PR adds charset and viewport meta tag to the head.

@antfu For the src/client/app/composables/head.ts change, I'm being bit lazy here but I'm kinda thinking this should be done in Vite rather than in VitePress. Like it would be nice if we can pass these meta tag settings through Vite config, or maybe VitePress could include these tags by default. What do you think? Or is is it possible already?

@kiaking kiaking requested a review from antfu September 4, 2020 10:56
@kiaking kiaking self-assigned this Sep 4, 2020
@antfu
Copy link
Member

antfu commented Sep 4, 2020

There is a limitation of current implementation of Vite that middlewares cannot directly transform index.html. Planned to fix it. After that, probably a simple vite-plugin-meta or something would do ;)

@kiaking
Copy link
Member Author

kiaking commented Sep 4, 2020

Ah good to know, thanks! 👍 Then I guess we can look forward to it, and while then we could just handle it the way this PR does. Do you find any concern with the implementation?

Copy link
Member

@antfu antfu left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@kiaking
Copy link
Member Author

kiaking commented Sep 4, 2020

Thanks a lot 🙌

@kiaking kiaking merged commit 2e8e1f5 into master Sep 4, 2020
@kiaking kiaking deleted the meta-tags branch September 4, 2020 12:36
@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.

Add <meta charset="utf-8"> to rendered html.
2 participants