Skip to content

Commit e0a8e76

Browse files
committed
see changkun#5, add image caption
1 parent b2b48a9 commit e0a8e76

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

website/Makefile

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
all:
2-
rm -rf public db.json
1+
all: clean
32
node install.js
4-
rm -rf src/modern-cpp/book
53
python3 filter.py
6-
rm -rf ./src/modern-cpp/assets/cover-2nd.png
7-
rm -rf ./src/modern-cpp/assets/figures
84
cp ../assets/cover-2nd.png ./src/modern-cpp/assets/cover-2nd.png
95
cp -r ../assets/figures ./src/modern-cpp/assets/figures
106
cp -r ../exercises ./src/modern-cpp/book/
117
cp -r ../code ./src/modern-cpp/book/
128
hexo generate
139
mv public/index.html public/modern-cpp/index.html
14-
s:
10+
s: all
1511
node_modules/serve/bin/serve.js ./public
1612
clean:
1713
rm -rf ./src/modern-cpp/assets/cover-2nd.png

website/_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ toc:
4040
position: after
4141
symbol: '#'
4242
style: header-anchor
43+
image_caption:
44+
enable: true
4345

4446
# Date / Time format
4547
## Hexo uses Moment.js to parse and display date

website/package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

website/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
},
88
"dependencies": {
99
"hexo-generator-index": "^0.2.1",
10+
"hexo-image-caption": "^0.1.1",
1011
"hexo-renderer-ejs": "^0.3.1",
1112
"hexo-renderer-marked": "^0.3.2",
1213
"hexo-renderer-stylus": "^0.3.3"

website/themes/moderncpp/source/modern-cpp/css/page.styl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@
1414
font-weight: bold;
1515
font-style: oblique;
1616

17+
.image-caption
18+
display: table;
19+
margin: 0 auto;
20+
color: #7f8c8d;
21+
margin-top: 10px;
22+
1723
.content
1824
position: relative
1925
padding: 2.2em 0

0 commit comments

Comments
 (0)