Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_index.md « excerpt-include « shortcodes « content « exampleSite - github.com/vjeantet/hugo-theme-docport.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8eeb7351ea2411c720f3fb916f7a398b1b8c4f70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
---
description: The Excerpt Include shortcode is used to display ‘excerpted’ (that is,
  a segment of) content from one page in another.
title: excerpt-include
---

The Excerpt Include shortcode is used to display 'excerpted' (that is, a segment of) content from one page in another.
Before you can use this shortcode, the excerpt must have been defined using the Excerpt shortcode. {{%alert info%}}Note that you can have more than one Excerpt Include shortcode on a page (although you can have only one Excerpt shortcode on a page).{{%/alert%}}


## Usage

| Parameter | Default | Description |
|:--|:--|:--|
| filename | **required** | Type the filename of the page that contains the excerpt to be displayed.<br/>Path is relative to the content folder|
| panel | none | Determines whether docPort will display a panel around the excerpted content. The panel includes the given panel's value and the border of the panel. By default, the panel and title are not shown.|

## Demo
The paragraph below shows an example of an Excerpt Include shortcode, containing content from an excerpt which we have defined on the Excerpt shortcode page. On the Excerpt Include shortcode below, we have set the options to show both the title of the page and the panel surrounding the content.

```
	{{%/*excerpt-include filename="shortcodes/excerpt/_index.md" panel="From excerpt page" /*/%}}
```

{{%excerpt-include filename="shortcodes/excerpt/_index.md" panel="From excerpt page" /%}}
 
> Don't create an excerpt file in the ```/layouts/shortcodes/``` folder. 
> In this example, ```shortcodes/filename.md``` is part of the ```exampleSite/content``` folder, and ```shortcodes``` is just a path in the ```/content```.