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

Default Category Page Possible? #40

Closed
vmitchell85 opened this issue Jan 28, 2019 · 3 comments
Closed

Default Category Page Possible? #40

vmitchell85 opened this issue Jan 28, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@vmitchell85
Copy link
Contributor

Would it be possible to add a default category page?

If I go to a category url I don't have or haven't created yet I get a No input file specified error.

See https://vincemitchell.me/blog/categories/jigsaw/

So, if I use a new category in my post I have to remember to create a file for that category.

Would it be possible to add capability for a "catch all" or _default.md file maybe?

Hope that makes sense.

@camuthig
Copy link

I put together an event listener that accomplishes this task for me. Instead of using a _default.md, it directly extends the _layouts.category layout and sets a default title on each item. So the page will have a title of Category: <name of category> and then the list of the relevant posts.

I'm not sure if the way I accomplished this was the best route to take, essentially reloading all of the collections and configurations again after they were already loaded once, but it allows me to reuse the heavy lifting that Jigsaw is doing for me.

https://github.com/camuthig/jigsaw-blog-default-categories

Hope it helps. Open to suggestions as well.

@bakerkretzmar bakerkretzmar added the enhancement New feature or request label Apr 17, 2020
@bakerkretzmar
Copy link
Contributor

Somewhat related to tighten/jigsaw#273.

@bakerkretzmar
Copy link
Contributor

@vmitchell85 closing this for now as I think @camuthig's solution will work for you and this isn't currently possible with Jigsaw out of the box. We'll definitely keep this in mind for v2.

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

No branches or pull requests

3 participants