From 550011ee584df18cd3d53454cf66a51c3e2f19c3 Mon Sep 17 00:00:00 2001
From: ZhenShuo Leo <98386542+ZhenShuo2021@users.noreply.github.com>
Date: Tue, 29 Jul 2025 04:29:12 +0800
Subject: [PATCH 1/3] docs: update docs for huggingface shortcode
---
.../content/docs/shortcodes/index.it.md | 54 ++++++++++++-------
.../content/docs/shortcodes/index.ja.md | 29 ++++++++++
exampleSite/content/docs/shortcodes/index.md | 29 ++++++++++
.../content/docs/shortcodes/index.zh-cn.md | 29 ++++++++++
4 files changed, 123 insertions(+), 18 deletions(-)
diff --git a/exampleSite/content/docs/shortcodes/index.it.md b/exampleSite/content/docs/shortcodes/index.it.md
index e0ef39f0..dbb72292 100644
--- a/exampleSite/content/docs/shortcodes/index.it.md
+++ b/exampleSite/content/docs/shortcodes/index.it.md
@@ -202,16 +202,15 @@ This shortcode is for importing code from external sources easily without copyin
| `startLine` | **Optional** The line number to start the import from. |
| `endLine` | **Optional** The line number to end the import at. |
-
-
**Example:**
```md
{{* codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" */>}}
```
+
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/layouts/shortcodes/mdimporter.html" type="go" >}}
```md
@@ -221,7 +220,6 @@ This shortcode is for importing code from external sources easily without copyin
{{< codeimporter url="https://raw.githubusercontent.com/nunocoracao/blowfish/main/config/_default/hugo.toml" type="toml" startLine="11" endLine="18">}}
-
## Codeberg Card
@@ -239,6 +237,7 @@ This shortcode is for importing code from external sources easily without copyin
```md
{{* codeberg repo="forgejo/forgejo" */>}}
```
+
{{< codeberg repo="forgejo/forgejo" >}}
@@ -304,6 +303,7 @@ Blowfish also supports automatic conversion of images included using standard Ma
```md
{{* forgejo server="https://v11.next.forgejo.org" repo="a/mastodon" */>}}
```
+
{{< forgejo server="https://v11.next.forgejo.org" repo="a/mastodon" >}}
@@ -340,7 +340,6 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
-
**Example 2: responsive gallery**
```md
@@ -411,6 +410,7 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
```md
{{* gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" */>}}
```
+
{{< gitea server="https://git.fsfe.org" repo="FSFE/fsfe-website" >}}
@@ -437,7 +437,7 @@ In order to add images to the gallery, use `img` tags for each image and add `cl
## GitLab Card
-`gitlab` allows you to quickly link a GitLab Project (GitLab's jargon for repo).
+`gitlab` allows you to quickly link a GitLab Project (GitLab's jargon for repo).
It displays realtime stats about it, such as the number of stars and forks it has.
Unlike `github` it can't display the main programming language of a project.
Finally, custom GitLab instance URL can be provided, as long as the `api/v4/projects/` endpoint is available, making this shortcode compatible with most self-hosted / enterprise deployments.
@@ -459,6 +459,35 @@ Finally, custom GitLab instance URL can be provided, as long as the `api/v4/proj
+## 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" >}}
+
+
+
## 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.
@@ -501,13 +530,10 @@ Check out the [mathematical notation samples]({{< ref "mathematical-notation" >}
-
## Keyword
-
The `keyword` component can be used to visually highlight certain important words or phrases, e.g. professional skills etc. The `keywordList` shortcode can be used to group together multiple `keyword` items. Each item can have the following properties.
-
| Parameter | Description |
| --------- | --------------------------------------- |
@@ -559,7 +585,7 @@ When life gives you lemons, make lemonade.
When life gives you lemons, make lemonade.
{{< /lead >}}
-
+
## List
@@ -598,7 +624,7 @@ The `where` and `value` values are used in the following query `where .Site.Regu
-## LTR/RTL
+## LTR/RTL
`ltr` and `rtl` allows you to mix your contents. Many RTL language users want to include parts of the content in LTR. Using this shortcode will let you do so, and by leveraging `%` as the outer-most dilemeter in the shortcode [Hugo shortcodes](https://gohugo.io/content-management/shortcodes/#shortcodes-with-markdown), any markdown inside will be rendered normally.
@@ -631,10 +657,8 @@ This shortcode allows you to import markdown files from external sources. This i
| --------- | ------------------------------------------------------- |
| `url` | **Required** URL to an externally hosted markdown file. |
-
-
**Example:**
```md
@@ -644,7 +668,6 @@ This shortcode allows you to import markdown files from external sources. This i
{{< mdimporter url="https://raw.githubusercontent.com/nunocoracao/nunocoracao/master/README.md" >}}
-
## Mermaid
@@ -694,7 +717,6 @@ You can see some additional Mermaid examples on the [diagrams and flowcharts sam
The `timeline` creates a visual timeline that can be used in different use-cases, e.g. professional experience, a project's achievements, etc. The `timeline` shortcode relies on the `timelineItem` sub-shortcode to define each item within the main timeline. Each item can have the following properties.
-
| Parameter | Description |
| ----------- | -------------------------------------------- |
@@ -744,14 +766,12 @@ With other shortcodes
{{* /timeline */>}}
```
-
{{< timeline >}}
{{< timelineItem icon="github" header="header" badge="badge test" subheader="subheader" >}}
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus non magna ex. Donec sollicitudin ut lorem quis lobortis. Nam ac ipsum libero. Sed a ex eget ipsum tincidunt venenatis quis sed nisl. Pellentesque sed urna vel odio consequat tincidunt id ut purus. Nam sollicitudin est sed dui interdum rhoncus.
{{ timelineItem >}}
-
{{< timelineItem icon="code" header="Another Awesome Header" badge="date - present" subheader="Awesome Subheader">}}
With html code