docsifyjs / docsifyjs/docsify

Docs Update: HTML Wrappers in markdown

オープン
#1,293 コメント 3 件 リアクション 4 件 担当者 1 名 @jhildenbiddle が担当を希望しています GitHub で見る
enhancement pinned
主要言語
JavaScript
スター
31.5k
フォーク
5.8k
平均マージ
9日 8時間
マージ済み PR(30日)
2

説明

## Feature request

It may be worth adding a note to the docs that describes using HTML wrappers in markdown for targeting elements for CSS or JavaScript.

For example, wrapping a markdown table in a `

` element with a class:

```markdown

| Header | Header |
| -------| ------- |
| Cell | Cell |
| Cell | Cell |


```

Will allow that specific table to be targeted with the following CSS:

```css
.highlight table {
border: 2px solid red;
}
```

The only concern is that while this works with docsify's current markdown processor, other markdown processors may not handle blocks of HTML & markdown the same way. If docsify decides to change markdown processors in the future, this functionality could break. Just something to consider.

#### What problem does this feature solve?

Docsify site owners often want to target specific elements, but markdown provides no standardized mechanism for adding attributes to elements and docsify only offers this functionality on a handful of elements via helpers. This addresses that problem without using docsify-specific markup that may be unintentionally rendered in other environments (GitHub, GitLab, etc.).

#### What does the proposed API look like?

Just a docs update.

#### How should this be implemented in your opinion?

Docs update.

#### Are you willing to work on this yourself?

Sure.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。