mirror of
https://github.com/imfing/hextra.git
synced 2025-07-03 13:57:16 -04:00
Compare commits
6 Commits
facb708aa1
...
2e089ecf63
Author | SHA1 | Date | |
---|---|---|---|
2e089ecf63 | |||
f1f84b1bf9 | |||
d367a443f1 | |||
27a70e4c12 | |||
aeb0cad979 | |||
fd38dd116f |
@ -112,7 +112,7 @@ Documentation > Guide > Foo Bar
|
||||
|
||||
### Hiding Breadcrumbs
|
||||
|
||||
You can hide breadcrumbs completely from a page by specfying `breadcrumbs: false` in its front matter:
|
||||
You can hide breadcrumbs completely from a page by specifying `breadcrumbs: false` in its front matter:
|
||||
|
||||
```yaml {filename="content/docs/guide/organize-files.md"}
|
||||
---
|
||||
|
@ -87,3 +87,30 @@ Card supports adding tags which could be useful to show extra status information
|
||||
{{</* card link="../callout" title="Card with yellow tag" tag="tag text" tagType="warning" */>}}
|
||||
{{</* /cards */>}}
|
||||
```
|
||||
|
||||
## Columns
|
||||
|
||||
You can specify the maximum number of columns for cards to span by passing the `cols` parameter to the `cards` shortcode. Note that columns will still be collapsed on smaller screens.
|
||||
|
||||
{{< cards cols="1" >}}
|
||||
{{< card link="/" title="Top Card" >}}
|
||||
{{< card link="/" title="Bottom Card" >}}
|
||||
{{< /cards >}}
|
||||
|
||||
{{< cards cols="2" >}}
|
||||
{{< card link="/" title="Left Card" >}}
|
||||
{{< card link="/" title="Right Card" >}}
|
||||
{{< /cards >}}
|
||||
|
||||
```
|
||||
{{</* cards cols="1" */>}}
|
||||
{{</* card link="/" title="Top Card" */>}}
|
||||
{{</* card link="/" title="Bottom Card" */>}}
|
||||
{{</* /cards */>}}
|
||||
|
||||
{{</* cards cols="2" */>}}
|
||||
{{</* card link="/" title="Left Card" */>}}
|
||||
{{</* card link="/" title="Right Card" */>}}
|
||||
{{</* /cards */>}}
|
||||
```
|
||||
|
||||
|
@ -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 -}}
|
||||
<script>
|
||||
@ -38,7 +60,7 @@
|
||||
"data-emit-metadata": "{{ (string .emitMetadata) | default 0 }}",
|
||||
"data-input-position": "{{ .inputPosition | default `top` }}",
|
||||
"data-theme": getGiscusTheme(),
|
||||
"data-lang": "{{ .lang | default $lang }}",
|
||||
"data-lang": "{{ .lang | default $giscus_lang }}",
|
||||
"crossorigin": "anonymous",
|
||||
"async": "",
|
||||
};
|
||||
|
@ -5,7 +5,7 @@ Renders the page using the RenderShortcode method on the Page object.
|
||||
|
||||
You must call this shortcode using the {{% %}} notation.
|
||||
|
||||
@param {string} (postional parameter 0) The path to the page, relative to the content directory.
|
||||
@param {string} (positional parameter 0) The path to the page, relative to the content directory.
|
||||
@returns template.HTML
|
||||
|
||||
@example {{% include "functions/_common/glob-patterns" %}}
|
||||
|
Reference in New Issue
Block a user