Giter Site home page Giter Site logo

github-laziji / vblog Goto Github PK

View Code? Open in Web Editor NEW
1.5K 41.0 342.0 1.15 MB

使用GitHub API 搭建一个可动态发布文章的博客

Home Page: https://github-laziji.github.io

License: Mozilla Public License 2.0

JavaScript 33.67% HTML 0.18% Vue 66.15%
vue element vant github-page vblog github-api

vblog's Introduction

VBlog

目录

简介

博客可搭建在 GitHub Pages 上, 文章数据储存于gist 中, 通过Github API 与数据进行交互, 实现无后台、可动态发布文章的博客系统

最近暂无更新计划

演示地址

https://github-laziji.github.io

项目特点

  • 基于 GitHub Pages 无需服务器
  • 改进传统 GitHub Pages 不能动态发布的缺陷
  • 包含电脑端和移动端
  • 单页面应用

使用的组件

  • Element (电脑端)
  • Vant (移动端)

项目截图

博客截图 博客截图 博客截图 博客截图

快速使用

搭建博客只需2步

  • 点击github头像旁边的 "+" 号 选择 Import repository 克隆地址填 https://github.com/GitHub-Laziji/GitHub-Laziji.github.io 项目名填 你的用户名.github.io
  • 克隆完成后 修改文件 /static/configuration.json 中的 githubUsername 为自己的github用户名

类似演示地址其中 GitHub-Laziji 为我的用户名

现在 https://你的用户名.github.io 就是你的个人博客了,例如https://github-laziji.github.io

开发

安装 运行 构建

npm install

npm run dev

npm run build

获取Token

github > settings > Developer settings > Personal access tokens 勾选gistrepo权限 获取Token

开发注意事项

  • 配置文件读取的总是与 index.html 同级的 ./static/configuration.json, 所以本地 npm run dev 的时候会出现修改配置无效的情况, 如果需要修改的话修改本地的配置文件就行, 发布到 github 之后不影响, 因为修改配置的时候是通过 github-api 修改 你的用户名.github.io 下的 /static/configuration.json

更新记录

2018.5.23 更新

  • 修改移动端页面样式
  • 修改PC端样式小修改
  • 去除PC端License

2018.5.23 更新

  • 修复404页面显示不正常的bug
  • 优化权限不足的情况

2018.5.22 更新

  • 增加其他站点的配置, 在状态栏显示个人的其他网站

2018.5.21 更新

  • 优化部分提示效果
  • 修复博客描述没有换行

2018.5.20 更新

  • 修改点击其他博客异常的bug
  • 修改日期格式
  • 修改使用帮助显示效果

2018.5.19 更新

  • 增加使用帮助页面
  • 修复没有README.md时候出现的BUG

2018.5.16 更新

  • 显示粉丝数量
  • 增加粉丝详情页面

2018.5.15 更新

  • 粉丝页面优化没有粉丝的情况
  • 修改有的图片越界
  • 配置增加是否自动播放音乐
  • 去除默认音乐

2018.5.13 更新

  • 电脑端增加社交圈, 查看粉丝和关注的用户

2018.5.11 更新

  • 移动端增加博客, 项目, 个人中心, 移动端和PC端共用API, 页面独立
  • 修复文章样式奇怪的BUG

2018.5.8 更新

  • 增加配置选项
  • 改善富文本编辑器

2018.5.6 更新

  • 状态栏增加音乐播放器

2018.5.5 更新

  • 增加了系统配置, 可以动态修改标题, 描述, 背景等配置

2018.5.2 更新

  • 增加博客和项目列表的分页
  • 增加分享链接
  • 改进Token绑定验证
  • 修改代码结构

2018.4.30 更新

  • 添加了从github获取个人开源项目的功能,显示信息更加全面,显示开源项目列表
  • Readme 从github动态获取

2018.4.29 更新

  • 增加个人信息的状态栏
  • 修复发图片博文的BUG

License

Code licensed under the Mozilla.


作者 Laziji

vblog's People

Contributors

github-laziji avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vblog's Issues

博客标记标签

基于gist的接口,有什么可以实现对博文进行打标签的方式吗?是gist不支持吗?因为如果支持对博文进行分类标记标签的话,可以丰富筛选功能……

归档

建议作者增加博文归档功能。
否则感觉没有突出“博客”的真正用处。。。

API rate limit exceeded

API rate limit exceeded for 203.205.141.36. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)

有没有文章分类的功能计划?

