blog = Hexo + Github

stay tuned…

update in 2017-07-25 comment donate module

  1. 点击Hexo 官网,按要求配置
  2. 主题采用屠夫的Maupassant
  3. themesmaupassant/_config.yml 中采用fancybox,disqus,self_search以及google_analytics
  4. 注释掉rss ,timeline以及 recent_comments
  5. self_search中jQuery-based Local Search Engine for Hexo的操作流程

2017-02-04

  1. ipad竖屏响应问题,更改 hexothemesmaupassantsourcecssstyle.scss 文件中的
    1
    2
    /* middle*/
    @media print, screen and (max-width: 48em)

将其中的 48em(48*16=768) 改为 47.9em

  1. 图片云床采用 七牛云 ,想注册的话,我有邀请码。Google一下,采用吴小龙同學 的方法
  2. 美凡提到图片瘦身功能,很赞
  3. 采用Page Analytics Chrome Extension进行访问分析
    Page Analytics Chrome Extension
    效果图
  4. Emoji

2017-02-05

Fix post-nav bug, aim to put the previous post link on the left side and the next post on the right side.
Firstly check these files.

  1. hexothemesmaupassantlayoutindex.jade controls the format of your posts showing in your home page.
  2. hexothemesmaupassantlayoutpost.jade determines the format of your post.
  3. hexothemesmaupassantsourcecssstyle.scss.

Through previous 3 files I find that there is something wrong with page.prev and page.next, for instance page.prev points to the post that I post after the current post.
Find .post-nav in file style.scss and change the code in class post-nav as follows:

1
2
3
4
5
6
7
8
&.pre {
float: right; /* left*/
&:after { /* after*/
font-family: "FontAwesome";
content: "f0da"; /* f0d9*/
padding-right: 0.3em;
}
}

2017-02-05

  1. Find bug in categories

    2017-02-07

  2. Find bug in contents
  3. Find bug in web tab, when clicking pageAbout

2017-02-21

  1. Want to add Hits beside the dates to the post listed in the home page.

