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

自定义menu可以是文章展示页面吗 #17

Open
ShaoxunZeng opened this issue Aug 11, 2019 · 12 comments
Open

自定义menu可以是文章展示页面吗 #17

ShaoxunZeng opened this issue Aug 11, 2019 · 12 comments

Comments

@ShaoxunZeng
Copy link

如果是用 hexo new page xxx 的话只能生成一个页面(直接展示了页面内容)
有办法生成像archives那样多个文章一组的展示页面吗
我看了代码还是不明白如何改

@ShaoxunZeng
Copy link
Author

我现在唯一想到的办法就是修改nav的代码,在menu里添加catagory的内容
就是把分类的标签作为memu的一个选项来展示,这样等于把catagories搬到nav上面来了

@xzhih
Copy link
Owner

xzhih commented Aug 12, 2019

不用改代码,直接在 config 里添加分类对应的路径就可以了

@ShaoxunZeng
Copy link
Author

ShaoxunZeng commented Aug 12, 2019

config配置指的是

menu:
  ABOUT: /about
  ARCHIVES: /archives
  TEST: /test

这样吗,但是这样好像就是单独的一个页面,不会像首页一样有多个card展示页

@xzhih
Copy link
Owner

xzhih commented Aug 12, 2019

menu:
  ABOUT: /about
  ARCHIVES: /archives
  TEST: /categories/test/

@ShaoxunZeng
Copy link
Author

噢。。这样好像也行 我改完之后就直接在md里面写categories就自动加上了

还有如果要加个类似时间轴一样的东西要怎么写啊。。。不太清楚 hexo new page xxx 到底是怎么执行的

@xzhih
Copy link
Owner

xzhih commented Aug 12, 2019

官方文档有,暴露出很多钩子可以用

@ShaoxunZeng
Copy link
Author

嗯刚刚看到 差不多可以用md手写出来
但是好像不能自动生成?

@xzhih
Copy link
Owner

xzhih commented Aug 12, 2019

可以写个 js 放在 scripts 文件夹里,让它自动处理

@ShaoxunZeng
Copy link
Author

那个 allinone.min.css是怎么生成的啊 我单独改css好像没用

@ShaoxunZeng
Copy link
Author

好像手动改allinone.min.css才行?

@xzhih
Copy link
Owner

xzhih commented Aug 13, 2019

用 clean-css-cli 把其他的 CSS 合并压缩

@xzhih
Copy link
Owner

xzhih commented Aug 13, 2019

我懒得在主题里写自动执行了,反正就一条命令

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