如题,有没有计划做文章分类(category)和标签(tag)的功能?
其实我在今年5月开始,也做了一个类似的基于GitHub Page的 “笔记” app。说是笔记,但其实本质跟blog差不多。还剩下“动态发布和编辑”的功能没有做,只不过平时事儿太多,做了一半放下了一周。今天上班闲的没事儿扫了下Github,突然发现了你的这个项目,用的技术栈也基本相同,突然觉得貌似我也没必要再继续做了。哈哈。。。
建议加入文章分类的功能,还有根据标签搜索的功能(我知道限于GitHub静态站的特性,上述功能可能不太好做)。当然我有时间的话,也会尝试fork你的项目,添加对应功能。
另外这是我的项目的Demo,如果你有兴趣的话可以看一眼。
最后,赞一下你的项目,已经给了星星。

百度收录不了

百度收录不了啊,蜘蛛爬过来就只有标题,没有正文

我绑定了自定义域名,

我新建了个repo命名为blog2 ,绑定了自定义域名,
readme文件为啥还是*.github.io那个repo的readme?

而且系统配置那一栏一直是notfound

图片无法正常显示

编辑文章时 如果是下面的代码

![](https://pic4.zhimg.com/v2-d8e3fde68c3bde8de506a56846cf1a3b_b.jpg)

则发表文章以后图片无法正常显示

修改模板样式

你好,大佬。我想问一下我修改了了vue的中代码 . 怎么在更新在我的远程仓库呢?

绑定access_token报错,已解决

12313213213
大家是不是在某天绑定token的时候,突然报了上面这个错误,其实是Github出于安全考虑,禁用了链接中传token的方式(详情请点击),于是小G便把Laziji的项目fork了一下,修改了token传参方式,并把项目编译打包了放在了release里面,供大家下载使用
项目地址:https://github.com/Grunning/VBlog
编译打包下载:https://github.com/Grunning/VBlog/releases/tag/vblog

使用说明:

  1. 下载GitHub-Laziji.github.io.zip文件,并解压
  2. 将解压之后的static/css、static/fonts、static/img、static/js文件夹和index.html拷贝到自己的GitHub项目目录下(如XXX.github.io),以替换相关文件即可(切记,index.html也要替换!另外,不要覆盖static目录下的configuration.json文件!)
  3. 其他按原作者文档实施即可,本说明只适用于项目已跑起的用户参考
  4. 演示地址:请点击

请求适配gitee

大佬应该知道,github在很多地方已经被墙了,所以我希望大佬可以适配gitee,真的很喜欢大佬的ui,而且部署简单,比hexo好很多,感谢!

Latex有bug

第一次访问页面的时候Latex炸了,在写博文里点过预览之后就好了
预览前 $$ n \leq 100000,a[i]\leq100000 $$
预览后 n≤100000,a[i]≤100000
链接

请求增加自定义css、js功能

请求增加自定义css、js功能,如果为了改样式去重新编译太麻烦了,希望能加上直接修改css和js,最好能附加css和js文件的功能。

顺便页面上的音符能不能开个开关控制下是否显示?

谢谢。

只有翻墙才可以看???

这个网站只有翻墙才可以看?为什么github不翻墙就可以看,而基于github做的博客却需要翻墙???

列表显示异常

markdown 里面的无序列表, 只会将列表往里缩进, 但是不会出现列表的点或者序号, 有序列表和无序列表都是这样

image

image

但是好像生成的html也是没有问题的, 看了下mavon-editor 的项目, 那边的渲染是正常的

问一个404问题

你好,我克隆好了,项目名称,json配置这些都改对了。为什么打开还是404呢

系统配置不可用

系统配置怎么修改都会弹出 notfound而且背景音乐默认开启,关不了。

github取消通过access_token授权方式,使用Authorization授权,导致绑定Token,发布Blog等无法使用,不知道为啥作者没有维护。

github修改了授权的方式,取消通过access_token授权,详情查看:https://developer.github.com/changes/2020-02-10-deprecating-auth-through-query-param/

现在github建议:

废弃 curl "https://api.github.com/user/repos?access_token=my_access_token"

改为 curl -H 'Authorization: token my_access_token' https://api.github.com/user

需要修改的内容:/src/utils/request.js文件。

service.interceptors.request.use(
config => {
let token = store.state.token.token
if (token) {
let sp = "?"
if (config.url.indexOf("?") >= 0) {
sp = "&"
}
// 取消直接通过access_token的校验方式
// config.url = config.url + sp + "access_token=" + token
// 使用Authorization的授权
config.headers = {
'Authorization': 'token ' + token
}
}
return config
})

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.