Skip to content

Please remove the words "TIP" and "WARNING" from custom containers #2141

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

Closed
Maxhodges opened this issue Jan 21, 2020 · 7 comments
Closed

Please remove the words "TIP" and "WARNING" from custom containers #2141

Maxhodges opened this issue Jan 21, 2020 · 7 comments
Labels
documentation Any issues related to documentation effort: low Around a day or less status: core team review Priority issues for the core team to review

Comments

@Maxhodges
Copy link

Feature request

For the customer containers plugin, please don't insert the words "TIP" or "WARNING" into the container!

What problem does this feature solve?

That makes the container much less flexible in how it could be used. I might want to use the yellow container to highlight something. But it always says "WARNING". Also, inserting these English words makes it much harder if I want to use VuePress to publish non-English content! Just leave the words out.

What does the proposed API look like?

same

How should this be implemented in your opinion?

remove lines which add "TIP" or "WARNING" to the custom containers

Are you willing to work on this yourself?

Yes!

@Maxhodges
Copy link
Author

Maxhodges commented Jan 21, 2020

Ah I see you can do it like this

<div class="warning custom-block"><p class="custom-block-title">IMPORTANT</p> <p>Make sure a custom component’s name either contains a hyphen or is in PascalCase. Otherwise it will be treated as an inline element and wrapped inside a <code>&lt;p&gt;</code> tag, which will lead to hydration mismatch because <code>&lt;p&gt;</code> does not allow block elements to be placed inside it.</p></div>

does really seem to be documented.

@bencodezen
Copy link
Member

Hey @Maxhodges. Is the concern that there is default titles for these custom containers? Or did you just want the ability to override it?

::: tip Suggestion
This is my suggestion
:::

Or are you saying you want to be able to use the styling with no title at all?

@Maxhodges
Copy link
Author

Ideally, yes, I'd like to be able to supply my own title (in Japanese or French or example); or, use it with no title at all!

I didn't realize you could override like that! Great! My bad. I'll close this issue.

@bencodezen
Copy link
Member

No worries at all. We should try to highlight that feature better in the docs. I'm going to reopen this issue so we address it.

@bencodezen bencodezen reopened this Jan 22, 2020
@bencodezen bencodezen self-assigned this Jan 22, 2020
@bencodezen bencodezen added documentation Any issues related to documentation effort: low Around a day or less labels Jan 22, 2020
@bencodezen bencodezen added the status: core team review Priority issues for the core team to review label Jan 31, 2020
@bencodezen bencodezen removed their assignment Jan 31, 2020
@meteorlxy
Copy link
Member

I think our docs has already "highlighted" this feature:

image

@bencodezen
Copy link
Member

@meteorlxy Agreed, but I think the fact that it was missed means that it could be rewritten in a way that's more obvious. I'm going to experiment a bit with this to see what I can come up with.

lalawow added a commit to lalawow/vuepress that referenced this issue Apr 29, 2020
@lalawow
Copy link
Contributor

lalawow commented Apr 29, 2020

I just commited a PR to this issue. If this PR is good, I can make a PR for the chinese docs too.

larionov pushed a commit to larionov/vuepress that referenced this issue Aug 19, 2020
…uejs#2351)

* docs: refine Markdown Extensions Custom Containers(fix vuejs#2141)

* Update packages/docs/docs/guide/markdown.md

Co-authored-by: Ben Hong <[email protected]>

* Update packages/docs/docs/guide/markdown.md

Co-authored-by: Ben Hong <[email protected]>

* docs: simplify intro language for custom containers

Co-authored-by: Ben Hong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Any issues related to documentation effort: low Around a day or less status: core team review Priority issues for the core team to review
Projects
None yet
Development

No branches or pull requests

4 participants