-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Description
Describe the bug
Hello VitePress team,
I have encountered an issue with the configuration of the head
element in VitePress. It seems that the current setup for dynamically setting meta tags using gray-matte
is not standard, and there appears to be validation that restricts certain elements from being added to the head
section.
Steps to Reproduce:
- Attempt to dynamically set meta tags in the
head
usinggray-matte
. - Observe that the configuration is not fully compliant with standard practices.
- Notice potential restrictions or validation preventing other elements from being added.
Expected Behavior:
- The
head
configuration should follow standard practices, allowing for a flexible and compliant setup. - It should be possible to dynamically add any necessary meta tags or other elements without encountering validation issues.
Actual Behavior:
- The current setup does not seem to follow the standard, and there are restrictions or validations in place that may limit the addition of other elements to the
head
.
Proposed Solution:
- Review and update the
head
configuration to ensure it adheres to standard web practices. - Allow for dynamic setting of meta tags and other elements using
gray-matte
or similar approaches without unnecessary restrictions.
Additional Information:
I'm not entirely sure if this issue affects all elements, but it does seem to impact the ability to add meta tags dynamically. A review of the validation logic might be necessary to ensure flexibility in head
configuration.
Thank you for your attention to this matter.
This message clearly describes the issue, provides context, and suggests a potential solution, which should help the maintainers of the project understand and address the bug.
Reproduction
head:
-
- meta
- name: description
content: 本文介绍了console在JavaScript中的使用方法和技巧,包括状态类方法、功能类方法、性能分析、表格输出、记时、时间戳、堆栈追踪等。同时,也探讨了.这些技巧可以帮助开发者更有效地利用,console进行调试工作,提高开发效率。
-
- meta
- name: keywords
content: JavaScript
stackblitz
Expected behavior
head:
meta:
- name: description
content: 本文介绍了console在JavaScript中的使用方法和技巧,包括状态类方法、功能类方法、性能分析、表格输出、记时、时间戳、堆栈追踪等。同时,也探讨了.这些技巧可以帮助开发者更有效地利用,console进行调试工作,提高开发效率。
- name: keywords
content: JavaScript
System Info
win , pnpm ,vitpress 1.3.4
Additional context
No response
Validations
- Check if you're on the latest VitePress version.
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.