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 make posts in the added collection visible in category tab? #2007

Closed
arcstone09 opened this issue Mar 21, 2024 · 3 comments
Closed

How to make posts in the added collection visible in category tab? #2007

arcstone09 opened this issue Mar 21, 2024 · 3 comments
Labels
info needed More information is needed for this issue

Comments

@arcstone09
Copy link

arcstone09 commented Mar 21, 2024

I want to make my posts displayed by its category when ‘category’ tab is clicked.

In order to do this, I uncommented the ‘jekyll-archives’ part in _config.yml.

For posts in collections which are already in the template(ex. Blog posts), it works.

However, posts that are located in collection that I added don’t appear when I click the category tab. What should I do?

(To add collection, I changed _config.yml collections part and navigation.yml file, added [collection_name].html file in _pages folder, and wrote new posts with category in the folder named _study that I made. Posts in _study folder is visible in the ‘study’ tab, but not visible in the ‘category’ tab.)

@rjzupkoii rjzupkoii added the info needed More information is needed for this issue label Mar 21, 2024
@rjzupkoii
Copy link
Collaborator

Do you mean that you want posts sorted by category - as opposed to date - when something is clicked, or are creating a new category that appears in the menu?

@arcstone09
Copy link
Author

arcstone09 commented Mar 21, 2024

I want posts sorted by category. (I guess /_pages/category-archive.html does this)
I wrote new posts as below, and it appears in the 'study' menu, but not in 'Category' menu(which links to category-archive.html)


title: 'test'
date: 2024-03-18
permalink: /study/2024-03-18-study-1
categories: coding
tags:

  • cool posts
  • category1
  • category2

This post will show up by default. To disable scheduling of future posts, edit config.yml and set future: false.

However, for posts in default collection menu(not in study), they are visible when I click 'Category' menu and sorted by their categories.

I added
main:

  • title: "Category"
    url: /categories/
    in navigation.yml file to create the menu which sorts posts by category.

@arcstone09
Copy link
Author

Do you mean that you want posts sorted by category - as opposed to date - when something is clicked, or are creating a new category that appears in the menu?

If you visit arcstone09.github.io site and go to 'Category' menu, posts with categories name 'coding' would be displayed. A post titled 'test' which is visible in Study menu is also classified as 'coding' category, but it is not shown in the 'Category' menu. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info needed More information is needed for this issue
Projects
None yet
Development

No branches or pull requests

2 participants