escalate / hugo-split-theme

Port of Split template by One Page Love to Hugo
https://themes.gohugo.io/themes/hugo-split-theme/
Other
76 stars 88 forks source link

Support no image on legal or text-only pages #31

Closed afoeder closed 2 months ago

afoeder commented 2 months ago

I am aware the Theme is supposedly a single page theme.

However, we had the use case that we wanted to display the usual Imprint, General Terms & Conditions, Data Privacy stuff on dedicated pages. We didn't want any key images there. However, due to the following snippet the respective markup is always rendered, the parameters to control this are on Site level and not able to be influenced on Page level:


<!-- Image -->
{{ if .Site.Params.visual.image.enable }}

  <div class="split-image">

  </div>
…

I therefore suggest and also adjusted on my end to do the following instead:

<!-- Image -->
{{ if .Params.visual.image.enable | default .Site.Params.visual.image.enable }}

   <div class="split-image">

  </div>

With a FrontMatter block that says

visual.image.enable = false

now this allows to "overwrite" the Site parameter with a Page parameter setting.

escalate commented 2 months ago

Hello @afoeder ,

you are welcome to create a merge request for your idea.

Best regards Felix

github-actions[bot] commented 2 months ago

:tada: This issue has been resolved in version 1.5.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: