This commit is contained in:
Simon Gardling
2023-10-11 17:38:05 -04:00
commit 032679b34a
242 changed files with 9311 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
---
title: 'Shortcodes'
group_by_year: false
show_date: false
---
See [Shortcodes](https://gohugo.io/content-management/shortcodes/) for more details.

View File

@@ -0,0 +1,35 @@
---
title: 'Bookcase'
---
# Bookcase
Render bookcase layout
## Usage
```
{{</* bookcase section="" /*/>}}
```
`section`: Content resources. Must be a section. Path can be an absolute path (with `/` prefix, relative to base URL), or relative path (without `/`, relative to current path)
> Hugo will handle multilingual scenario out of the box
For example:
```
https://kaiiiz.github.io/hugo-theme-monochrome/configuration
\____________________________________/\____________/
base URL section path
```
## Examples
```html
{{</* bookcase section="/configuration" */>}}
```
{{< bookcase section="/configuration" >}}

View File

@@ -0,0 +1,23 @@
---
title: 'Breadcrumbs'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# Breadcrumbs
Render breadcrumbs navigation
## Usage
```
{{</* breadcrumbs /*/>}}
```
## Examples
```html
{{</* breadcrumbs */>}}
```
{{< breadcrumbs >}}

View File

@@ -0,0 +1,27 @@
---
title: 'CodePen'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# CodePen
Embeded codepen to page.
## Usage
```
{{</* codepen id="" */>}}
```
Paramters:
* `id`: codepen id
## Examples
```html
{{</* codepen id="Vwmpjba" */>}}
```
{{< codepen id="Vwmpjba" >}}

View File

@@ -0,0 +1,79 @@
---
title: 'Color Block'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# Color Block
A block with color
## Usage
```
{{</* color-block style="" */>}}
{{</* /color-block */>}}
```
Paramters:
* `style`: block style
* success
* info
* warning
* error
## Examples
```html
{{</* color-block */>}}
hello world
{{</* /color-block */>}}
```
{{< color-block >}}
hello world
{{< /color-block >}}
```html
{{</* color-block style="success" */>}}
hello world
{{</* /color-block */>}}
```
{{< color-block style="success" >}}
hello world
{{< /color-block >}}
```html
{{</* color-block style="info" */>}}
hello world
{{</* /color-block */>}}
```
{{< color-block style="info" >}}
hello world
{{< /color-block >}}
```html
{{</* color-block style="warning" */>}}
hello world
{{</* /color-block */>}}
```
{{< color-block style="warning" >}}
hello world
{{< /color-block >}}
```html
{{</* color-block style="error" */>}}
hello world
{{</* /color-block */>}}
```
{{< color-block style="error" >}}
hello world
{{< /color-block >}}

View File

@@ -0,0 +1,39 @@
---
title: 'Embed github'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# Embed github
Directly embed github source code like gist with Prism.js syntax highlight.
## Usage
```
{{</* emgithub target="" lang="" hl="" tab_size="" /*/>}}
```
Paramters:
* `target` (required): A valid github file url, for example:
* https://github.com/torvalds/linux/blob/v5.4/README
* https://github.com/torvalds/linux/blob/v5.4/README#L1
* https://github.com/torvalds/linux/blob/v5.4/README#L1-L7
* `lang` (optional): Which language should use for syntax highlighting? `text` will be applied by default.
* `hl` (optional): Line highlight settings. For details, please refer [Prism.js Line Highlight Plugin](https://prismjs.com/plugins/line-highlight/)
* `tab_size` (optional): Default setting is 4 characters.
## Examples
```html
{{</* emgithub target="https://github.com/torvalds/linux/blob/v5.4/README" /*/>}}
```
{{< emgithub target="https://github.com/torvalds/linux/blob/v5.4/README" >}}
```html
{{</* emgithub target="https://github.com/torvalds/linux/blob/v5.4/arch/arm64/kernel/stacktrace.c#L171-L199" lang=c tab_size=8 hl="172-173,192" /*/>}}
```
{{< emgithub target="https://github.com/torvalds/linux/blob/v5.4/arch/arm64/kernel/stacktrace.c#L171-L199" lang=c tab_size=8 hl="171-172,192" >}}

View File

@@ -0,0 +1,33 @@
---
title: 'Icon Group'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# Icon Group
Wrap icons with grid layout
## Usage
```
{{</* icon-group */>}}
{{</* /icon-group */>}}
```
## Examples
```html
{{</* icon-group */>}}
{{</* icon vendor="feather" name="github" */>}}
{{</* icon vendor="feather" name="rss" */>}}
{{</* icon vendor="feather" name="twitter" */>}}
{{</* /icon-group */>}}
```
{{< icon-group >}}
{{< icon vendor="feather" name="github" >}}
{{< icon vendor="feather" name="rss" >}}
{{< icon vendor="feather" name="twitter" >}}
{{< /icon-group >}}

View File

@@ -0,0 +1,44 @@
---
title: "Icon"
bookcase_cover_src: "cover/coding.png"
bookcase_cover_src_dark: "cover/coding_dark.png"
---
# Icon
Monochrome built-in icons.
## Usage
```
{{</* icon vendor="" name="" link="" */>}}
```
Paramters:
- `vendor`: Icon vendor (Supported value: `feather`)
- `link`: Render link for icon
- `name`: Icon name
## Available Icons
Icons from [Feather icons](https://feathericons.com/)
| name | svg |
| -------- | ------------------------------------ |
| globe | {{< icon vendor="feather" name="globe" >}} |
| moon | {{< icon vendor="feather" name="moon" >}} |
| sun | {{< icon vendor="feather" name="sun" >}} |
| github | {{< icon vendor="feather" name="github" >}} |
| facebook | {{< icon vendor="feather" name="facebook" >}} |
| rss | {{< icon vendor="feather" name="rss" >}} |
| twitter | {{< icon vendor="feather" name="twitter" >}} |
| mail | {{< icon vendor="feather" name="mail" >}} |
## Examples
```html
{{</* icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" */>}}
```
{{< icon vendor="feather" name="github" link="https://github.com/kaiiiz/hugo-theme-monochrome" >}}

View File

@@ -0,0 +1,27 @@
---
title: 'JSFiddle'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# JSFiddle
Embeded jsfiddle to page.
## Usage
```
{{</* jsfiddle id="" */>}}
```
Paramters:
* `id`: jsfiddle id
## Examples
```html
{{</* jsfiddle id="5byh90rz" */>}}
```
{{< jsfiddle id="5byh90rz" >}}

View File

@@ -0,0 +1,26 @@
---
title: 'Recent Posts'
---
# Recent Posts
Render recent posts list
## Usage
```
{{</* recent-posts sortby="" limit="" */>}}
```
Paramters:
* `sortby`: `publishDate` or `lastMod`
* `limit`: positive integer, `0` means unlimited
## Examples
```html
{{</* recent-posts sortby="lastMod" limit=5 */>}}
```
{{< recent-posts sortby="lastMod" limit=5 >}}

View File

@@ -0,0 +1,33 @@
---
title: 'Terms Cloud'
bookcase_cover_src: 'cover/coding.png'
bookcase_cover_src_dark: 'cover/coding_dark.png'
---
# Terms Cloud
Render terms cloud, hugo supports `tag` and `category` terms by default, if you want to add your custom terms. Follow the instructions in the [document](https://gohugo.io/content-management/taxonomies/#configure-taxonomies).
## Usage
```
{{</* terms-cloud terms="" /*/>}}
```
Paramters:
* `terms`: terms name
## Examples
```html
{{</* terms-cloud terms="tags" */>}}
```
{{< terms-cloud terms="tags" >}}
```html
{{</* terms-cloud terms="series" */>}}
```
{{< terms-cloud terms="series" >}}