7 Star 39 Fork 11

wangsongyan / wblog

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

wblog Build Status

示例地址

初衷

作为一名web开发程序员居然没有自己的博客,都不好意思对外宣称自己的开发web的。 以前也有写博客的习惯,但是都是用的现有的博客网站。

技术选型

  1. web:gin
  2. orm:gorm
  3. database:sqlite3
  4. 全文检索:wukong
  5. 文件存储:七牛云存储smms图床
  6. 配置文件 go-yaml

项目结构

-wblog
    |-conf 配置文件目录
    |-controllers 控制器目录
    |-helpders 公共方法目录
    |-models 数据库访问目录
    |-static 静态资源目录
        |-css css文件目录
        |-images 图片目录
        |-js js文件目录
        |-libs js类库
    |-system 系统配置文件加载目录
    |-tests 测试目录
    |-vendor 项目依赖其他开源项目目录
    |-views 模板文件目录
    |-main.go 程序执行入口

TODO

  • 系统日志
  • 网站统计
  • 文章、页面访问统计
  • github登录发表评论
  • rss
  • 定时备份系统数据
  • 邮箱订阅功能

安装部署

本项目使用govendor管理依赖包,govendor安装方法

go get -u github.com/kardianos/govendor
git clone https://github.com/wangsongyan/wblog
cd wblog
govendor sync
go run main.go

使用方法

使用说明

  1. 修改conf.yaml,设置signup_enabled: true
  2. 访问http://xxx.xxx/signup 注册管理员账号
  3. 修改conf.yaml,设置signup_enabled: false

注意事项

  1. 如果需求上传图片功能请自行申请七牛云存储空间,并修改配置文件填写
    • qiniu_accesskey
    • qiniu_secretkey
    • qiniu_fileserver 七牛访问地址
    • qiniu_bucket 空间名称
  2. 如果需要github登录评论功能请自行注册github oauthapp,并修改配置文件填写
    • github_clientid
    • github_clientsecret
    • github_redirecturl
  3. 如果需要使用邮件订阅功能,请自行填写
    • smtp_username
    • smtp_password
    • smtp_host,例如:smtp.163.com:25
  4. Goland运行时,修改main.go getCurrentDirectory方法返回""

效果图

file

file

file

捐赠

如果项目对您有帮助,打赏个鸡腿吃呗!

The MIT License (MIT) Copyright (c) 2018 wangsongyan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

基于gin+gorm开发的个人博客项目 展开 收起
Go
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/wangsongyan/wblog.git
git@gitee.com:wangsongyan/wblog.git
wangsongyan
wblog
wblog
master

搜索帮助