-
-
Notifications
You must be signed in to change notification settings - Fork 116
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Feat: add custom partials options
params.customPartials
- Loading branch information
Showing
4 changed files
with
52 additions
and
8 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
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,31 +1,62 @@ | ||
{{- /* | ||
To avoid upgrade conflicts and facilitate the reference of theme components, | ||
it's strongly recommended to copy this file from the theme to your project and override it. | ||
*/ -}} | ||
|
||
{{- define "custom-head" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.head -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-profile" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.profile -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-aside" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.aside -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-comment" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.comment -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-footer" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.footer -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-widgets" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.widgets -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-assets" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.assets -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-post__footer:before" -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.postFooterBefore -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} | ||
|
||
{{- define "custom-post__footer:after" -}} | ||
{{- end -}} | ||
{{- $ctx := . -}} | ||
{{- range .Site.Params.customPartials.postFooterAfter -}} | ||
{{- partial . $ctx -}} | ||
{{- end -}} | ||
{{- end -}} |
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