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

categories and tags are not generated #57

Closed
codeandcloud opened this issue May 21, 2020 · 8 comments
Closed

categories and tags are not generated #57

codeandcloud opened this issue May 21, 2020 · 8 comments
Labels
bug Something isn't working
Milestone

Comments

@codeandcloud
Copy link

I have converted my blogger template to jekyll template. On conversion, the layout of an example post will be like
---
layout: post
title: Binding html select using knockoutjs and asp.net mvc
date: '2013-11-25T18:42:00.001+05:30'
author: Naveen
categories:
- asp.net mvc
- javascript
- knockout.js
tags:
- asp.net mvc
- javascript
- knockout.js
modified_time: '2013-11-25T18:54:00.520+05:30'
---
URL: https://codeandcloud.github.io/

The site have these issues

  1. Getting 404'ed on clicking a tag on https://codeandcloud.github.io/tabs/tags/
  2. Categories doesn't get displayed at all

When I run $ bash tools/init.sh, terminal shows

$ bash tools/init.sh
[INFO] Success to update lastmod for 41 post(s).
warning: LF will be replaced by CRLF in _data/updates.yml.
The file will have its original line endings in your working directory
[master ec06b7d] [Automation] Updated the Lastmod for post(s).
1 file changed, 41 insertions(+), 41 deletions(-)
Updated the Lastmod for post(s).

Its missing

[INFO] Succeed! 3 category-pages created.
[INFO] Succeed! 4 tag-pages created.

Why are those pages not created? What am I doing wrong?

Thanks for this wonderful theme.

@cotes2020
Copy link
Owner

Due to technical limitations, the scripting tool cannot read the multiline yaml array:

---
categories:
- asp.net mvc
- ....

tags:
- asp.net mvc
- ...
---

Change to single line will be fine:

---
categories: [item1, item2]      # notice that there are no more than two items.
tags: [item1, item2, ... itemN ]
---

@codeandcloud
Copy link
Author

codeandcloud commented May 21, 2020

Ok. So the changes are

  1. make both array like
  2. categories max two

I have an additional question. Will spaces in between work for tags/categories? for example, server-side paging

@cotes2020
Copy link
Owner

Spaces are allowed.

@codeandcloud
Copy link
Author

Now the tag and category pages are generated.

That part is done but the two errors mentioned here persists.

Two examples of generated tag and category page are as follows

tag: jquery

image

category: javascript
image

Is this because the files inside the _posts folder are .html files and not .md?

Does a category should necessarily have two sub-categories?
I have either 1 or 2 categories in all pages.

Is there a problem if I omit categories altogether?
Is there a condition that category name and tag name cannot be same?

@cotes2020
Copy link
Owner

cotes2020 commented May 21, 2020

The page generator script wil read all the files inside _posts, not only .md files. And the details of categories and tags, please read this post of demo site.

@codeandcloud
Copy link
Author

Thanks. It was due to a error while jekyll serve

I found two minor things

  1. Suppose I use a sub-category "General" for category "ASP.NET" and "JavaScript" categories. The posts get aligned wrong. (I know its because the front matter will be same for same category)
  2. If I have a category list [JavaScript, jQuery] for a post, adding category list [JavaScript] to another post fails with error in line 18 of tabs/categories.md

Just letting you know. I guess you already knew it and its by design.

Thanks for the wonderful design. Looks Minimalist and chic. My style. Loved it
And thanks also for the prompt response. Much appreciated. <3

Closing this issue as it's resolved

@cotes2020
Copy link
Owner

cotes2020 commented May 22, 2020

  1. Suppose I use a sub-category "General" for category "ASP.NET" and "JavaScript" categories. The posts get aligned wrong. (I know its because the front matter will be same for same category)

Indeed, the name and hierarchy of each category must be unique throughout the site.

  1. If I have a category list [JavaScript, jQuery] for a post, adding category list [JavaScript] to another post fails with error in line 18 of tabs/categories.md

Thank you for your clue! There was a similar report on #48, but I didn't notice it was a bug at that time. It has now been fixed at e87e1f5, please merge it into your branch.

cotes2020 added a commit that referenced this issue May 22, 2020
When one post have only one category will hit the bug.
@cotes2020 cotes2020 added the bug Something isn't working label May 22, 2020
@cotes2020 cotes2020 added this to the v2.2.1 milestone May 22, 2020
@codeandcloud
Copy link
Author

Thanks @cotes2020. I was inventing second category for most posts :)

cotes2020 added a commit that referenced this issue Sep 21, 2020
When one post have only one category will hit the bug.
mattpopovich pushed a commit to mattpopovich/jekyll-theme-chirpy that referenced this issue Oct 3, 2020
When one post have only one category will hit the bug.
cotes2020 added a commit that referenced this issue Oct 22, 2021
When one post have only one category will hit the bug.
sanjidnet pushed a commit to sanjidnet/sanjidnet.github.io that referenced this issue Dec 26, 2023
When one post have only one category will hit the bug.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants