mirror of
https://github.com/dillonzq/LoveIt.git
synced 2024-11-14 02:46:16 +01:00
chore: update person shortcode docs
This commit is contained in:
parent
b32577783e
commit
e13a4adb6a
2 changed files with 55 additions and 11 deletions
|
@ -385,28 +385,28 @@ Raw content using Markdown syntax: {{< raw >}}**Hello**{{< /raw >}}
|
|||
|
||||
`person` is a shortcode to insert a link to a personal webpage marked up as [h-card](http://microformats.org/wiki/h-card).
|
||||
|
||||
The `person` shortcode takes the following parameters (all of these are optional, but it makes sense to have at least **url** and **name** and/or **nick**):
|
||||
The `person` shortcode has the following named parameters:
|
||||
|
||||
* **url** (**first** positional parameter)
|
||||
* **url** *[required]* (**first** positional parameter)
|
||||
|
||||
URL of the personal page.
|
||||
|
||||
* **name** (**second** positional parameter)
|
||||
* **name** *[required]* (**second** positional parameter)
|
||||
|
||||
Name of the person.
|
||||
|
||||
* **nick**
|
||||
|
||||
Nickame of the person.
|
||||
|
||||
* **text** (**third** positional parameter)
|
||||
* **text** *[optional]* (**third** positional parameter)
|
||||
|
||||
Text to display as hover tooltip of the link.
|
||||
|
||||
* **picture** (**fourth** positional parameter)
|
||||
* **picture** *[optional]* (**fourth** positional parameter)
|
||||
|
||||
A picture to use as person's avatar.
|
||||
|
||||
* **nick** *[optional]*
|
||||
|
||||
Nickame of the person.
|
||||
|
||||
Example `person` input:
|
||||
|
||||
```markdown
|
||||
|
@ -420,3 +420,5 @@ Without an explicitly given picture, a generic icon is used. This input:
|
|||
```markdown
|
||||
{{</* person "https://dillonzq.com/" Dillon "author of the LoveIt theme" */>}}
|
||||
```
|
||||
|
||||
This renders as {{< person "https://dillonzq.com/" Dillon "author of the LoveIt theme" >}}.
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
weight: 4
|
||||
title: "主题文档 - 扩展 Shortcodes"
|
||||
date: 2020-03-03T16:29:59+08:00
|
||||
lastmod: 2020-03-03T16:29:59+08:00
|
||||
lastmod: 2020-06-12T10:10:13+03:00
|
||||
draft: false
|
||||
author: "Dillon"
|
||||
authorLink: "https://dillonzq.com"
|
||||
|
@ -249,7 +249,7 @@ This is a **right-aligned** paragraph.
|
|||
|
||||
`admonition` shortcode 有以下命名参数:
|
||||
|
||||
* **type** *[必需]* (**第一个**位置参数)
|
||||
* **type** *[可选]* (**第一个**位置参数)
|
||||
|
||||
`admonition` 横幅的类型, 默认值是 `note`.
|
||||
|
||||
|
@ -375,3 +375,45 @@ console.log('Hello LoveIt!');
|
|||
{{< /raw >}}
|
||||
|
||||
原始的带有 Markdown 语法的内容: {{< raw >}}**Hello**{{< /raw >}}
|
||||
|
||||
## 13 person
|
||||
|
||||
`person` shortcode 用来在你的文章中以 [h-card](http://microformats.org/wiki/h-card) 的格式插入个人网站链接.
|
||||
|
||||
`person` shortcode 有以下命名参数:
|
||||
|
||||
* **url** *[必需]* (**第一个**位置参数)
|
||||
|
||||
URL of the personal page.
|
||||
|
||||
* **name** *[必需]* (**第二个**位置参数)
|
||||
|
||||
Name of the person.
|
||||
|
||||
* **text** *[可选]* (**第三个**位置参数)
|
||||
|
||||
Text to display as hover tooltip of the link.
|
||||
|
||||
* **picture** *[可选]* (**第四个**位置参数)
|
||||
|
||||
A picture to use as person's avatar.
|
||||
|
||||
* **nick** *[可选]*
|
||||
|
||||
Nickame of the person.
|
||||
|
||||
一个 `person` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* person url="https://evgenykuznetsov.org" name="Evgeny Kuznetsov" nick="nekr0z" text="author of this shortcode" picture="https://evgenykuznetsov.org/img/avatar.jpg" */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果为 {{< person url="https://evgenykuznetsov.org" name="Evgeny Kuznetsov" nick="nekr0z" text="author of this shortcode" picture="https://evgenykuznetsov.org/img/avatar.jpg" >}}.
|
||||
|
||||
一个使用通用图标的 `person` 示例:
|
||||
|
||||
```markdown
|
||||
{{</* person "https://dillonzq.com/" Dillon "author of the LoveIt theme" */>}}
|
||||
```
|
||||
|
||||
呈现的输出效果为 {{< person "https://dillonzq.com/" Dillon "author of the LoveIt theme" >}}.
|
||||
|
|
Loading…
Reference in a new issue