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

Turn off (disable or hide) "blog" section on the main page #316

Closed
stalkerGH opened this issue May 19, 2024 · 10 comments · Fixed by #317
Closed

Turn off (disable or hide) "blog" section on the main page #316

stalkerGH opened this issue May 19, 2024 · 10 comments · Fixed by #317
Labels
enhancement New feature or request

Comments

@stalkerGH
Copy link

Is it possible to disable (hide) the “blog” section on the main page? I would like only the “projects” section to be visible. I know that I can turn off the appearance of links in the menu, such as to the blog or archive, but I'm talking about the main page.

@stalkerGH stalkerGH added the enhancement New feature or request label May 19, 2024
@welpo
Copy link
Owner

welpo commented May 19, 2024

You want to have a blog section but not show it on the main page? Or not have a blog section at all?

@stalkerGH
Copy link
Author

I don't know what is possible (if any). My page will be not "pure blog" but I like "projects" section idea - every post illustrated with thumbnail.

@welpo
Copy link
Owner

welpo commented May 19, 2024

Neither option is possible now. Will look into adding this option later!

@stalkerGH
Copy link
Author

Thanks for reply. It's not very important feature but would be nice to have an option to enable/disable certain sections by simple key = true/false value in configuration file.

@welpo
Copy link
Owner

welpo commented May 19, 2024

Rather than an option to enable/disable, my idea is:

  • Is the path for blog/projects set?
  • If not, don't show that section at all (this is how it works for projects)
  • If yes, show it

So users only need to set one variable, instead of the path to projects/blog as well as the "enable this feature" flag.

I've implemented the base idea, but now I need to fix some CSS issues. Will be ready soon.

@welpo
Copy link
Owner

welpo commented May 19, 2024

Just added the feature in #317. Let me know if you encounter any issues!

@stalkerGH
Copy link
Author

Thank you. It turns off blog posts when I click on "blog" menu entry (I got empty page). But I'd like to turn off "Latest posts" section on main page too. Could you add such option too?

@welpo
Copy link
Owner

welpo commented May 19, 2024

That should not happen. What does your _index.md look like?

On tabi's demo, if I remove the section_path, the blog section still works fine.

Are you trying to serve posts from the base url instead of blog/? If so, that will need another change.

@stalkerGH
Copy link
Author

OK, I got it. I removed paginate_byfrom _index.md in "blog" directory but forgot about _index.md in "content". I removed section_path and "latest posts" dissapears from main page.

Thank you once again for blazing fast commits :)

@welpo
Copy link
Owner

welpo commented May 20, 2024

Happy to hear! 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants