mirror of
https://github.com/dillonzq/LoveIt.git
synced 2025-04-27 06:06:20 +02:00
fix(shortcode): replace deprecated tweet shortcode with x
This commit is contained in:
parent
08d05ab7eb
commit
e0aba35955
9 changed files with 28 additions and 16 deletions
exampleSite
layouts
|
@ -807,9 +807,9 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
|
|||
[privacy.googleAnalytics]
|
||||
# ...
|
||||
[privacy.twitter]
|
||||
enableDNT = true
|
||||
# ...
|
||||
[privacy.youtube]
|
||||
privacyEnhanced = true
|
||||
# ...
|
||||
|
||||
# Options to make output .md files
|
||||
[mediaTypes]
|
||||
|
|
|
@ -809,9 +809,9 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
|
|||
[privacy.googleAnalytics]
|
||||
# ...
|
||||
[privacy.twitter]
|
||||
enableDNT = true
|
||||
# ...
|
||||
[privacy.youtube]
|
||||
privacyEnhanced = true
|
||||
# ...
|
||||
|
||||
# 用于输出 Markdown 格式文档的设置
|
||||
[mediaTypes]
|
||||
|
|
|
@ -136,19 +136,19 @@ The rendered output looks like this:
|
|||
|
||||
[Documentation of `ref` and `relref`](https://gohugo.io/content-management/shortcodes#ref-and-relref)
|
||||
|
||||
## 7 tweet
|
||||
## 7 x
|
||||
|
||||
[Documentation of `tweet`](https://gohugo.io/content-management/shortcodes#tweet)
|
||||
[Documentation of `x`](https://gohugo.io/shortcodes/x/)
|
||||
|
||||
Example `tweet` input:
|
||||
Example `x` input:
|
||||
|
||||
```markdown
|
||||
{{</* tweet user=GoHugoIO id=917359331535966209 */>}}
|
||||
{{</* x user=GoHugoIO id=917359331535966209 */>}}
|
||||
```
|
||||
|
||||
The rendered output looks like this:
|
||||
|
||||
{{< tweet user=GoHugoIO id=917359331535966209 >}}
|
||||
{{< x user=GoHugoIO id=917359331535966209 >}}
|
||||
|
||||
## 8 vimeo
|
||||
|
||||
|
|
|
@ -137,19 +137,19 @@ For more information please have a look at GitHub issue [#7879](https://github.c
|
|||
|
||||
[`ref` 和 `relref` 的文档](https://gohugo.io/content-management/shortcodes#ref-and-relref)
|
||||
|
||||
## 7 tweet
|
||||
## 7 x
|
||||
|
||||
[`tweet` 的文档](https://gohugo.io/content-management/shortcodes#tweet)
|
||||
[`x` 的文档](https://gohugo.io/shortcodes/x/)
|
||||
|
||||
一个 `tweet` 示例:
|
||||
一个 `x` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* tweet user=GoHugoIO id=917359331535966209 */>}}
|
||||
{{</* x user=GoHugoIO id=917359331535966209 */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果如下:
|
||||
|
||||
{{< tweet user=GoHugoIO id=917359331535966209 >}}
|
||||
{{< x user=GoHugoIO id=917359331535966209 >}}
|
||||
|
||||
## 8 vimeo
|
||||
|
||||
|
|
|
@ -763,9 +763,9 @@ ignoreErrors = ["error-remote-getjson", "error-missing-instagram-accesstoken"]
|
|||
[privacy.googleAnalytics]
|
||||
# ...
|
||||
[privacy.twitter]
|
||||
enableDNT = true
|
||||
# ...
|
||||
[privacy.youtube]
|
||||
privacyEnhanced = true
|
||||
# ...
|
||||
|
||||
# Options to make output .md files
|
||||
# 用于输出 Markdown 格式文档的设置
|
||||
|
|
1
layouts/partials/internal/x.html
Normal file
1
layouts/partials/internal/x.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{- template "_internal/shortcodes/x.html" . -}}
|
1
layouts/partials/internal/x_simple.html
Normal file
1
layouts/partials/internal/x_simple.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{- template "_internal/shortcodes/x_simple.html" . -}}
|
5
layouts/shortcodes/x.html
Normal file
5
layouts/shortcodes/x.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- if ge hugo.Version "0.142.0" -}}
|
||||
{{- partial "internal/x.html" . -}}
|
||||
{{- else -}}
|
||||
{{- template "_internal/shortcodes/twitter.html" . -}}
|
||||
{{- end -}}
|
5
layouts/shortcodes/x_simple.html
Normal file
5
layouts/shortcodes/x_simple.html
Normal file
|
@ -0,0 +1,5 @@
|
|||
{{- if ge hugo.Version "0.142.0" -}}
|
||||
{{- partial "internal/x_simple.html" . -}}
|
||||
{{- else -}}
|
||||
{{- template "_internal/shortcodes/twitter_simple.html" . -}}
|
||||
{{- end -}}
|
Loading…
Add table
Reference in a new issue