probberechts / hexo-theme-cactus

:cactus: A responsive, clean and simple theme for Hexo.
https://probberechts.github.io/hexo-theme-cactus/
MIT License
3.18k stars 783 forks source link

A question about layout #9

Closed seam32 closed 7 years ago

seam32 commented 7 years ago

Hello,I found that the value of "Writing" of the nav in the _config.yml is "archives",but when I click it, the page will jump to archive.ejs.(why not archives.ejs ). I don't know how it works. nav: Home: / About: /about/ Writing: /archives/ Projects: http://github.com/probberechts

Forthermore, after creating a about.ejs in the "\themes\cactus-dark\layout", the blog's page will prompt that the file does not exis instead of jumping to the page of about.ejs when clicking "About" .

I hope to receive your reply soon, thank you very much~!~

probberechts commented 7 years ago

The archives template is called archive.ejs, while the default archive directory is archives/. It is just a decision the Hexo programmers made. If it bothers you, you can change the archive_dir setting to archive_dir: archive (I suppose, didn't test this 🙏 ).

about.ejs is not a valid template. Create the about page with

  hexo new page about

and create some content in source/about/index.md. If you would like to change the layout of the about page, you will have to edit theme/cactus-dark/layout/page.ejs.

seam32 commented 7 years ago

Thank you for your reply~! I have solved my problems.

(Your theme is so cool! I appriciate it very much~!(^__^) )