We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
--- layout: home features: - icon: 🛠️ title: Simple and minimal, always details: Lorem ipsum... - icon: src: /cool-feature-icon.svg title: Another cool feature details: Lorem ipsum... - icon: dark: /dark-feature-icon.svg light: /light-feature-icon.svg title: Another cool feature details: Lorem ipsum... ---
I want to know how to add line break in details.
What I have tried:
--- details: Lorem <br />ipsum... ---
It doesn't work.
Then try:
--- details: Lorem
,ipsum... ---
Then:
details: | Lorem ipsum...
It doesn't work, too.
Then I tried JSON. The document says that Json also works.
VitePress also supports JSON frontmatter syntax, starting and ending in curly braces:
{ "details": "Lorem\nipsum..." }
I want to know how to achive it.
No response
The text was updated successfully, but these errors were encountered:
That last one should work (using |), but we don't respect whitespace on .details, so just add something like this to CSS for now, it'll work:
|
.VPFeature .details { white-space: pre; }
Sorry, something went wrong.
Maybe... #1913
Thank you for your PR.
所以更新到最新版本后,是用加“\n"的方式吗?
Maybe... #1913 Thank you for your PR. 所以更新到最新版本后,是用加“\n"的方式吗?
你可以这样使用:
<br/>
features: - icon: 🧑🎓 title: 如果善于提问<br/>你会厉害很多 details: '' linkText: 阅读全文 link: /article/blog/悟道/如果善于提问,你会厉害很多
<pre>
features: - icon: 🧑🎓 title: "<pre>如果善于提问<\n>你会厉害很多</pre>" details: '' linkText: 阅读全文 link: /article/blog/悟道/如果善于提问,你会厉害很多
注意方法二中的 title 需要携带引号(网页中不会展示引号)
No branches or pull requests
Is your feature request related to a problem? Please describe.
I want to know how to add line break in details.
What I have tried:
It doesn't work.
Then try:
It doesn't work.
Then:
It doesn't work, too.
Then I tried JSON. The document says that Json also works.
It doesn't work, too.
Describe the solution you'd like
I want to know how to achive it.
Describe alternatives you've considered
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: