feat(content): support complete local resource references (#388)

This commit is contained in:
Dillon
2020-05-28 17:05:37 +08:00
committed by GitHub
parent 0c1f7d0ef8
commit aa48df5edd
93 changed files with 872 additions and 714 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -7,11 +7,12 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo provides multiple built-in shortcodes for author convenience and to keep your markdown content clean."
images: ["/images/theme-documentation-built-in-shortcodes/featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.png"
tags: ["shortcodes"]
categories: ["documentation"]
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
lightgallery: true
---
@@ -36,18 +37,18 @@ Hugo ships with a set of predefined shortcodes that represent very common usage.
Example `figure` input:
```markdown
{{</* figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" */>}}
{{</* figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" */>}}
```
The rendered output looks like this:
{{< figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" >}}
{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}}
The HTML looks like this:
```html
<figure>
<img src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg"/>
<img src="/images/lighthouse.jpg"/>
<figcaption>
<h4>Lighthouse (figure)</h4>
</figcaption>

View File

@@ -7,11 +7,12 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo fournit plusieurs shortcodes intégrés pour la commodité de l'auteur et pour garder votre contenu de démarque propre."
images: ["/images/theme-documentation-built-in-shortcodes/featured-image.png"]
resources:
- name: "featured"
src: "featured-image.png"
tags: ["shortcodes"]
categories: ["documentation"]
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
lightgallery: true
---
@@ -41,18 +42,18 @@ Hugo ships with a set of predefined shortcodes that represent very common usage.
Example `figure` input:
```markdown
{{</* figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" */>}}
{{</* figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" */>}}
```
The rendered output looks like this:
{{< figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" >}}
{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}}
The HTML looks like this:
```html
<figure>
<img src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg"/>
<img src="/images/lighthouse.jpg"/>
<figcaption>
<h4>Lighthouse (figure)</h4>
</figcaption>

View File

@@ -7,11 +7,12 @@ draft: false
author: "Dillon"
authorLink: "https://dillonzq.com"
description: "Hugo 提供了多个内置的 Shortcodes, 以方便作者保持 Markdown 内容的整洁."
images: ["/images/theme-documentation-built-in-shortcodes/featured-image.png"]
resources:
- name: "featured-image"
src: "featured-image.png"
tags: ["shortcodes"]
categories: ["documentation"]
featuredImage: "/images/theme-documentation-built-in-shortcodes/featured-image.png"
lightgallery: true
---
@@ -37,18 +38,18 @@ Hugo 附带了一组预定义的 shortcodes, 它们实现了一些非常常见
一个 `figure` 示例:
```markdown
{{</* figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" */>}}
{{</* figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" */>}}
```
呈现的输出效果如下:
{{< figure src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg" title="Lighthouse (figure)" >}}
{{< figure src="/images/lighthouse.jpg" title="Lighthouse (figure)" >}}
输出的 HTML 看起来像这样:
```html
<figure>
<img src="/images/theme-documentation-built-in-shortcodes/lighthouse.jpg"/>
<img src="/images/lighthouse.jpg"/>
<figcaption>
<h4>Lighthouse (figure)</h4>
</figcaption>