2017-02-22 Change the theme to Next

  1. Add LeanCloud for click counter.
  2. Theme: Using Next instead of maupassant.
  3. Configure sidebar.swiginG:hexothemesnextlayout_macro for removing sidebar in the home page:

    • Adding ifstatement before sidebar-toggle, do not forget the close tag

      1
      2
      3
      4
      5
      6
      7
      8
      9
      {% if is_post %}
      <div class="sidebar-toggle">
      <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
      </div>
      </div>
      {% endif %}
    • Comment sidebar-nav-overview for not seeing the overview

      1
      2
      3
      {# <li class="sidebar-nav-overview" data-target="site-overview"> #}
      {# {{ __('sidebar.overview') }} #}
      {# </li> #}

2017-03-03 Add new page with Menu.XXX

cd g:hexo
hexo new page friends
Follow this instruction,
add friends: friends in hexothemesnextlanguagesdefault.yml
menu:
home: Home
archives: Archives
categories: Categories
tags: Tags
about: About
friends: friends
search: Search

2017-3-09 Add emoji to Hexo

cd g:hexo

1
2
npm un hexo-renderer-marked --save
npm i hexo-renderer-markdown-it --save
1
2
cd node_modules/hexo-renderer-markdown-it/
npm i markdown-it-emoji --save

Open _config.yml in g:hexo, add these codes at the bottom

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
markdown:
render:
html: true
xhtmlOut: false
breaks: false
linkify: true
typographer: true
quotes: '“”‘’'
plugins:
- markdown-it-footnote
- markdown-it-sup
- markdown-it-sub
- markdown-it-abbr
- markdown-it-emoji
anchors:
level: 1
collisionSuffix: 'v'
permalink: true
permalinkClass: header-anchor
permalinkSymbol: ' '

:smile: U+2764 xE2x9DxA4

:smile:

U+2764

xE2x9DxA4

emoji-cheat-sheet

Reference:
Blog

2017-03-16 Add video to Next

  1. Need url

    1
    2
    3
    <video width="480" height="320" controls>
    <source src="">
    </video>
  2. Only YouTube

    1
    {% youtube ID %}
  3. Only YouTube
    Right click YouTube video, choose “copy embed code…” and paste it to your post.

  4. Need url
1
<iframe width="870" height="489" src="https://www.youtube.com/embed/WHcRQMGSbqg" frameborder="0" allowfullscreen></iframe>

2017-03-20 Add center quote

balabalaba

balabalaab

2017-05-06 Markdown Table

From this post and this website

左对齐标题 右对齐标题 居中对齐标题
短文本 中等文本 稍微长一点的文本
稍微长一点的文本 短文本 中等文本

-:表示内容和标题栏居右对齐,:-表示内容和标题栏居左对齐,:-:表示内容和标题栏居中对齐。

2017-05-07 Markdown checkbox

(failed)first try

  1. cd g:hexo
  2. npm install markdown-it-checkbox --save
    it appears

    1
    2
    3
    4
    5
    6
    7
    8
    9
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modulesch
    okidarnode_modulesfsevents):
    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
    1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
    )
  3. cd to directory of markdown-it and type npm install markdown-it-checkbox --save

it appears

1
2
3
4
[email protected] G:hexonode_modulesmarkdown-it
``

checkbox does not appear

  • [x] hello
  • hello

(failed)second try

1
2
cd node_modules/hexo-renderer-markdown-it/
npm un markdown-it-emoji --save

cd g:hexo

1
2
npm un hexo-renderer-markdown-it --save
npm i hexo-renderer-marked --save

it appears

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
npm WARN prefer global [email protected] should be installed with -g
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modulesch
okidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN Error: EPERM: operation not permitted, lstat 'G:hexonode_modulesmark
down-it'
npm WARN at Error (native)
npm WARN { Error: EPERM: operation not permitted, lstat 'G:hexonode_modulesm
arkdown-it'
npm WARN at Error (native)
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'lstat',
npm WARN path: 'G:\hexo\node_modules\markdown-it' }

tpye npm i hexo-renderer-marked --save -g

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
> [email protected] postinstall C:UsersSSQAppDataRoamingnpmnode_moduleshexo
-renderer-markednode_moduleshexo-util
> npm run build:highlight
> [email protected] build:highlight C:UsersSSQAppDataRoamingnpmnode_modules
hexo-renderer-markednode_moduleshexo-util
> node scripts/build_highlight_alias.js > highlight_alias.json
C:UsersSSQAppDataRoamingnpm

add following code at the bottom of _config.yml

1
2
3
4
5
6
7
8
9
10
marked:
gfm: true
pedantic: false
sanitize: false
tables: true
breaks: true
smartLists: true
smartypants: true
modifyAnchors: ''
autolink: true

failed

(failed)third try

add "hexo-renderer-marked": "^0.3.0", in the G:hexopackage.json
cd g:hexo
npm i hexo-renderer-marked --save
failed

forth try

npm i hexo-renderer-marked -f

2017-05-09 add passwords for blogs

add "hexo-blog-encrypt": "^1.1.12", in the G:hexopackage.json
cd g:hexo
npm i hexo-blog-encrypt --save
it appears

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modulesch
okidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
npm WARN Error: EPERM: operation not permitted, lstat 'G:hexonode_modulesmark
down-it'
npm WARN at Error (native)
npm WARN { Error: EPERM: operation not permitted, lstat 'G:hexonode_modulesm
arkdown-it'
npm WARN at Error (native)
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'lstat',
npm WARN path: 'G:\hexo\node_modules\markdown-it' }

try npm i hexo-blog-encrypt -f

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
npm WARN using --force I sure hope you know what you are doing.
> [email protected] install G:hexonode_modulesfsevents
> node install
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | | `-- [email protected]
| | | | `-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | | `-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | | +-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | | `-- [email protected]
| | | | `-- [email protected]
npm WARN Error: EPERM: operation not permitted, lstat 'G:hexonode_modulesmark
down-it'
npm WARN at Error (native)
npm WARN { Error: EPERM: operation not permitted, lstat 'G:hexonode_modulesm
arkdown-it'
npm WARN at Error (native)
npm WARN errno: -4048,
npm WARN code: 'EPERM',
npm WARN syscall: 'lstat',
npm WARN path: 'G:\hexo\node_modules\markdown-it' }

2017-05-09 restart

https://xuanwo.org/2015/03/26/hexo-intor/
Given the fact that I have installed Node.js and Git in website.
So I open cmd with win+r and just type npm install -g hexo-cli
It appears

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
C:UsersSSQAppDataRoamingnpmhexo -> C:UsersSSQAppDataRoamingnpmnode_m
oduleshexo-clibinhexo
> [email protected] install C:UsersSSQAppDataRoamingnpmnode_moduleshe
xo-clinode_modulesdtrace-provider
> node scripts/install.js
> [email protected] postinstall C:UsersSSQAppDataRoamingnpmnode_moduleshexo
-clinode_moduleshexo-util
> npm run build:highlight
> [email protected] build:highlight C:UsersSSQAppDataRoamingnpmnode_modules
hexo-clinode_moduleshexo-util
> node scripts/build_highlight_alias.js > highlight_alias.json
C:UsersSSQAppDataRoamingnpm
| | | | `-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
| | | | `-- [email protected]
| | | +-- [email protected]2
| | | | `-- [email protected]
| | | | `-- [email protected]
| | | | +-- [email protected]
| | | | | `-- [email protected]
| | | | `-- [email protected]
| | | | +-- [email protected]
| | | | `-- [email protected]
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_moduleshe
xo-clinode_moduleschokidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

cd g:hexo
hexo init
it appears

1
2
3
4
5
6
7
xxxxxx
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modulesch
okidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)
INFO Start blogging with Hexo!

