基于gin+gorm开发的个人博客项目
作为一名web开发程序员居然没有自己的博客,都不好意思对外宣称自己的开发web的。 以前也有写博客的习惯,但是都是用的现有的博客网站。
-wblog
|-conf 配置文件目录
|-controllers 控制器目录
|-helpders 公共方法目录
|-models 数据库访问目录
|-static 静态资源目录
|-css css文件目录
|-images 图片目录
|-js js文件目录
|-libs js类库
|-system 系统配置文件加载目录
|-tests 测试目录
|-views 模板文件目录
|-main.go 程序执行入口
git clone https://github.com/wangsongyan/wblog
cd wblog
go mod tidy
go run main.go
goreleaser release --snapshot --cleangit tag "v0.0.2"
git push origin v0.0.2
go run main.go -g或编译后执行wblog -g生成示例配置文件conf/conf.sample.toml (示例配置文件均为系统默认配置,可全部删除仅保留自己所需配置)file_server = "smms"
#file_server = "qiniu"
[qiniu]
enabled = true
accesskey = 'AK'
secretkey = 'SK'
fileserver = '自定义域名,例如https://example.com'
bucket = 'wblog'
[smms]
enabled = true
apikey = ''
[github]
enabled = true
clientid = ''
clientsecret = ''
redirecturl = 'https://example.com/oauth2callback'
[smtp]
enabled = true
username = '用户名'
password = '密码'
host = 'smtp.163.com:25'
Run/Debug Configurations > Output Directory选择到项目根目录,否则报模板目录找不到wblog数据库(数据库名自便,与配置文件一致即可)[database]
dialect = 'sqlite'
dsn = 'wblog.db?_loc=Asia/Shanghai'
#dialect = 'mysql'
#dsn = 'root:mysql@/wblog?charset=utf8&parseTime=True&loc=Asia%2FShanghai'
如果项目对您有帮助,打赏个鸡腿吃呗!
暂无开放 Issues,或尚未同步最近议题。