Giter Site home page Giter Site logo

zxysilent / blog Goto Github PK

View Code? Open in Web Editor NEW
678.0 22.0 190.0 43.46 MB

一个go、echo、xorm、vue typescript vite 开发的快速、简洁、美观、前后端分离的个人博客系统(blog)、也可方便二次开发为CMS(内容管理系统)和各种企业门户网站。

Home Page: https://blog.zxysilent.com

License: MIT License

Go 17.63% HTML 2.55% Batchfile 0.11% JavaScript 53.83% Vue 21.99% Shell 0.01% Less 0.52% TypeScript 3.35%
vue echo go vuex vue-cli spa admin api golang xorm blog iviewui naive-ui npm pinia typescript vite

blog's Introduction

一个go语言实现的博客

A blog written in the go programming language

多用户支持,权限管理

Multi user support, permission management

技术栈

Technology stack

预览地址

Preview address

https://blog.zxysilent.com

仓库地址

Repository address

github(https://github.com/zxysilent/blog)

gitee(https://gitee.com/zxysilent/blog)

开发原因

  • 现在自己使用博客系统不方便管理、部署和二次开发
  • 渲染速度到不到想要的效果

计划功能

实现blog功能,方便二次开发

  • 博文管理
  • 分类管理
  • 标签管理
  • 系统设置
  • 管理主页
  • 笔记模式
  • 用户管理
  • 角色管理
  • 全局配置
  • 个性化配置
  • 笔记分享
  • 配置字典

说明

  • 替换markdown 编辑器为富文本编辑器web/src/components/Editor/Richtext即可作为简单CMS
  • 注意配置使用的数据库
    # mysql\sqlite
    type = "sqlite"
    # uid:pass@tcp(host:port)/dbname?charset=utf8mb4&parseTime=true&loc=Local
    mysql = "root:root@tcp(127.0.0.1:3306)/blog?charset=utf8mb4&parseTime=true&loc=Local"
    sqlite = "file:blog.db"
    

讨论群

🐧🐧 1059282178

使用方式-直接部署

git clone -b next --depth=1 https://github.com/zxysilent/blog.git

若要部署,请修改关键信息[token、用户名、密码等] 数据库自带文章内容请在部署前删除

部署界面

  • 安装依赖npm install
  • 修改.env.development中的VITE_APP_SRV为自己的服务地址
  • 发布npm run build会自动发布到dist目录下面
  • 友链里面第一个为后台登陆地址默认用户名zxysilent,密码zxyslt,可自行数据库修改

部署服务

  • 配置conf.toml数据库信息
  • 还原data目录下blog.sql数据库 数据库自带文章内容请在部署前删除
  • 安装依赖go mod tidy
  • 编译可执行程序
    • 普通开发编译版本go build
    • 编译不带日志和swagger文档版本go build -tags=prod体积大幅度减小,日志请用nginx、caddyweb服务器记录
    • 若需要日志且不需要文档,请自定义开发或提issues
  • 服务器部署
    • windows 直接运行
    • linux 普通方式nohup ./blog>>nohup.log 2>&1 &

评论配置

使用方式-自定义开发

git clone https://github.com/zxysilent/blog.git

若要部署,请修改关键信息[token、用户名、密码等] 数据库自带文章内容请在部署前删除

开发界面

  • 安装依赖npm install
  • 开发运行npm run serve
  • 浏览器打开 http://127.0.0.1:8082/
  • 友链里面第一个为后台登陆地址默认用户名zxysilent,密码zxyslt,可自行数据库修改

开发服务

  • 配置conf.toml数据库信息
  • 还原data目录下blog.sql数据库 数据库自带文章内容请在部署前删除
  • 安装依赖go mod tidy
  • 安装 swag
    • go get -u github.com/swaggo/swag/cmd/swag
  • 运行swag init生成api文档
  • 运行后台go run
  • 浏览器默认访问 http://127.0.0.1:8085/

渲染性能

image

效果展示

前台

  • 首页 image
  • 归档 image
  • 关于 image

后台

  • 登录 image
  • 首页 image
  • 文章 image
  • 文章编辑 image
  • 配置 image
  • 权限 image
  • 授权 image
  • 笔记模式 image
  • 笔记分享 image

Donation

If this project help you a lot, you can support us by:

AliPay

image

Wechat Pay

image

blog's People

Contributors

zxysilent 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

blog's Issues

缺少docs目录代码

缺少docs目录代码

import (
// docs
_ "blog/docs"

"github.com/labstack/echo"
echoSwagger "github.com/swaggo/echo-swagger"

)

_ "blog/docs"
引用出错,是代码不完整?

打包问题

怎能将vue build 生成的文件打包到项目中

npm run server 报错啦

$ npm run build
npm ERR! path /usr/local/go/src/blog/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open
npm ERR! enoent ENOENT: no such file or directory, open '/usr/local/go/src/blog/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2020-11-05T10_23_52_811Z-debug.log

可以帮忙看看吗

API接口文档运行

博主,请问API接口文档是要单独起端口运行,才能通过网址访问(即没有集成到后台)?本人刚接触GO,然后对go-swagger不太了解

问题多多

大佬,能出个视频嘛,一天没部署好。问题一:工程放在d盘,go build main.go报错在k盘找不到包(go安装在k盘的原因吗);问题二:界面还能起来,服务怎么都起不起来,我怀疑是数据库问题,但是我换了其他项目又部署成功了。

build报错

master分支的代码
go version go1.13.5 linux/amd64

go build 执行报错

router/dev.go:16:13: cannot use echoSwagger.WrapHandler (type "github.com/labstack/echo/v4".HandlerFunc) as type "github.com/labstack/echo".HandlerFunc in argument to engine.GET

使用

请问前台地址如何,进入之后默认是后台页面,找不到前台地址

windows下交叉编译linux下可执行文件

image

在windows下交叉编译linux下的可执行文件,我看下报错日志,它为什么会引用成windows下的绝对路径?我怎么感觉这有点像C++的动态链接库一样的

vue

npm run serve

[email protected] serve
vue-cli-service serve

INFO Starting development server...
98% after emitting SizeLimitsPlugin

ERROR Failed to compile with 1 error 下午11:30:25

error in ./src/main.js

Syntax Error: Error: [BABEL] /Users/rongwang/Documents/github/blog/vue/src/main.js: Cannot find module 'core-js/package.json'
Require stack:

  • /Users/rongwang/Documents/github/blog/vue/node_modules/@vue/babel-preset-app/index.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@babel/core/lib/config/files/module-types.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@babel/core/lib/config/files/configuration.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@babel/core/lib/config/files/index.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@babel/core/lib/index.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@vue/cli-plugin-babel/index.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@vue/cli-service/lib/Service.js
  • /Users/rongwang/Documents/github/blog/vue/node_modules/@vue/cli-service/bin/vue-cli-service.js (While processing: "/Users/rongwang/Documents/github/blog/vue/node_modules/@vue/babel-preset-app/index.js")
    at Generator.next ()
    at Generator.next ()
    at Generator.next ()

@ multi (webpack)-dev-server/client?http://127.0.0.1:8080/sockjs-node (webpack)/hot/dev-server.js ./src/main.js

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.