2017-05-10 add local search

details in this website
open git bash and type cd g:hexo npm install hexo-generator-searchdb --save

1
2
3
4
5
6
7
8
9
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected]^1.0.0 (node_modulesch
okidarnode_modulesfsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]
1.1.1: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}
)

2017-05-10 fix tag bug from h1 to h2

find tag.swig in G:hexo_oldhexothemesnextlayout replace following code

1
2
3
4
5
6
<div class="collection-title">
<{% if theme.seo %}h2{% else %}h1{% endif %}>{#
#}{{ page.tag }}{#
#}<small>{{ __('title.tag') }}</small>
</{% if theme.seo %}h2{% else %}h1{% endif %}>
</div>

with

1
2
3
4
5
6
<div class="collection-title">
<h2 >
{{ page.tag }}
<small>{{ __('title.tag') }}</small>
</h2>
</div>

2017-05-12 note tag

Follow this website

Content (md partial supported)

e.g.

default


primary


success



warning


danger

2017-05-22 input tag bugs

In the following code

1
<input type="radio" disabled><label>2</label>

<label> must follow the close tag > of input closely, or it will appears bugs in content.

2017-05-25 space bug

2017-06-09 Template

radio

chackbox

template

table

1
---|---

Restart Hexo Blog

  1. open git bash npm install -g hexo-cli
  2. run

    1
    2
    3
    hexo init g:hexo
    cd g:hexo
    npm install
  3. run

    1
    2
    git config --global user.name "yourname"
    git config --global user.email "youremail"
  4. do in _config.yml

    1
    2
    3
    4
    5
    6
    7
    # Site
    title: SSQ
    subtitle:
    description:
    author: SSQ
    language: en
    timezone:
1
2
3
4
deploy:
type: git
repo: https://github.com/SSQ/SSQ.github.io.git
branch: master
  1. run npm install hexo-deployer-git --save
  2. run hexo d check my blog in https://ssq.github.io/
  3. in _config.yml change to theme: next
  4. copy file to g:hexo/source
  5. run npm install hexo-generator-searchdb --save
    add in _config.yml(hexo)
    1
    2
    3
    4
    5
    search:
    path: search.xml
    field: post
    format: html
    limit: 10000

add in _config.yml(next)

1
2
3
# Local search
local_search:
enable: true

2017-06-22 bug occurs in this circumstances

  1. use following code
    1
    {% keyword %}

2017-06-23 Cannot find second page of posts in my website

problem solved in this commit

2017-07-13 Export html file with markdownpreivew

Sublime Text 3 package MarkdownPreview can generate html file when typing ctrl + b.It can also generate content when typing [TOC] at the beginning of your md file.

2017-07-17 Course and Certificate Template

Course can be found here
My certificate can be found here
Lecture slides can be found here

2017-07-17 Change Blog Anchor Text Hover Color to Blue

Find base.styl in G:hexothemesnextsourcecss_variables
Change variables $link-color to the following code

1
$link-color = $blue

where blue is #0684bd

2017-07-17 Change read-more to Blue

Find Mist.styl in G:hexothemesnextsourcecss_variables
Change variable $read-more-color to #0077b3(blue)

1
2
3
// $read-more-color = $link-color
// red->#DE5233 blue->#0077b3
$read-more-color = #0077b3

2017-07-17 Change code-foreground to red

Find base.styl in G:hexothemesnextsourcecss_variables
change variable $code-foreground to #DE5233(red) in line 151

1
$code-foreground = #DE5233

2017-07-23 Add exam module

primary









2017-07-25 comment donate module

comment following code in hexo/themes/next

1
2
3
4
# Donate 文章末尾显示打赏按钮
# reward_comment: 打赏随意,感谢支持
# wechatpay: /images/wechatpay.jpg
# alipay: /images/alipay.jpg

2017-08-14 Set fonts in a larger size

custom.styl

1
2
3
$font-size-base = 18px; // 默认是 16px 大小
$font-family-headings = Georgia, sans // 标题,修改成你期望的字体族
$font-family-base = "Microsoft YaHei", Verdana, sans-serif // 修改成你期望的字体族

2017-08-20 Add PA readme model

#

Goal

File Description

  • .ipynb file is the solution of Week program assignment
    • .ipynb
  • .html file is the html version of .ipynb file.
    • .html
  • .py python verson
    • .py
  • .zip of md file
    • .zip
  • file
    • ``

Snapshot

  • Recommend open md in file ``
  • open .html file via brower for quick look.

Algorithms