Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
adibtatriantama opened this issue Sep 18, 2023 · 2 comments
Closed

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

adibtatriantama opened this issue Sep 18, 2023 · 2 comments

Comments

@adibtatriantama
Copy link

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
Copy link
Author

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
Copy link
Owner

kaiiiz commented May 25, 2024

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

@kaiiiz kaiiiz closed this as completed May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants