Total Pageviews

Tuesday 14 February 2017

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

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

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

root@AR:/usr/local/issuance-site# ls
LICENSE.md  README.md  css  index.html  js
root@AR:/usr/local/issuance-site#
(可见/usr/local/issuance-site就是静态网站的根目录)

然后在本地机器访问https://github.com/settings/tokens/new,创建personal access token,不要勾选任何scope.

回到你的vps:
root@AR:/usr/local/issuance-site# nano js/globals.js
root@AR:/usr/local/issuance-site# cat js/globals.js
'use strict';

var USERNAME = 'luckypoem', // your github username
    REPO = 'issuance', // github repository name
    TOKEN = 'abc1fab83d4bec35db611149de8d9df74152xyz'; //access token
root@AR:/usr/local/issuance-site#

然后在本地机器访问https://github.com/luckypoem/issuance/issues,在这里提交issue即为写博客帖子。

演示网站:http://mi.bright.biz.st,因为发表了一篇长文,还是全文显示,所以网站加载较慢。
项目地址:https://github.com/mateogianolio/issuance

更新:因为“稀奇古怪的中国经济”文章太长,拖慢了网站的加载,所以我在https://github.com/luckypoem/issuance/issues这里,close(关闭)了此文章所对应的issue,这样在访问演示网站http://mi.bright.biz.st时,就不会加载该篇长文了,从而加快了演示网站http://mi.bright.biz.st的加载速度。

No comments:

Post a Comment