Closed Lastcysa closed 7 years ago
This can make with hexo-generator-index2.
index_generator:
per_page: 10
order_by: date
include:
# - category CATEGORY
- path PERMALINK
# exclude:
# - tag TAG
@ivan-nginx
Thank you for your help, but I still cannot get it right.
I tried hexo-generator-index2 and set the include
filed as
include:
- path abc.com/about/
However it returns 404 error when my homepage is accessed.
U must set permalink path.
include:
- path about
about.md
:
---
permalink: about
title: ...
date: ...
...
Tried again as you suggested. But still 404 error. I checked public
folder and found that there's no index.html
generated
So, about page must open by site.com/about/
and no give 404 error. If is it, then u do something not right.
Link on demo site & link on src.
Try to set in about.md
:
permalink: about/index.html
I solved the problem in this way without using hexo-generator-index2:
set the permalink of about page as index
, then do the following:
index_generator:
path: /blog/
Anyway, thanks @ivan-nginx , your efforts and patience are very much appreciated.
@Lastcysa wow! I don't know that. Well done! Ok, if solved, close it please.
I solved the problem in this way without using hexo-generator-index2:
set the permalink of about page as
index
, then do the following:index_generator: path: /blog/
Anyway, thanks @ivan-nginx , your efforts and patience are very much appreciated.
I have the same problem as you, that I hope to set my homepage as about
instead of blog
However, I don't know how to set the permalink of about page as index
Could you help me with this? I have no idea about this.
I solved the problem in this way without using hexo-generator-index2: set the permalink of about page as
index
, then do the following:index_generator: path: /blog/
Anyway, thanks @ivan-nginx , your efforts and patience are very much appreciated.
I have the same problem as you, that I hope to set my homepage as
about
instead ofblog
However, I don't know how toset the permalink of about page as index
Could you help me with this? I have no idea about this.
hexo/_config.yml
and find the path
field in index_generator
.hexo\source\about\index.md
, and then you should find the permalink
field.It was a long time ago so I'm not sure if it still works in this way now. Hope it helps.
I solved the problem in this way without using hexo-generator-index2: set the permalink of about page as
index
, then do the following:index_generator: path: /blog/
Anyway, thanks @ivan-nginx , your efforts and patience are very much appreciated.
I have the same problem as you, that I hope to set my homepage as
about
instead ofblog
However, I don't know how toset the permalink of about page as index
Could you help me with this? I have no idea about this.
- locate to
hexo/_config.yml
and find thepath
field inindex_generator
.- locate to
hexo\source\about\index.md
, and then you should find thepermalink
field.It was a long time ago so I'm not sure if it still works in this way now. Hope it helps.
Thanks for your instant reply, I have filled /about/
in hexo/_config.yml
, showed as below,
index_generator:
path: '/about/'
per_page: 10
order_by: -date
For the second step, you told me to locate to hexo\source\about\index.md
, and find the permalink
field, I filled permalink like this,
---
title: Curriculum vitae
date: 2019-04-07 07:24:52
comments: false
permalink: index.html
---
This works out, but there is another problem that I can't find the previous homepage, in other words, I think the previous homepage HTML isn't generated, is it? I am a freshman in front-end tech, thanks for your patience.. ☀️
Hi, I am new to next. I want to show a simple self-introduction as the homepage. Now the default homepage is a list of blogs. I want to know how I can make a custom homepage with a single markdown file.
For example, my site url is
abc.com
, I wantabc.com
to be my "about me" page, whileabc.com/blogs
to be a summary of blogs (just like the original index page)I suspect it's necessary to modify index.swig, but I have no idea how to do it.
Here is a perfect example of what I want to achieve:.
Thanks very much.