Demo
1.主题安装
可以通过git clone或下载压缩包的方式将项目下载到本地,在博客目录/themes下创建hexploit文件夹,将项目放进去(目录结构需要和github仓库里展示的一样,建议gitclone!)
打开博客目录下的config文件(在博客主目录和主题目录下都有config文件,注意不要混淆):
修改theme: landscape:
2.插件安装
在你的博客目录下输入命令(关于npm及博客安装等请自行搜索)
npm install hexo-generator-feed --save
|
打开博客目录下的config文件,在最后添加对rss的配置
feed: type: rss path: rss.xml
|
3.搜索插件
在你的博客目录下输入命令:
npm install hexo-generator-search --save
|
打开博客目录下的config文件,在最后添加搜索的配置:
search: path: search.json field: all format: html limit: 10000
|
3.添加对应页面
本主题一共支持三个页面,分别是categories,tags和about。
1.新建页面
在博客目录输入命令:
2.指定布局文件
这里以categories为例子,打开/source/categories/index.md,修改内容为:
--- title: categories layout: categories ---
|
其他页面类似,将categories替换为tags和about
3.修改主题配置文件
打开/themes/hexploit/_config.yml
menu: - name: Home url: / - name: Archives url: /archives - name: Categories url: /categories - name: Tags url: /tags - name: About url: /about - name: RSS url: /rss.xml sidebar: enable: true widgets: - search - notice - categories - tags - links
numlimit: categories: 5 tags: 10 links: - name: 百度 url: https://www.baidu.com notice: enable: true content: "博客正在进行优化,敬请期待更多内容!" toc: enable: true
|
侧边栏部分可以随意修改顺序或者将不使用的注释掉
4.代码高亮
修改博客配置文件:
highlight: enable: true line_number: false auto_detect: false tab_replace: '' wrap: true hljs: true prismjs: enable: false preprocess: true line_number: true tab_replace: ''
|
当前主题是atmo-one-dark,定义在highlight.css中,可自行修改