kaiiiz / hugo-theme-monochrome

Monochrome is a fast, clean and responsive hugo theme
https://kaiiiz.github.io/hugo-theme-monochrome/
MIT License
171 stars 52 forks source link

How to not show recent post on home page? #48

Closed adibtatriantama closed 1 month ago

adibtatriantama commented 10 months ago

When I create content in /post or /blog, the homepage will automatically display the list of posts.

is there a way to set the homepage not to show the recent post?

thank you for creating this theme.

adibtatriantama commented 10 months ago

I solved this by overriding the layouts/home.html

{{ define "content" }}

{{ if .Content }}
    <div class="content-margin">
        {{- partial "content.html" (dict "ctx" . "content" .Content) -}}
    </div>
{{ end }}

{{ partial "postcard/layout.html" (dict "pages" .Site.RegularPages "ctx" .) }}

{{ end }}

and removing this line

{{ partial "postcard/layout.html" (dict "pages" .Site.RegularPages "ctx" .) }}
kaiiiz commented 1 month ago

I think what you want to do is to use Blank layout in home page, which is less hacky than modifying the theme code.