Skip to content

Commit

Permalink
Merge pull request #87 from google/LisaFC-patch-2
Browse files Browse the repository at this point in the history
ensure shortcodes work with old-Hugo and nu-Hugo
  • Loading branch information
LisaFC committed Jun 17, 2019
2 parents 44bb4f4 + c0ff0c8 commit 44d75fc
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions layouts/shortcodes/alert.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $color := .Get "color" | default "primary" }}
<div class="alert alert-{{ $color }}" role="alert">
{{ with .Get "title" }}<h4 class="alert-heading">{{ . | safeHTML }}</h4>{{ end }}
{{ .Inner }}
</div>
{{ .Inner | markdownify }}
</div>
1 change: 1 addition & 0 deletions layouts/shortcodes/blocks/cover.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $blockID := printf "td-cover-block-%d" .Ordinal }}
{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }}
{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }}
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/blocks/lead.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $col_id := .Get "color" | default .Ordinal }}
{{ $height := .Get "height" | default "auto" }}
{{/* Height can be one of: auto, min, med, max, full. */}}
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/blocks/section.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $col_id := .Get "color" | default .Ordinal }}
{{ $height := .Get "height" | default "auto" }}
{{ $type := .Get "type" | default "" }}
Expand Down
1 change: 1 addition & 0 deletions layouts/shortcodes/pageinfo.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ $_hugo_config := `{ "version": 1 }` }}
{{ $color := .Get "color" | default "primary" }}
<div class="pageinfo pageinfo-{{ $color }}">
{{ .Inner }}
Expand Down

0 comments on commit 44d75fc

Please sign in to comment.