Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MACAO Hugo Theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MACAO
MACAO Hugo Theme
Commits
3f1bcccb
Commit
3f1bcccb
authored
1 year ago
by
Alex Shpak
Browse files
Options
Downloads
Patches
Plain Diff
#543, Add summary param for section shortcode
parent
e7155b47
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
exampleSite/content.en/docs/shortcodes/section/_index.md
+3
-3
3 additions, 3 deletions
exampleSite/content.en/docs/shortcodes/section/_index.md
layouts/shortcodes/section.html
+2
-0
2 additions, 0 deletions
layouts/shortcodes/section.html
with
5 additions
and
3 deletions
exampleSite/content.en/docs/shortcodes/section/_index.md
+
3
−
3
View file @
3f1bcccb
...
@@ -4,12 +4,12 @@ bookCollapseSection: true
...
@@ -4,12 +4,12 @@ bookCollapseSection: true
# Section
# Section
Section renders pages in section as definition list, using title and description.
Section renders pages in section as definition list, using title and description.
Optional param
`summary`
can be used to show or hide page summary
## Example
## Example
```
tpl
```
tpl
{{</* section */>}}
{{</* section
[summary]
*/>}}
```
```
{{
<section>
}}
{{
<section
summary
>
}}
This diff is collapsed.
Click to expand it.
layouts/shortcodes/section.html
+
2
−
0
View file @
3f1bcccb
...
@@ -3,8 +3,10 @@
...
@@ -3,8 +3,10 @@
<dt>
<dt>
<a
href=
"{{ .RelPermalink }}"
>
{{ partial "docs/title" . }}
</a>
<a
href=
"{{ .RelPermalink }}"
>
{{ partial "docs/title" . }}
</a>
</dt>
</dt>
{{ if (in $.Params "summary") -}}
<dd
class=
"markdown-inner"
>
<dd
class=
"markdown-inner"
>
{{ default .Summary .Description }}
{{ default .Summary .Description }}
</dd>
</dd>
{{ end -}}
{{ end }}
{{ end }}
</dl>
</dl>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment