0%

随便写写

大二刚开学一个星期左右了,全部都是专业课,有Java,数据库,前端三剑客,计网还有软件工程导论。但是有时候还是挺懒的,下课时间就是喜欢回寝室呆着,也不怎么学习,刚开始还会比较轻松,感觉后面再过一段时间,全是专业课,想学的还不错,起码得把进度赶在老师前面。我还想着用一些时间写一个主题,看情况吧还是。

Hexo-NexT v8.x搜索服务配置

我的blog配置成功了,可喜可贺,这个网络上很多都对不上8.x版本,所以看下面这个链接
NexT8.x文档


1.首先下载

1
$ npm install hexo-generator-searchdb --save

2.然后在站点配置文件Hexo _config.yml在底部添加

1
2
3
4
5
search:
path: search.xml
field: post
content: true
format: html

3.最后在主题配置文件NexT _config.yml中打开Local Search功能,就是把enable改为true

1
2
3
4
5
6
7
8
9
10
11
12
13
# Local Search
# Dependencies: https://github.com/next-theme/hexo-generator-searchdb
local_search:
enable: false
# If auto, trigger search by changing input.
# If manual, trigger search by pressing enter key or search button.
trigger: auto
# Show top n results per article, show all results by setting to -1
top_n_per_article: 1
# Unescape html strings to the readable one.
unescape: false
# Preload the search data when the page loads.
preload: false

Hexo-NexT v8.x字数统计以及阅读时间配置

我的Next是v8.x的,我的blog配置成功了NexT文档,对标v8.x的


1.安装

1
2
$ npm install hexo-word-counter
$ hexo clean

2.然后在站点配置文件Hexo _config.yml的文件尾部添加

1
2
3
4
5
6
7
8
9
symbols_count_time:
symbols: true
time: true
total_symbols: true
total_time: true
exclude_codeblock: false
awl: 4
wpm: 275
suffix: "mins."

3.然后在主题配置文件NexT _config.yml中修改

1
2
3
4
5
# Post wordcount display settings
# Dependencies: https://github.com/next-theme/hexo-word-counter
symbols_count_time:
separated_meta: true
item_text_total: false

将设置item_text_total为true



踩了好多报错,终于差不多了

搞这个博客,踩了一堆坑,最麻烦的是还没有学习前端知识,好不容易把这个blog弄好了,准备来给他来点小装饰,配置一个评论服务,主要是跟着Waline的官方文档配置的,也参考了CSDN一个教程的最后一步,因为我懒得照着官方文档最后一步弄。😗

教程看他们的就够了,再就是按照CSDN博主教程的最后部署完,确实有Next v7.x版本报错,升级到Next v8.x版本就就解决了的问题。我是到那一步报错后看了评论,准备去升级Next的版本,值得注意的是Next v8.x版本是另外一个团队在维护,NexT v8.x。对了想看看这个八卦的点点这里

然后我就开始去下载v8.x的版本,官方安装文档有些许不那么好理解,所以我就去网上搜了一个看,我是不太习惯把主题配置文件放在博客目录下面的,就和’谁把钱丢了’差不多,毕竟前面弄的几个主题习惯的差不多了,这个主题说起来也是一把泪。v7.x的主题我也没弄多久,所以下载的v8.x的主题就相当于重新换了一个主题。

搞好这个后,我去配置Waline的评论服务,这个照着上面两个链接弄就行了,挺顺利的,就是如果去注册LeanCLoud的应用时,如果报错了,换一个浏览器试试。最后虽然还是有一点小差错,但还是差不多弄好了。
写这个还顺序学习了一下Markdown入门

Hello World!!!

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

1
$ hexo new "My New Post"

More info: Writing

Run server

1
$ hexo server

More info: Server

Generate static files

1
$ hexo generate

More info: Generating

Deploy to remote sites

1
$ hexo deploy

More info: Deployment