Skip to content

Edit category post count #8

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

Closed
wants to merge 1 commit into from
Closed

Edit category post count #8

wants to merge 1 commit into from

Conversation

minhtt159
Copy link

@minhtt159 minhtt159 commented Oct 23, 2020

Fix #2
The article count is false. I create a variable name post_count out of site.categories[category_name].size. Then assign if the blog has nil or 1 or more than 1 article.
This just fix category's post count, not subcategory's post count.

note: Thanks for the beautiful theme. I used it in my blog at https://teamkhunglong.com. But I don't use subcategory, so my changes need to be reviewed carefully.

@minhtt159
Copy link
Author

minhtt159 commented Oct 23, 2020

The file _layouts/category.html need to fix too, please review that file also.

@Andrew-Chen-Wang
Copy link

Use this for subcategories: site.categories[subcategory_name].size

@Andrew-Chen-Wang
Copy link

@minhtt159 Created a PR in your repo for the subcategories edit. Please merge to include in this PR.

@minhtt159 minhtt159 closed this by deleting the head repository Oct 24, 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

Successfully merging this pull request may close these issues.

Articles Count
2 participants