Total Pageviews

Wednesday, 15 February 2017

搭建又一个基于Github issues的静态博客程序mill

首先fork这个项目https://github.com/graffie/mill, 我fork后的项目地址为https://github.com/luckypoem/mill,

登录linux vps.
cd /usr/local
git clone https://github.com/graffie/mill mill-site
cd mill-site

root@AR:/usr/local/mill-site# ls
LICENSE     mill.min.js   src             webpack.config.production.js
README.md   node_modules  style.css
config.js   package.json  vendor.bundle.js
index.html  server.js      webpack.config.js
root@AR:/usr/local/mill-site#
(可见 /usr/local/mill-site就是静态网站的根目录)
root@AR:/usr/local/mill-site# ls
LICENSE   src             webpack.config.production.js
README.md  style.css
config.js   package.json 
index.html  server.js      webpack.config.js
root@AR:/usr/local/mill-site# nano config.js
root@AR:/usr/local/mill-site# cat config.js
window.MillConfig = {
  title: 'Mill blog of brite',
  github: {
    owner: 'your_github_username',
    repo: 'mill',
  },
  theme: 'basic'
};
root@AR:/usr/local/mill-site#
root@AR:/usr/local/mill-site# npm install (需先安装nodejs环境)
root@AR:/usr/local/mill-site# npm run build
root@AR:/usr/local/mill-site# node server.js > /dev/null &

访问https://github.com/luckypoem/mill/issues,在这里提交issues,即为撰写帖子。

演示网站:http://gm.bright.biz.st/
项目地址:https://github.com/graffie/mill
https://github.com/graffie/mill/issues/18

不过访问嵌入html code的帖子,比如http://gm.bright.biz.st/#/post/207746382, html code无法渲染,不知为何?

No comments:

Post a Comment