Skip to content

Commit

Permalink
feat: add support for blockquote alerts (#1072)
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored Oct 9, 2024
1 parent f523716 commit c9fcc75
Show file tree
Hide file tree
Showing 26 changed files with 518 additions and 2 deletions.
2 changes: 2 additions & 0 deletions assets/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ import {
faEdit,
faEllipsisH,
faEnvelope,
faExclamationCircle,
faExclamationTriangle,
faExpand,
faExpandAlt,
Expand Down Expand Up @@ -121,6 +122,7 @@ let icons = [
faEdit,
faEllipsisH,
faEnvelope,
faExclamationCircle,
faExclamationTriangle,
faExpand,
faExpandAlt,
Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[module]
[module.hugoVersion]
extended = true
min = "0.128.0"
min = "0.134.0"

[params]
sass_transpiler = "libsass" # dartsass is recommended, since libsass is deprecated.
Expand Down
44 changes: 44 additions & 0 deletions exampleSite/content/posts/markdown-syntax/index.ar.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,50 @@ authors = ["Hugo"]
[^1]: هذا النص مقتبس من لا شيء.

### Blockquote Alerts

```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
```

> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
## الجداول

يدعم هوجو كتابة الجداول على الرغم من أنها ليست جزءًا من المواصفات القياسية للغة ماركداون.
Expand Down
44 changes: 44 additions & 0 deletions exampleSite/content/posts/markdown-syntax/index.fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.

### Blockquote Alerts

```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
```

> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
## Tables

Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Expand Down
44 changes: 44 additions & 0 deletions exampleSite/content/posts/markdown-syntax/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.

### Blockquote Alerts

```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
```

> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
## Tables

Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Expand Down
44 changes: 44 additions & 0 deletions exampleSite/content/posts/markdown-syntax/index.zh-hans.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.

### Blockquote Alerts

```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
```

> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
## Tables

Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Expand Down
44 changes: 44 additions & 0 deletions exampleSite/content/posts/markdown-syntax/index.zh-hant.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,50 @@ The blockquote element represents content that is quoted from another source, op
[^1]: The above quote is excerpted from Rob Pike's [talk](https://www.youtube.com/watch?v=PAAkCSZUG1c) during Gopherfest, November 18, 2015.

### Blockquote Alerts

```markdown
> [!NOTE]
> Useful information that users should know, even when skimming content.

> [!TIP]
> Helpful advice for doing things better or more easily.

> [!IMPORTANT]
> Key information users need to know to achieve their goal.

> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.

> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.

> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
```

> [!NOTE]
> Useful information that users should know, even when skimming content.
> [!TIP]
> Helpful advice for doing things better or more easily.
> [!IMPORTANT]
> Key information users need to know to achieve their goal.
> [!WARNING]
> Urgent info that needs immediate user attention to avoid problems.
> [!CAUTION]
> Advises about risks or negative outcomes of certain actions.
> [!QUESTION]+ Can alerts be foldable?
> Yes, they can, you just need to append the `+` or `-` sign to the type.
>
> Click the heading to preview.
## Tables

Tables aren't part of the core Markdown spec, but Hugo supports supports them out-of-the-box.
Expand Down
15 changes: 15 additions & 0 deletions i18n/ar.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ other = "عنّي"
[actions]
other = "الإجراءات"

[alert_caution]
other = 'Caution'

[alert_important]
other = 'Important'

[alert_note]
other = 'Note'

[alert_tip]
other = 'Tip'

[alert_warning]
other = 'Warning'

[alipay]
other = "علي باي"

Expand Down
15 changes: 15 additions & 0 deletions i18n/de.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ other = "Über mich"
[actions]
other = "Aktionen"

[alert_caution]
other = 'Caution'

[alert_important]
other = 'Important'

[alert_note]
other = 'Note'

[alert_tip]
other = 'Tip'

[alert_warning]
other = 'Warning'

[alipay]
other = "Alipay"

Expand Down
15 changes: 15 additions & 0 deletions i18n/en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ other = "About Me"
[actions]
other = "Actions"

[alert_caution]
other = 'Caution'

[alert_important]
other = 'Important'

[alert_note]
other = 'Note'

[alert_tip]
other = 'Tip'

[alert_warning]
other = 'Warning'

[alipay]
other = "Alipay"

Expand Down
15 changes: 15 additions & 0 deletions i18n/es.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,21 @@ other = "Sobre Mí"
[actions]
other = "Acciones"

[alert_caution]
other = 'Caution'

[alert_important]
other = 'Important'

[alert_note]
other = 'Note'

[alert_tip]
other = 'Tip'

[alert_warning]
other = 'Warning'

[alipay]
other = "Alipay"

Expand Down
15 changes: 15 additions & 0 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
[about_me]
other = "À propos"

[alert_caution]
other = 'Caution'

[alert_important]
other = 'Important'

[alert_note]
other = 'Note'

[alert_tip]
other = 'Tip'

[alert_warning]
other = 'Warning'

[alipay]
other = "Alipay"

Expand Down
Loading

0 comments on commit c9fcc75

Please sign in to comment.