Skip to content

Commit 869b7f2

Browse files
committed
feat: embed shortcode
1 parent 804844d commit 869b7f2

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

docs/content/docs/plugins/module-plugins.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,5 @@ linters:
7979
The configuration file can be validated with the JSON Schema: [custom-gcl.jsonschema.json](https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json)
8080

8181
```yml {filename=".custom-gcl.yml"}
82-
{ .CustomGCLReference }
82+
{{% embed file=".tmp/.custom-gcl.reference.yml" %}}
8383
```

docs/content/docs/product/changelog.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ weight: 2
44
excludeSearch: true
55
---
66

7-
## Changelog
7+
Follow the news and releases on [Mastodon](https://fosstodon.org/@golangcilint) and on [Bluesky](https://bsky.app/profile/golangci-lint.run).
88

9-
{.ChangeLog}
9+
`golangci-lint` is a free and open-source project built by volunteers.
10+
11+
If you value it, consider supporting us, we appreciate it!
12+
13+
<div class="hx-mb-6"></div>
14+
<div class="hx-mb-6">
15+
{{< hextra/hero-button text="Donate ❤️" link="https://donate.golangci.org" >}}
16+
</div>
17+
18+
{{% embed file=".tmp/raw_changelog.tmp" %}}

docs/layouts/_shortcodes/embed.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{{- /*
2+
Embeds a file.
3+
4+
@param {string} file The path to the file.
5+
@returns {string}
6+
7+
@example {{% embed file="path/to/file.txt" %}}
8+
*/ -}}
9+
10+
{{- $file := .Get "file" -}}
11+
12+
{{ readFile $file | safeHTML}}

0 commit comments

Comments
 (0)