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 page empty #2170

Closed
ghost opened this issue Sep 19, 2016 · 7 comments
Closed

categories page empty #2170

ghost opened this issue Sep 19, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented Sep 19, 2016

before you submit your issue, please delete all the example code in template

Environment Info

Node version(node -v)

v4.5.0

Your site _config.yml

# Hexo Configuration
...

Your theme _config.yml
Lanscape

Hexo Configuration

...


Plugin version(`npm ls --depth 0`)

hexo-vanilla-site@0.0.0 ~/hexo-vanilla-site
├── hexo@3.1.1
├── hexo-generator-archive@0.1.4
├── hexo-generator-category@0.1.3
├── hexo-generator-index@0.2.0
├── hexo-generator-tag@0.2.0
├── hexo-renderer-ejs@0.1.1
├── hexo-renderer-marked@0.2.10
├── hexo-renderer-stylus@0.3.1
└── hexo-server@0.1.3


## For BUG

- BUG description
- the way to reproduce
- log with hexo <command> --debug

## For question

just push question
Categories page empty

## For feature request

just push feature request
@ghost
Copy link
Author

ghost commented Sep 19, 2016

  1. I created a page with the command: hexo new page categories
  2. In source/categories/index.md, I added type: categories in the front matter
  3. In the _config.yml of the theme, I added in the menu: Categories: /categories
    but my page is always empty !
    What is missing ?

@NoahDragon
Copy link
Member

Have you add categories in your post front matters?

---
layout: post
title: Why Sun is the center of our solar system
date: '2014-07-02 22:44:44 -0400'
comments: true
categories:
  - Solar System
  - Javascript
  - Simulation
---

@ghost
Copy link
Author

ghost commented Oct 1, 2016

yes but like that:
categories: Javascript

@NoahDragon
Copy link
Member

Sorry, may I ask why you need to create categories folder and page?

My theme is FreeMind, it requires to create those to set up categories.

I also tried landscape theme, it works fine on my machine.

@ghost
Copy link
Author

ghost commented Oct 2, 2016

Because I want to access to the categories from the menu. It's my choice !
Hexo doc says to modify _config.yml of the theme and to create folder in source folder.
The conclusion is: the categories cannot be displayed from the menu but only from the sidebar with the default theme. Am I wrong ?

@NoahDragon
Copy link
Member

I just tested on the Landscape theme, I think it is not support category page. Because this is not an issue about hexo, but it's theme. I will move the issue to there.

@xitengfei
Copy link

I'm using icarus theme, and there is a layout file "categories.ejs" in the this theme directory, so I can create categories page by simply "hexo new page categories" and then change the layout of this page to 'categories'.

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

No branches or pull requests

2 participants