mirror of
https://github.com/imfing/hextra.git
synced 2025-05-16 03:18:32 -04:00
Compare commits
7 Commits
9c5e3d33a3
...
761ac6ba80
Author | SHA1 | Date | |
---|---|---|---|
![]() |
761ac6ba80 | ||
![]() |
526be88d7b | ||
![]() |
2863a3a029 | ||
![]() |
852a07b15e | ||
![]() |
27a70e4c12 | ||
![]() |
aeb0cad979 | ||
![]() |
fd38dd116f |
@ -25,6 +25,11 @@ This is the third step.
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
{{< callout emoji="ℹ️" >}}
|
||||||
|
Please note that this shortcode is intended **only for Markdown content**.
|
||||||
|
If you put HTML content or other shortcodes as step content, it may not render as expected.
|
||||||
|
{{< /callout >}}
|
||||||
|
|
||||||
Put Markdown h3 header within `steps` shortcode.
|
Put Markdown h3 header within `steps` shortcode.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
@ -1,4 +1,26 @@
|
|||||||
{{- $lang := site.Language.LanguageCode | default `en` -}}
|
{{ $default_chinese := "zh-CN" }}
|
||||||
|
|
||||||
|
{{ $sl := site.Language }}
|
||||||
|
{{ $giscus_lang := $sl.Lang | default `en` }}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Special case for Chinese.
|
||||||
|
Giscus uses the geophraphical language code for these.
|
||||||
|
See: https://github.com/giscus/giscus/tree/main/locales
|
||||||
|
*/}}
|
||||||
|
{{ if eq $giscus_lang "zh" }}
|
||||||
|
{{/* Create a code formatted for Giscus: zh-CN or zn-TW. */}}
|
||||||
|
{{ $code := lower $sl.LanguageCode }}
|
||||||
|
|
||||||
|
{{ if (hasSuffix $code "-cn") }}
|
||||||
|
{{ $giscus_lang = "zh-CN" }}
|
||||||
|
{{ else if (hasSuffix $code "-tw") }}
|
||||||
|
{{ $giscus_lang = "zh-TW" }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $giscus_lang = $default_chinese }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
|
||||||
{{- with site.Params.comments.giscus -}}
|
{{- with site.Params.comments.giscus -}}
|
||||||
<script>
|
<script>
|
||||||
@ -38,7 +60,7 @@
|
|||||||
"data-emit-metadata": "{{ (string .emitMetadata) | default 0 }}",
|
"data-emit-metadata": "{{ (string .emitMetadata) | default 0 }}",
|
||||||
"data-input-position": "{{ .inputPosition | default `top` }}",
|
"data-input-position": "{{ .inputPosition | default `top` }}",
|
||||||
"data-theme": getGiscusTheme(),
|
"data-theme": getGiscusTheme(),
|
||||||
"data-lang": "{{ .lang | default $lang }}",
|
"data-lang": "{{ .lang | default $giscus_lang }}",
|
||||||
"crossorigin": "anonymous",
|
"crossorigin": "anonymous",
|
||||||
"async": "",
|
"async": "",
|
||||||
};
|
};
|
||||||
|
@ -1,10 +1,4 @@
|
|||||||
{{/* site.GoogleAnalytics is deprecated in Hugo v0.120.0 */}}
|
{{- with site.Config.Services.GoogleAnalytics.ID }}
|
||||||
{{/* it will be removed in a future version */}}
|
|
||||||
{{- $gtagID := "" -}}
|
|
||||||
{{- with site.GoogleAnalytics -}}{{ $gtagID = . }}{{- end -}}
|
|
||||||
{{- with site.Config.Services.GoogleAnalytics.ID -}}{{ $gtagID = . }}{{- end -}}
|
|
||||||
|
|
||||||
{{- with $gtagID }}
|
|
||||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
|
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
|
||||||
<script>
|
<script>
|
||||||
|
@ -30,12 +30,11 @@
|
|||||||
{{ partialCached "head-css.html" . }}
|
{{ partialCached "head-css.html" . }}
|
||||||
|
|
||||||
|
|
||||||
<!-- Google Analytics -->
|
<!-- Google Analytics -->
|
||||||
{{- if and (eq hugo.Environment "production") (or .Site.GoogleAnalytics .Site.Config.Services.GoogleAnalytics.ID) }}
|
{{- if and (eq hugo.Environment "production") .Site.Config.Services.GoogleAnalytics.ID }}
|
||||||
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin />
|
<link rel="preconnect" href="https://www.googletagmanager.com" crossorigin />
|
||||||
{{ partial "google-analytics.html" . }}
|
{{ partial "google-analytics.html" . }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
/* Initialize light/dark mode */
|
/* Initialize light/dark mode */
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
class="hextra-tabs-panel hx-rounded hx-pt-6 hx-hidden data-[state=selected]:hx-block"
|
class="hextra-tabs-panel hx-rounded hx-pt-6 hx-hidden data-[state=selected]:hx-block"
|
||||||
id="tabs-panel-{{ .Ordinal }}"
|
id="tabs-panel-{{ .Ordinal }}"
|
||||||
role="tabpanel"
|
role="tabpanel"
|
||||||
{{ if eq .Ordinal $defaultIndex }}tabindex="0"{{ end }}
|
{{- if eq .Ordinal $defaultIndex }} tabindex="0" {{ end -}}
|
||||||
{{ if eq .Ordinal $defaultIndex }}data-state="selected"{{ end }}
|
{{- if eq .Ordinal $defaultIndex }} data-state="selected" {{ end -}}
|
||||||
>
|
>
|
||||||
{{ .InnerDeindent | markdownify }}
|
{{- .InnerDeindent | markdownify -}}
|
||||||
</div>
|
</div>
|
||||||
|
{{- /* Drop trailing newlines */ -}}
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
role="tab"
|
role="tab"
|
||||||
type="button"
|
type="button"
|
||||||
aria-controls="tabs-panel-{{ $i }}"
|
aria-controls="tabs-panel-{{ $i }}"
|
||||||
{{ if eq $i $defaultIndex }}aria-selected="true"{{ end }}
|
{{- if eq $i $defaultIndex }} aria-selected="true" {{ end -}}
|
||||||
{{ if eq $i $defaultIndex }}tabindex="0"{{ end }}
|
{{- if eq $i $defaultIndex }} tabindex="0" {{ end -}}
|
||||||
{{ if eq $i $defaultIndex }}data-state="selected"{{ end }}
|
{{- if eq $i $defaultIndex }} data-state="selected"{{ end -}}
|
||||||
>
|
>
|
||||||
{{- $item -}}
|
{{- $item -}}
|
||||||
</button>
|
</button>
|
||||||
@ -23,5 +23,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
{{ .Inner }}
|
{{- .Inner -}}
|
||||||
</div>
|
</div>
|
||||||
|
{{- /* Drop trailing newlines */ -}}
|
||||||
|
@ -7,6 +7,6 @@ command = "cd exampleSite && hugo --gc --minify --themesDir ../.. -b ${DEPLOY_PR
|
|||||||
ignore = "false"
|
ignore = "false"
|
||||||
|
|
||||||
[build.environment]
|
[build.environment]
|
||||||
HUGO_VERSION = "0.126.1"
|
HUGO_VERSION = "0.132.2"
|
||||||
GO_VERSION = "1.22.3"
|
GO_VERSION = "1.22.3"
|
||||||
NODE_VERSION = "22.2.0"
|
NODE_VERSION = "22.2.0"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user