wblog

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 14 Imported by: 0

README

wblog Build Status

示例地址

一、初衷

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

二、技术选型

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

三、项目结构

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

四、TODO

  • 文章、页面访问统计
  • Github登录发表评论
  • RSS
  • 定时备份系统数据
  • 邮箱订阅功能
  • 系统日志
  • 网站统计
  • 云存储切换
  • 支持MySQL数据库
  • 导航栏配置

五、安装运行

git clone https://github.com/wangsongyan/wblog
cd wblog
go mod tidy
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运行时,修改Run/Debug Configurations > Output Directory选择到项目根目录,否则报模版目录找不到

七、效果图

file

file

file

八、捐赠

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

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL