-
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to disable automatic linking for Github-Style shortcodes …
…(backwards-compatible, default is still true)
- Loading branch information
1 parent
79024fb
commit 3333179
Showing
2 changed files
with
8 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
{{/* Read the config */}} | ||
|
||
{{- $imagesLinked := .Page.Params.imagesLinked | default page.Site.Params.page.imagesLinked | default true -}} | ||
{{- if .Title -}} | ||
<figure> | ||
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}} | ||
{{- dict "Src" .Destination "Title" .Text "Caption" .Title "Linked" $imagesLinked "Resources" .Page.Resources | partial "plugin/image.html" -}} | ||
<figcaption class="image-caption"> | ||
{{- .Title | safeHTML -}} | ||
</figcaption> | ||
</figure> | ||
{{- else -}} | ||
<figure> | ||
{{- dict "Src" .Destination "Title" .Text "Linked" true "Resources" .Page.Resources | partial "plugin/image.html" -}} | ||
{{- dict "Src" .Destination "Title" .Text "Linked" $imagesLinked "Resources" .Page.Resources | partial "plugin/image.html" -}} | ||
</figure> | ||
{{- end -}} |