Closed jewian closed 9 years ago
Disable index
generator. Modify your _config.yml
.
exclude_generators:
- index
index.md
to source
folder.I tried as you mentioned.
However, source/index.md will be always generated into xxxx.com/blog/index.html.
What I expect is that xxxx.com/blog/index.html still keeps the original posts. However I need an extra front page xxxx.com/index.html
What's your root
setting?
url: http://xxxx.com/blog root: /blog/
That is why I would like to make HEXO generated files under the sub-directory "blog". And I would like my xxx.com/index.html to be a custom font page instead of simply redirecting to the /blog/index.html.
Remove blog/
from the url
and root
setting.
If your problem solved, pleased the issues, spare more space for the new-comer, thanks.
Your answer did not resolve the problem. I would like a resolution to @jewian's question.
I too am interested in a solution to @jewian's question. Implementing the proposed solutions do not direct my posts to the /blog/ directory. I would prefer to keep the front page in the same project as the blog so that I can use the same theme sources.
config:
# URL
root: /
permalink: blog/:year/:month/:day/:title/
archive_dir: blog
# Extensions
exclude_generator:
- index
@smmoosavi 's solution works for me. I propose @jewian try it and close the issue if it works for them too.
To remove auto generated index.html, uninstall hexo-generator-index
npm remove hexo-generator-index
I would like to use Hexo to generate blog page to the sub-directory xxxx.com/blog/.
In the meanwhile, I would like to create a custom index page xxxx.com/index.html (and maybe other custom pages like xxx.com/photos.html).
And the whole personal site (custom pages + Hexo generated blog pages) will be hosted by GitHub.
Could I do that?