mirror of
https://github.com/tiennm99/HugoBlox-kit.git
synced 2026-10-12 22:14:08 +00:00
modules: namespace Core module
Hugo does not namespace modules by default, leading to conflicts. Hence, load partials from a namespaced sub-folder to prevent conflicts with similarly named files in other modules.
This commit is contained in:
1 parent
7b61e2f369
commit
5f086c68fb
10 files changed
+13
-14
No files matched your search
@@ -3,7 +3,6 @@ module github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy/v5
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.0
|
||||
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-seo v0.1.0
|
||||
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-core v0.2.1-0.20231101183733-7b61e2f369e6
|
||||
github.com/wowchemy/wowchemy-hugo-themes/modules/wowchemy-seo v0.1.1-0.20231101183733-7b61e2f369e6
|
||||
)
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
|
||||
{{/* Sort */}}
|
||||
{{ $sort_by := $block.content.sort_by | default "Date" }}
|
||||
{{ $sort_by = partial "functions/get_sort_by_parameter" $sort_by }}
|
||||
{{ $sort_by = partial "wowchemy-core/functions/get_sort_by_parameter" $sort_by }}
|
||||
{{ $sort_ascending := $block.content.sort_ascending | default (eq $block.content.order "asc") | default false }}
|
||||
{{ $sort_order := cond $sort_ascending "asc" "desc" }}
|
||||
{{ $query = sort $query $sort_by $sort_order }}
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
{{/* Sort */}}
|
||||
{{ $sort_by := $block.content.sort_by | default "Date" }}
|
||||
{{ $sort_by = partial "functions/get_sort_by_parameter" $sort_by }}
|
||||
{{ $sort_by = partial "wowchemy-core/functions/get_sort_by_parameter" $sort_by }}
|
||||
{{ $sort_ascending := $block.content.sort_ascending | default (eq $block.content.order "asc") | default false }}
|
||||
{{ $sort_order := cond $sort_ascending "asc" "desc" }}
|
||||
{{ $query = sort $query $sort_by $sort_order }}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{ $page := . }}
|
||||
{{ $featured := partial "functions/get_featured_image.html" $page }}
|
||||
{{ $featured := partial "wowchemy-core/functions/get_featured_image.html" $page }}
|
||||
|
||||
{{ $anchor := $page.Params.image.focal_point | default "Smart" }}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<footer class="site-footer">
|
||||
|
||||
{{ partial "functions/get_hook" (dict "hook" "footer-start" "context" .) }}
|
||||
{{ partial "wowchemy-core/functions/get_hook" (dict "hook" "footer-start" "context" .) }}
|
||||
|
||||
{{/* Load footer block */}}
|
||||
{{ $footer_section_name := site.Params.footer.block | default "minimal" }}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
{{ end }}
|
||||
|
||||
{{/* EXTENSIBILITY HOOK: HEAD-START */}}
|
||||
{{ partial "functions/get_hook" (dict "hook" "head-start" "context" .) }}
|
||||
{{ partial "wowchemy-core/functions/get_hook" (dict "hook" "head-start" "context" .) }}
|
||||
|
||||
{{/* Parse theme and font */}}
|
||||
{{ partial "functions/parse_theme" . }}
|
||||
@@ -210,7 +210,7 @@
|
||||
|
||||
{{ partial "cookie_consent" . }}
|
||||
|
||||
{{ $title := partial "functions/get_page_title" . }}
|
||||
{{ $title := partial "wowchemy-core/functions/get_page_title" . }}
|
||||
<title>{{$title}}</title>
|
||||
|
||||
{{/* EXTENSIBILITY HOOK: HEAD-END */}}
|
||||
@@ -218,5 +218,5 @@
|
||||
{{ if templates.Exists "partials/custom_head.html" }}
|
||||
{{ partial "custom_head" . }}
|
||||
{{ end }}
|
||||
{{ partial "functions/get_hook" (dict "hook" "head-end" "context" .) }}
|
||||
{{ partial "wowchemy-core/functions/get_hook" (dict "hook" "head-end" "context" .) }}
|
||||
</head>
|
||||
@@ -267,4 +267,4 @@
|
||||
{{ if templates.Exists "partials/custom_js.html" }}
|
||||
{{ partial "custom_js" . }}
|
||||
{{ end }}
|
||||
{{ partial "functions/get_hook" (dict "hook" "body-end" "context" .) }}
|
||||
{{ partial "wowchemy-core/functions/get_hook" (dict "hook" "body-end" "context" .) }}
|
||||
@@ -41,7 +41,7 @@
|
||||
{{ partial "page_metadata" (dict "page" $item "is_list" 1) }}
|
||||
{{ end }}
|
||||
|
||||
{{ $resource := partial "functions/get_featured_image.html" $item }}
|
||||
{{ $resource := partial "wowchemy-core/functions/get_featured_image.html" $item }}
|
||||
{{ $anchor := $item.Params.image.focal_point | default "Smart" }}
|
||||
{{ with $resource }}
|
||||
{{ $image := .Fill (printf "808x455 %s" $anchor) }}
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
{{ $resource := partial "functions/get_featured_image.html" $item }}
|
||||
{{ $resource := partial "wowchemy-core/functions/get_featured_image.html" $item }}
|
||||
{{ with $resource }}
|
||||
{{ $image := .Resize "150x" }}
|
||||
{{ if ne $image.MediaType.SubType "gif" }}{{ $image = $image.Process "webp" }}{{ end }}
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-md-6 order-first {{$order}}">
|
||||
{{ $resource := partial "functions/get_featured_image.html" $item }}
|
||||
{{ $resource := partial "wowchemy-core/functions/get_featured_image.html" $item }}
|
||||
|
||||
{{ with $resource }}
|
||||
{{/* Use CSS to expand images to consistent widths rather than just Hugo as Hugo can significantly increase the
|
||||
|
||||
Reference in new issue
Block a user