mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-18 02:14:12 +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">
|
<span class="article-categories">
|
||||||
<i class="fa fa-folder"></i>
|
<i class="fa fa-folder"></i>
|
||||||
{{ range $k, $v := $.Params.categories }}
|
{{ 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 }}
|
>{{ if lt $k (sub $categoriesLen 1) }}, {{ end }}
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
"message": {{ i18n "cookie_message" | default "This website uses cookies to ensure you get the best experience on our website." }},
|
"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!" }},
|
"dismiss": {{ i18n "cookie_dismiss" | default "Got it!" }},
|
||||||
"link": {{ i18n "cookie_learn" | default "Learn more" }},
|
"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>
|
</script>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<footer class="site-footer">
|
<footer class="site-footer">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
|
||||||
{{ with .Site.GetPage "page" "privacy.md" }}
|
{{ with .Site.GetPage "privacy.md" }}
|
||||||
<p class="powered-by">
|
<p class="powered-by">
|
||||||
{{ printf "<a href=\"%s\">%s</a>" .Permalink .Title | safeHTML }}
|
{{ printf "<a href=\"%s\">%s</a>" .Permalink .Title | safeHTML }}
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
{{ end }}
|
{{ end }}
|
||||||
{{ if $.Params.projects }}
|
{{ if $.Params.projects }}
|
||||||
{{ range $.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 }}">
|
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .Permalink }}">
|
||||||
{{ i18n "btn_project" }}
|
{{ i18n "btn_project" }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
{{ if gt $tagsLen 0 }}
|
{{ if gt $tagsLen 0 }}
|
||||||
<div class="article-tags">
|
<div class="article-tags">
|
||||||
{{ range $k, $v := $.Params.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 }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
{{ range $.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 }}">
|
<a class="btn btn-primary btn-outline{{ if $is_list }} btn-xs{{end}}" href="{{ .Permalink }}">
|
||||||
{{ i18n "btn_project" }}
|
{{ i18n "btn_project" }}
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
{{ $tagCount := len $taxonomy.Pages }}
|
{{ $tagCount := len $taxonomy.Pages }}
|
||||||
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
|
{{ $weight := div (sub (math.Log $tagCount) (math.Log $min)) (sub (math.Log $max) (math.Log $min)) }}
|
||||||
{{ $fontSize := add $fontSmall (mul (sub $fontBig $fontSmall) $weight) }}
|
{{ $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 }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|||||||
Reference in new issue
Block a user