首先fork这个项目https://github.com/mii9000/gh-blog ,我fork后,得到的项目地址是
https://github.com/briteming/gh-blog,然后编辑config.json文件:
https://github.com/briteming/gh-blog/blob/master/config.json ,一看就知道怎么修改。
然后访问vercel.com/new, 导入项目https://github.com/briteming/gh-blog到vercel.com空间。在来到这个页面时:
如下图那样修改设置:
然后点击deploy按钮,等待部署完成。部署完成后,我得到的网址是:
https://gh-blog-wndz.vercel.app/
https://gh-blog-r6ia.vercel.app/ (我部署了2次,各得到一个网址)
或者这样做也行:(我是在本地机器-windows上操作的。)
git clone https://github.com/briteming/gh-blog gh-blog-by-briteming
cd gh-blog-by-briteming
npm install && npm install -g bower
bower intall
python3 -m http.server 2346
在本地机器的浏览器里访问127.0.0.1:2346 ,即可看到网站效果。
访问https://app.netlify.com/drop ,上传 ~/gh-blog-by-briteming目录的内容,我得到的网址是https://jolly-monstera-bbb97c.netlify.app/
演示网址:
https://gh-blog-wndz.vercel.app/
https://gh-blog-r6ia.vercel.app/
https://jolly-monstera-bbb97c.netlify.app/
项目地址:
https://github.com/mii9000/gh-blog
https://github.com/mii9000/gh-blog/issues/2 (这里好像有一个bug: 如果把config.json文件里的post_per_page的值设为5,那么博客并不能显示我发表的第一个帖子。于是我把post_per_page的值设为10000,则博客就会显示所有的帖子。因为要达到10000个帖子才会分页,在未达到10000之前,网站是不会分页的,这样就把所有的帖子都显示出来了。)
https://github.com/briteming/gh-blog
No comments:
Post a Comment