mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-06 08:13:41 +00:00
Add support for Hugo v0.45
Add support for breaking changes in Hugo v0.45 (arguments changed for `GetPage`). Close #601
This commit is contained in:
1 parent
d84b961f81
commit
8aea0ea015
7 files changed
+7
-7
No files matched your search
@@ -45,7 +45,7 @@
|
||||
<span class="article-categories">
|
||||
<i class="fa fa-folder"></i>
|
||||
{{ range $k, $v := $.Params.categories }}
|
||||
<a href="{{ ($.Site.GetPage "taxonomyTerm" "categories" .).Permalink }}">{{ . }}</a
|
||||
<a href="{{ ($.Site.GetPage (printf "categories/%s" .)).Permalink }}">{{ . }}</a
|
||||
>{{ if lt $k (sub $categoriesLen 1) }}, {{ end }}
|
||||
{{ end }}
|
||||
</span>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
"message": {{ i18n "cookie_message" | default "This website uses cookies to ensure you get the best experience on our website." }},
|
||||
"dismiss": {{ i18n "cookie_dismiss" | default "Got it!" }},
|
||||
"link": {{ i18n "cookie_learn" | default "Learn more" }},
|
||||
"href": {{ with .Site.GetPage "page" "privacy.md" }}{{ printf "%s" .Permalink }}{{ else }}"https://cookies.insites.com"{{ end }}
|
||||
"href": {{ with .Site.GetPage "privacy.md" }}{{ printf "%s" .Permalink }}{{ else }}"https://cookies.insites.com"{{ end }}
|
||||
}
|
||||
})});
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<footer class="site-footer">
|
||||
<div class="container">
|
||||
|
||||
{{ with .Site.GetPage "page" "privacy.md" }}
|
||||
{{ with .Site.GetPage "privacy.md" }}
|
||||
<p class="powered-by">
|
||||
{{ printf "<a href=\"%s\">%s</a>" .Permalink .Title | safeHTML }}
|
||||
</p>
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
{{ end }}
|
||||
{{ if $.Params.projects }}
|
||||
{{ range $.Params.projects }}
|
||||
{{ with ($.Site.GetPage "page" "project" .) }}
|
||||
{{ with ($.Site.GetPage (printf "project/%s" .)) }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .Permalink }}">
|
||||
{{ i18n "btn_project" }}
|
||||
</a>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
{{ if gt $tagsLen 0 }}
|
||||
<div class="article-tags">
|
||||
{{ range $k, $v := $.Params.tags }}
|
||||
<a class="label label-default" href="{{ ($.Site.GetPage "taxonomyTerm" "tags" .).Permalink }}">{{ . }}</a>
|
||||
<a class="label label-default" href="{{ ($.Site.GetPage (printf "tags/%s" .)).Permalink }}">{{ . }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
</a>
|
||||
{{ end }}
|
||||
{{ range $.Params.projects }}
|
||||
{{ with ($.Site.GetPage "page" "project" .) }}
|
||||
{{ with ($.Site.GetPage (printf "project/%s" .)) }}
|
||||
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .Permalink }}">
|
||||
{{ i18n "btn_project" }}
|
||||
</a>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
{{ $tagCount := len $taxonomy.Pages }}
|
||||
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
|
||||
{{ $fontSize := add $fontSmall (mul (sub $fontBig $fontSmall) $weight) }}
|
||||
<a href="{{ ($.Site.GetPage "taxonomyTerm" "tags" $name).Permalink }}" style="font-size:{{ $fontSize }}rem">{{ $name }}</a>
|
||||
<a href="{{ ($.Site.GetPage (printf "tags/%s" $name)).Permalink }}" style="font-size:{{ $fontSize }}rem">{{ $name }}</a>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
||||
Reference in new issue
Block a user