add Toc & readingTime to sample config & change example formatting
This commit is contained in:
parent
993f39f58d
commit
1b3daa8aec
30
README.md
30
README.md
@ -32,12 +32,18 @@
|
|||||||
|
|
||||||
#### Built-in shortcodes
|
#### Built-in shortcodes
|
||||||
|
|
||||||
- **`image`** (prop required: **`src`**; props optional: **`alt`**, **`position`** (**left** is default | center | right), **`style`**)
|
- **`image`** (props required: **`src`**; props optional: **`alt`**, **`position`** (**left** is default | center | right), **`style`**)
|
||||||
- eg: `{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}`
|
- e.g.
|
||||||
|
```go
|
||||||
|
{{< image src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" >}}
|
||||||
|
```
|
||||||
- **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**)
|
- **`figure`** (same as `image`, plus few optional props: **`caption`**, **`captionPosition`** (left | **center** is default | right), **`captionStyle`**)
|
||||||
- eg: `{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}`
|
- e.g.
|
||||||
- **`code`** (prop required: **`language`**; props optional: **`title`**, **`id`**, **`expand`** (default "△"), **`collapse`** (default "▽"), **`isCollapsed`**)
|
```go
|
||||||
- eg:
|
{{< figure src="/img/hello.png" alt="Hello Friend" position="center" style="border-radius: 8px;" caption="Hello Friend!" captionPosition="right" captionStyle="color: red;" >}}
|
||||||
|
```
|
||||||
|
- **`code`** (props required: **`language`**; props optional: **`title`**, **`id`**, **`expand`** (default "△"), **`collapse`** (default "▽"), **`isCollapsed`**)
|
||||||
|
- e.g.
|
||||||
```go
|
```go
|
||||||
{{< code language="css" title="Really cool snippet" id="1" expand="Show" collapse="Hide" isCollapsed="true" >}}
|
{{< code language="css" title="Really cool snippet" id="1" expand="Show" collapse="Hide" isCollapsed="true" >}}
|
||||||
pre {
|
pre {
|
||||||
@ -148,8 +154,18 @@ paginate = 5
|
|||||||
# updatedDatePrefix = "Updated"
|
# updatedDatePrefix = "Updated"
|
||||||
|
|
||||||
# set all headings to their default size (depending on browser settings)
|
# set all headings to their default size (depending on browser settings)
|
||||||
# it's set to `true` by default
|
# oneHeadingSize = true # default
|
||||||
# oneHeadingSize = false
|
|
||||||
|
# whether to show a page's estimated reading time
|
||||||
|
# readingTime = false # default
|
||||||
|
|
||||||
|
# whether to show a table of contents
|
||||||
|
# can be overridden in a page's front-matter
|
||||||
|
# Toc = false # default
|
||||||
|
|
||||||
|
# set title for the table of contents
|
||||||
|
# can be overridden in a page's front-matter
|
||||||
|
# TocTitle = "Table of Contents" # default
|
||||||
|
|
||||||
|
|
||||||
[params.twitter]
|
[params.twitter]
|
||||||
|
Loading…
Reference in New Issue
Block a user