docs: update docs for huggingface shortcode

This commit is contained in:
ZhenShuo Leo
2025-07-29 04:29:12 +08:00
parent ec912c4a92
commit 550011ee58
4 changed files with 123 additions and 18 deletions

View File

@@ -460,6 +460,35 @@ Finally, custom GitLab instance URL can be provided, as long as the `api/v4/proj
<br/><br/><br/>
## Hugging Face Card
`huggingface` allows you to quickly link a Hugging Face model or dataset, displaying real-time information such as the number of likes and downloads, along with type and description.
| Parameter | Description |
|------------|----------------------------------------------------------------|
| `model` | [String] Hugging Face model in the format of `username/model` |
| `dataset` | [String] Hugging Face dataset in the format of `username/dataset` |
**Note:** Use either `model` or `dataset` parameter, not both.
**Example 1 (Model):**
```md
{{</* huggingface model="google-bert/bert-base-uncased" */>}}
```
{{< huggingface model="google-bert/bert-base-uncased" >}}
**Example 2 (Dataset):**
```md
{{</* huggingface dataset="stanfordnlp/imdb" */>}}
```
{{< huggingface dataset="stanfordnlp/imdb" >}}
<br/><br/><br/>
## Icon
`icon` outputs an SVG icon and takes the icon name as its only parameter. The icon is scaled to match the current text size.