codeblock style test

welcome to codeblock style test.

Using codeblock tag plugin, recommend use Backtick Code Block. Just add [language] [title] [url] [link text] in backtick of code block, like yml file-location www....com url-name , diff file-location www....com url-name

bash
1
2
3
4
5
6
git clone git@github.com:sli1989/hexo-theme-next.git
cd <fold>
git remote add upstream git@github.com:theme-next/hexo-theme-next.git
git fetch upstream
git merge upstream/master
git push origin branchname
yml for ~/hexo/source/_data/next.ymlhighlight.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Redefine custom file paths. Introduced in NexT v6.0.2.
# If commented, will be used default custom file paths.

# For example, you want to put your custom styles file
# outside theme directory in root `source/_data`, set
# `styles: source/_data/styles.styl`
custom_file_path:
# Default paths: layout/_custom/*
#head: source/_data/head.swig # layout/_custom/head.swig
#header: source/_data/header.swig # layout/_custom/header.swig
#sidebar: source/_data/sidebar.swig # layout/_custom/sidebar.swig

# Default path: source/css/_custom/custom.styl
styles: source/_data/styles.styl
# Default path: source/css/_mixins/custom.styl
#mixins: source/_data/mixins.styl
# Default path: source/css/_variables/custom.styl
variables: source/_data/variables.styl
styl for ~/hexo/source/css/_common/components/highlight/highlight.stylhighlight.js
1
2
3
4
5
6
7
8
9
10
// the top style of the article code block
.highlight figcaption {
margin: 0em;
padding: 0.5em;
background: #eee;
border-bottom: 1px solid #e9e9e9;
}
// add rounded code block
.highlight { border-radius: 5px;}
pre { border-radius: 5px;}
diff for ~/hexo/source/css/_common/components/highlight/highlight.stylhighlight.js
1
2
3
4
5
6
7
8
9
10
+ // the top style of the article code block
+ .highlight figcaption {
+ margin: 0em;
+ padding: 0.5em;
+ background: #eee;
+ border-bottom: 1px solid #e9e9e9;
+ }
+ // add rounded code block
+ .highlight { border-radius: 5px;}
+ pre { border-radius: 5px;}