go-sonic / sonic Goto Github PK
View Code? Open in Web Editor NEWSonic is a blogging platform developed by Go. Simple and powerful
License: MIT License
Sonic is a blogging platform developed by Go. Simple and powerful
License: MIT License
1.0.5
SQLite3
Executable file
see also http://yah2er0ne.fun/categories
No response
No response
lastest
SQLite3
Executable file
No response
No response
No response
1.0.8
Sonic项目非常优秀!感谢Sonic所有开发者!
但在学习此项目过程中,想重点关注以下后台管理golang+vue的实现,目前项目中的resources/admin是编译后文件,尝试拉取console项目的源码编译并替换后不能正常使用,故向Sonic开发者索要一下二次开发的后台管理源码(resources/admin),如能公开非常感谢,倘若涉及开发者个人版权,请忽略本条信息。非常感谢!。
再次感谢参与Sonic项目开发的所有人员。
No response
No response
现在主题太少了,什么时候上新?最好多来点好看的
No response
1.0.5
SQLite3
Executable file
No response
No response
latest
SQLite3
Docker
No response
即使是未使用的标签,也会展示非0的文章数量
No response
No response
v1.0.3
SQLite3
Docker
No response
No response
No response
1.0.8
前端访问,都是通过http。
如何改成https访问
No response
latest
SQLite3
Executable file
No response
重新Load的时候只加载了被更新的文件,没有加载整个主题文件
No response
No response
106
SQLite3
Executable file
No response
搜索页面的标签点击错误
No response
No response
master
SQLite3
Executable file
No response
I benchmark the Hello Sonic page on my local machine, using main branch and default config.
The result is about 1500 QPS, with 100 concurrent client and 42ms P99 latency.
From the profile, dal.Use
use about ~25% of the CPU time.
I think we can reuse the same *Query
if we are using the same *DB
.
I do a quick POC, by reusing the same *Query
for all query (didn't take transaction and session into concern) I got about 4000 QPS.
No response
wrk2 benchmark
wrk -t2 -c100 -d30s -R4000 -L http://127.0.0.1:8080/archives/hello-sonic
Running 30s test @ http://127.0.0.1:8080/archives/hello-sonic
2 threads and 100 connections
Thread calibration: mean lat.: 4.460ms, rate sampling interval: 11ms
Thread calibration: mean lat.: 4.527ms, rate sampling interval: 11ms
Thread Stats Avg Stdev Max +/- Stdev
Latency 4.89ms 1.88ms 38.18ms 81.94%
Req/Sec 2.09k 276.68 3.00k 73.81%
Latency Distribution (HdrHistogram - Recorded Latency)
50.000% 4.75ms
75.000% 5.58ms
90.000% 6.46ms
99.000% 11.86ms
99.900% 21.38ms
99.990% 30.82ms
99.999% 37.41ms
100.000% 38.21ms
----------------------------------------------------------
119551 requests in 30.00s, 2.04GB read
Requests/sec: 3984.61
Transfer/sec: 69.48MB
No response
建议可以增加基于docker化的部署方案,集成mysql到compose中,以便快速部署环境、快速备份数据、切换运行平台等。
No response
v1.0.6
SQLite3
Executable file
No response
部署包中提供的 systemd/sonic.service 中存在一些问题,导致如果直接使用的话,会出现下面的报错:
panic: template dir: /opt/sonic/systemd/resources/template not exist
这是因为在service文件中缺少工作路径 WorkingDirectory,systemd运行bin文件的时候并不能有效找到templates等资源文件的路径,需要显示指定 WorkingDirectory
需要在 [service] 中添加:
[Service]
WorkingDirectory=/your_path
另外, sonic.service 中当前使用的User为 nobody,亲测也无法直接启动,改成 nginx 用户也无法启动,只能是 root,没仔细看源码,是需要特权用户才能启动么 这点需要确认下。谢谢
panic: template dir: /opt/sonic/systemd/resources/template not exist
goroutine 1 [running]:
github.com/go-sonic/sonic/config.NewConfig()
github.com/go-sonic/sonic/config/config.go:69 +0x54c
reflect.Value.call({0x1086960?, 0x12b3888?, 0x415edf?}, {0x122260e, 0x4}, {0x1ba6ec8, 0x0, 0x30?})
reflect/value.go:584 +0x8c5
reflect.Value.Call({0x1086960?, 0x12b3888?, 0x416227?}, {0x1ba6ec8?, 0x113f2e0?, 0xc00042f001?})
reflect/value.go:368 +0xbc
go.uber.org/dig.defaultInvoker({0x1086960?, 0x12b3888?, 0x1ba6ec8?}, {0x1ba6ec8?, 0x0?, 0x1437290?})
go.uber.org/[email protected]/container.go:220 +0x28
go.uber.org/dig.(*constructorNode).Call(0xc0004bd680, {0x1437290, 0xc0002521e0})
go.uber.org/[email protected]/constructor.go:154 +0x297
go.uber.org/dig.paramSingle.Build({{0x0, 0x0}, 0x0, {0x143ded0, 0x1064060}}, {0x1437290, 0xc0002521e0})
go.uber.org/[email protected]/param.go:288 +0x2af
go.uber.org/dig.paramList.BuildList({{0x143ded0, 0x10bd3a0}, {0xc00025eac0, 0x2, 0x2}}, {0x1437290, 0xc0002521e0})
go.uber.org/[email protected]/param.go:151 +0xb9
go.uber.org/dig.(*constructorNode).Call(0xc0004bd500, {0x1437290, 0xc0002521e0})
go.uber.org/[email protected]/constructor.go:145 +0x132
go.uber.org/dig.paramSingle.Build({{0x0, 0x0}, 0x0, {0x143ded0, 0x1208800}}, {0x1437290, 0xc0002521e0})
go.uber.org/[email protected]/param.go:288 +0x2af
go.uber.org/dig.paramList.BuildList({{0x143ded0, 0x108c1e0}, {0xc0002a0a80, 0x1, 0x1}}, {0x1437290, 0xc0002521e0})
go.uber.org/[email protected]/param.go:151 +0xb9
go.uber.org/dig.(*Scope).Invoke(0xc0002521e0, {0x108c1e0?, 0xc0001fe720}, {0x108c1e0?, 0xc00042f9f8?, 0xc0001fe720?})
go.uber.org/[email protected]/invoke.go:85 +0x288
go.uber.org/dig.(*Container).Invoke(0x203000?, {0x108c1e0?, 0xc0001fe720?}, {0x0?, 0x0?, 0xc00009c4e0?})
go.uber.org/[email protected]/invoke.go:46 +0x2b
go.uber.org/fx.runInvoke({0x7ff9e50a0218?, 0xc00011e3f0?}, {{0x108c1e0, 0xc0001fe720}, {0xc00009c5b0, 0x4, 0x5}})
go.uber.org/[email protected]/invoke.go:108 +0x1ff
go.uber.org/fx.(*module).executeInvoke(0xc000468120, {{0x108c1e0, 0xc0001fe720}, {0xc00009c5b0, 0x4, 0x5}})
go.uber.org/[email protected]/module.go:186 +0x146
go.uber.org/fx.(*module).executeInvokes(0xc000468120)
go.uber.org/[email protected]/module.go:172 +0xfa
go.uber.org/fx.New({0xc0001a8400, 0x14, 0x1?})
go.uber.org/[email protected]/app.go:530 +0x81e
main.InitApp()
github.com/go-sonic/sonic/main.go:74 +0x5f9
main.main()
github.com/go-sonic/sonic/main.go:25 +0x1d
No response
v1.0.3
期望可以导入其他博客如Halo、WordPress、typecho 等等其他博客导出的文档数据,如果可以直接导入Halo 备份的全站数据就更好了。无论如何感谢您的辛苦开发!
No response
请问解压后安装配置那个./sonic 程序在哪啊 解压后目录下都没有./sonic这个命令 也没有sonic这个文件夹
Other
Docker
No response
请问解压后安装配置那个./sonic 程序在哪啊 解压后目录下都没有./sonic这个命令 也没有sonic这个文件夹
No response
No response
No response
https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/go
No response
v1.0.2
Hello @1379, sonic looks very cool and I note that there are plans to migrate to Hertz in its Todo, so feel free to contact me if you have any problems migrating to Hertz. Best wishes❤️
No response
latest
SQLite3
Executable file
No response
{"status":500,"message":"Internal Server Error","data":null}
runtime.panicmem
/home/brook/golang/go/src/runtime/panic.go:260
runtime.sigpanic
/home/brook/golang/go/src/runtime/signal_unix.go:835
html/template.(*Template).lookupAndEscapeTemplate
/home/brook/golang/go/src/html/template/template.go:146
html/template.(*Template).ExecuteTemplate
/home/brook/golang/go/src/html/template/template.go:135
github.com/go-sonic/sonic/template.(*Template).ExecuteTemplate
/home/brook/github.com/go-sonic/sonic/template/template.go:110
github.com/go-sonic/sonic/handler.(*Server).wrapHTMLHandler.func1
/home/brook/github.com/go-sonic/sonic/handler/server.go:262
github.com/gin-gonic/gin.(*Context).Next
/home/brook/golang/gopath/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173
github.com/go-sonic/sonic/handler/middleware.(*InstallRedirectMiddleware).InstallRedirect.func1
/home/brook/github.com/go-sonic/sonic/handler/middleware/install.go:43
github.com/gin-gonic/gin.(*Context).Next
/home/brook/golang/gopath/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173
github.com/go-sonic/sonic/handler/middleware.(*RecoveryMiddleware).RecoveryWithLogger.func1
/home/brook/github.com/go-sonic/sonic/handler/middleware/recovery.go:60
github.com/gin-gonic/gin.(*Context).Next
/home/brook/golang/gopath/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173
github.com/go-sonic/sonic/handler/middleware.(*GinLoggerMiddleware).LoggerWithConfig.func1
/home/brook/github.com/go-sonic/sonic/handler/middleware/log.go:50
github.com/gin-gonic/gin.(*Context).Next
/home/brook/golang/gopath/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/home/brook/golang/gopath/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:616
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/home/brook/golang/gopath/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:572
net/http.serverHandler.ServeHTTP
/home/brook/golang/go/src/net/http/server.go:2947
net/http.(*conn).serve
/home/brook/golang/go/src/net/http/server.go:1991
sqlite driver:
"github.com/glebarez/sqlite" //pure go sqlite driver
go1.19 + sonic v1.0.6
Server version: 5.7.40 MySQL Community Server (GPL)
mysql> create database sonicdb;
Query OK, 1 row affected (0.01 sec)
二进制部署./sonic -config conf/config.yaml。
配置文件如下:
❯ cat conf/config.yaml
server:
host: 0.0.0.0
port: 8080
logging:
filename: sonic.log
level:
app: info # debug,info,warn,error
gorm: warn # info,warn,error,silent
maxsize: 10 # 单位 megabytes
maxage: 30 #单位 天
compress: false # 是否对旧日志使用gzip进行压缩
### 数据库配置, MySQL 和 SQLite3 二选一 .如果同时配置了MySQL 或 SQLite3 ,优先使用 Sqlite3
### The Database configuration,You should choose one between MySQL and SQLite3,if bothMySQL and SQLite3 are configured ,use Sqlite3 first
sqlite3:
enable: false
mysql:
host: 127.0.0.1
port: 3333
db: sonicdb
username: "root"
password: "mysql"
sonic:
mode: "production"
work_dir: "./" # 不填默认为当前路径,用来存放日志文件、数据库文件、模板、上传的附件等(The default is the current directory. Used to store log files, database files, templates, upload files)
log_dir: "./logs" # 不填则使用work_dir 路径下的log路径 (If it is empty, use the "log" path under work_dir)
No response
2023-01-03T19:30:51.299+0800 ERROR impl/category.go:226 Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=' [4.749ms] [rows:0] SELECT count(*) FROM category
WHERE category
.name
= '默认分类'
2023-01-03T19:30:51.285+0800 DEBUG listener/template_config.go:153 load user success {"user": {"id":1,"create_time":"2023-01-03T19:30:51+08:00","update_time":null,"avatar":"//cn.gravatar.com/avatar/b599a1171731931b23eb27ca7cbb9d41?s=256&d=mm","description":"","email":"[email protected]","expire_time":null,"mfa_key":"","mfa_type":"NONE","nickname":"iceewei","password":"","username":"iceewei"}}
2023-01-03T19:30:51.299+0800 ERROR impl/category.go:226 Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '=' [4.749ms] [rows:0] SELECT count(*) FROM `category` WHERE `category`.`name` = '默认分类'
2023-01-03T19:30:51.301+0800 ERROR handler/server.go:226 handler error {"error": ": Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='", "errorVerbose": "Error 1267: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE) for operation '='\n\ngithub.com/go-sonic/sonic/util/xerr.ErrorType.Wrap\n\tgithub.com/go-sonic/sonic/util/xerr/error.go:50\ngithub.com/go-sonic/sonic/service/impl.WrapDBErr\n\tgithub.com/go-sonic/sonic/service/impl/common.go:22\ngithub.com/go-sonic/sonic/service/impl.categoryServiceImpl.Create\n\tgithub.com/go-sonic/sonic/service/impl/category.go:228\ngithub.com/go-sonic/sonic/service/impl.installServiceImpl.createDefaultCategory\n\tgithub.com/go-sonic/sonic/service/impl/install.go:152\ngithub.com/go-sonic/sonic/service/impl.installServiceImpl.InstallBlog.func1\n\tgithub.com/go-sonic/sonic/service/impl/install.go:75\ngithub.com/go-sonic/sonic/dal.Transaction.func1\n\tgithub.com/go-sonic/sonic/dal/dal.go:130\ngithub.com/go-sonic/sonic/dal.(*Query).Transaction.func1\n\tgithub.com/go-sonic/sonic/dal/gen.go:210\ngorm.io/gorm.(*DB).Transaction\n\tgorm.io/[email protected]/finisher_api.go:622\ngithub.com/go-sonic/sonic/dal.(*Query).Transaction\n\tgithub.com/go-sonic/sonic/dal/gen.go:210\ngithub.com/go-sonic/sonic/dal.Transaction\n\tgithub.com/go-sonic/sonic/dal/dal.go:128\ngithub.com/go-sonic/sonic/service/impl.installServiceImpl.InstallBlog\n\tgithub.com/go-sonic/sonic/service/impl/install.go:64\ngithub.com/go-sonic/sonic/handler/admin.(*InstallHandler).InstallBlog\n\tgithub.com/go-sonic/sonic/handler/admin/install.go:32\ngithub.com/go-sonic/sonic/handler.(*Server).wrapHandler.func1\n\tgithub.com/go-sonic/sonic/handler/server.go:224\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*RecoveryMiddleware).RecoveryWithLogger.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/recovery.go:60\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*GinLoggerMiddleware).LoggerWithConfig.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/log.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\tgithub.com/gin-gonic/[email protected]/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\tgithub.com/gin-gonic/[email protected]/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2947\nnet/http.(*conn).serve\n\tnet/http/server.go:1991\nruntime.goexit\n\truntime/asm_amd64.s:1594\n\n"}
No response
0.0.0
因为没有寻找到合适的地方沟通,所以冒昧问一下**支持 Halo 的主题么?**还是需要移植过来?
No response
1.02
SQLite3
Executable file
No response
小工具--整站备份 出错
ERROR admin/backup.go:86 err=CreateFile D:\temp\sonic-backup\options: The system cannot find the path specified
No response
No response
我在想这个备份是不是有可能直接备份到oss上,否则备份到一个临时文件还需要人去copy出来,这感觉有点麻烦
No response
数据库:SQLite 3.39.2 运行模式:production 启用主题:Anatole 启动时间:2023-02-13 15:26
我看了下默认主题的版本,还有代码里的Structer,好像使用的是1.0.5版本的模版
id: caicai_anatole
name: Anatole
author:
name: Caicai
website: https://www.caicai.me
description: Sonic Default Theme
logo: https://avatars1.githubusercontent.com/u/1811819?s=460&v=4
website: https://github.com/go-sonic/default-theme-anatole
repo: https://github.com/go-sonic/default-theme-anatole
version: 1.5.0-alpha.2
require: 1.0.5
代码里对应的struct
type ThemeProperty struct {
ID string `json:"id"`
Name string `json:"name"`
Website string `json:"website"`
Branch string `json:"branch"`
Repo string `json:"repo"`
UpdateStrategy consts.ThemeUpdateStrategy `json:"updateStrategy"`
Description string `json:"description"`
Logo string `json:"logo"`
Version string `json:"version"`
Require string `json:"require"`
Author ThemeAuthor `json:"author"`
ThemePath string `json:"themePath"`
FolderName string `json:"folderName"`
HasOptions bool `json:"hasOptions"`
Activated bool `json:"activated"`
ScreenShots string `json:"screenshots"`
PostMetaField []string `json:"postMetaField"`
SheetMetaField []string `json:"sheetMetaField"`
}
apiVersion: theme.halo.run/v1alpha1
kind: Theme
metadata:
name: theme-hao
spec:
displayName: Hao
author:
name: 程序员小航
website: 'https://liuzhihang.com'
description: Halo 2.0 Theme base on Thymeleaf, Referring to Butterfly and Heo
logo: 'https://liuzhihang.com/themes/theme-hao/assets/images/hao-logo.jpg'
website: 'https://liuzhihang.com'
repo: 'https://github.com/liuzhihang/halo-theme-hao'
settingName: "theme-hao-setting"
configMapName: "theme-hao-configMap"
version: 1.0.8
require: 2.0.0
版本之间差异太大,导致上传主题的时候
themeProperty, err := s.UnmarshalProperty(ctx, propertyContent)
读取到的themeProperty很多都是空,数据添加到数据库了,但是都是空记录,导致一系列的BUG
或许可以估计一下用新版本的多还是旧版本的多,新版本的多更新一下模版,或者在README.MD里说明一下
No response
No response
现象:拉取master最新提交在本地部署(Mac),启动安装后无法进入主页面,日志显示找不到资源。
解决:在release v1.0.3下下载个包,解压后将resource目录复制到仓库目录下,重新启动即可。
建议:是否需要在master上将资源更新一下?
No response
Originally posted by beyondtop January 25, 2023
默认的主题,以及第二款主题Journal都无法显示后台博主回复的评论内容。要如何添加呢?大家有好方法吗?
1.0.4
SQLite3
Docker
Docker 部署首页访问资源本地访问,导致拿不到对应的js文件
1
1
No response
没有官方文档吗?
No response
1.0.4
SQLite3
Executable file
No response
1.0.4
Need to log in to the background
Back up files in any directory through directory traversal
POST /api/admin/backups/work-dir HTTP/1.1
Host: 127.0.0.1:8080
Content-Length: 35
Admin-Authorization: 0996683e-0fab-46ec-936d-953d43be8048
Accept: application/json, text/plain, */*
sec-ch-ua-mobile: ?0
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36
sec-ch-ua: " Not A;Brand";v="99", "Chromium";v="96"
sec-ch-ua-platform: "Linux"
Content-Type: application/json
Origin: http://127.0.0.1:8080
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
Referer: http://127.0.0.1:8080/admin/
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.9
Connection: close
["../../../../home/kali/Documents"]
No response
No response
1.0.6
博客搭建起来后,第一次运行,提示管理员注册。
管理员写文章后,所有人都可以查看文档
如果有新用户想注册,该怎么弄
管理员可以实现对用户的管理吗,比如,新增用户,删除用户等
No response
博客设置
SQLite3
Executable file
No response
自定义全局 head添加的内容出现在body里,并且有双引号无法起作用。使用的是1.0.6版本。
No response
No response
v1.0.1
SQLite3
Executable file
No response
No response
No response
1.0.3
Hola, hello, 안녕하세요 , 你好。
Your service has come to me very attractive. So I tried to use it, but it ran into a language barrier. So I was wondering if you have any plans to apply in English or other languages.
Also, as a result of using it for the first time, I felt that users needed materials such as tutorials. Of course, it may be a service for highly educated users lol, but your service is so attractive that I really want to use it to build my blog. I'd appreciate it if you could review it.
And I'm sorry, but if you connect to / instead of /admin after the first configuration, why is the site configured without the CSS file applied? Is there anything else I should do?
Because of this problem, I think we need a tutorial or a kind of guide or template for first-time users. If these problems aren't solved, low-educated developers like me can't seem to be able to use the service even if they want to.
Sorry for asking this issue in the Issues pane for new features.
master
MySQL 8.x
Executable file
No response
master/config/config.go文件25行
viper.SetConfigName("config.yaml"),
应该为viper.SetConfigName("config“)
No response
No response
No response
对Sonic这个项目很感兴趣,以前一直使用的Halo,但无奈Java的占用相对Go大的多,我的RAM 512M的小鸡虽然可用但不堪重负,希望本项目能够持续发展,感谢作者的付出。
初学Go,不足之处请指正,谢谢。
sonic-theme-Journal仓库地址
No response
1.0
SQLite3
Executable file
No response
删除博客文章的时候出现此错误提示,文章不能删除。
ERROR handler/server.go:222 handler error {"error": "strconv.ParseInt: parsing \"RECYCLE\": invalid syntax", "errorVerbose": "strconv.ParseInt: parsing \"RECYCLE\": invalid syntax\n\nThe parameter status type is incorrect"}
No response
最新版本
很感谢作者实现了这么好的一个系统,希望有 源码安装的文档。
No response
docker版本:go1.19.3 数据库:SQLite 3.39.2 运行模式:production 启用主题:Anatole 启动时间:2023-02-07 17:18
感谢作者,正在找一个速度快一点的blog,go真的快。
提些建议:
1.web端编辑功能建议增加音频、视频或者网络视频嵌入功能
2.建议改善上传功能,增加批量上传或导入。
3.增加blog迁移指引(hexo、wordpress),扩展用户群。
4.建议增加移动端的适配或开发app,这个很必要,有时候写点碎片的笔记或记录灵感,不想存在微信或者打开电脑,用手机马上记录下,放在自己的服务器,感觉爽歪歪。
5.建议增加云备份盘挂载或支持webdav同步
6.增加外部图床,如github图床。
7.刚刚部署,发现有时候点击文章显示不出来,特色图片也没有显示,可能是网络或者主题的问题。
再次感谢。
No response
1.0.7
SQLite3
Executable file
No response
从本地上传图片失败
如下图所示
2023-02-01T14:56:59.364+0800 INFO dal/dal.go:85 try to open SQLite3 db {"path": "/usr/local/projects/sonic/sonic-linux-amd64/sonic.db"}
2023-02-01T14:56:59.365+0800 INFO dal/dal.go:51 connect database success
2023-02-01T14:57:03.148+0800 INFO listener/start.go:89 �[34;1mSonic started at http://127.0.0.1:8080�[0m
2023-02-01T14:57:03.148+0800 INFO listener/start.go:92 �[34;1mSonic admin started at http://127.0.0.1:8080/admin�[0m
2023-02-01T14:57:03.149+0800 DEBUG listener/template_config.go:136 load theme success {"theme": "Anatole"}
2023-02-01T14:57:16.121+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:16.120+0800", "status": 302, "latency": 0.000458729, "clientIP": "192.168.1.105", "method": "GET", "path": "/"}
2023-02-01T14:57:16.747+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:16.747+0800", "status": 200, "latency": 0.000110512, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/is_installed"}
2023-02-01T14:57:38.494+0800 DEBUG listener/template_config.go:136 load theme success {"theme": "Anatole"}
2023-02-01T14:57:38.500+0800 DEBUG listener/template_config.go:136 load theme success {"theme": "Anatole"}
2023-02-01T14:57:38.568+0800 DEBUG listener/template_config.go:153 load user success {"user": {"id":1,"create_time":"2023-02-01T14:57:38.56805587+08:00","update_time":null,"avatar":"//cn.gravatar.com/avatar/d615d5793929e8c7d70eab5f00f7f5f1?s=256&d=mm","description":"","email":"[email protected]","expire_time":null,"mfa_key":"","mfa_type":"NONE","nickname":"1","password":"","username":"1"}}
2023-02-01T14:57:38.793+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:38.487+0800", "status": 200, "latency": 0.306888042, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/installations"}
2023-02-01T14:57:38.800+0800 WARN impl/option.go:165 SLOW SQL >= 200ms [229.574ms] [rows:1] SELECT * FROM `option` WHERE `option`.`option_key` = "comment_new_notice" LIMIT 1
2023-02-01T14:57:38.806+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:38.806+0800", "status": 200, "latency": 0.00022502, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/is_installed"}
2023-02-01T14:57:46.512+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.442+0800", "status": 200, "latency": 0.069656633, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/login/precheck"}
2023-02-01T14:57:46.730+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.526+0800", "status": 200, "latency": 0.203821288, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/login"}
2023-02-01T14:57:46.744+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.744+0800", "status": 200, "latency": 0.000523982, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/users/profiles"}
2023-02-01T14:57:46.746+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.744+0800", "status": 200, "latency": 0.001185144, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/options/map_view/keys"}
2023-02-01T14:57:46.746+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.745+0800", "status": 200, "latency": 0.000885999, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/options/map_view/keys"}
2023-02-01T14:57:46.927+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.925+0800", "status": 200, "latency": 0.002357929, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/posts/comments?status=AUDITING&size=20"}
2023-02-01T14:57:46.930+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.929+0800", "status": 200, "latency": 0.001255842, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/sheets/comments?status=AUDITING&size=20"}
2023-02-01T14:57:46.938+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.937+0800", "status": 200, "latency": 0.000851524, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/journals/comments?status=AUDITING&size=20"}
2023-02-01T14:57:46.938+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.937+0800", "status": 200, "latency": 0.001757747, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/statistics"}
2023-02-01T14:57:46.948+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.947+0800", "status": 200, "latency": 0.000670154, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/logs/latest?top=5"}
2023-02-01T14:57:46.948+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:46.948+0800", "status": 200, "latency": 0.000787117, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/posts/latest?top=5"}
2023-02-01T14:57:50.117+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:50.108+0800", "status": 200, "latency": 0.008839152, "clientIP": "192.168.1.105", "method": "GET", "path": "/archives/hello-sonic"}
2023-02-01T14:57:50.296+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:50.295+0800", "status": 200, "latency": 0.001342069, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/content/posts/1/comments/top_view?page=0&size=10"}
2023-02-01T14:57:50.297+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:50.296+0800", "status": 200, "latency": 0.000332386, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/content/options/comment"}
2023-02-01T14:57:52.387+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:52.385+0800", "status": 200, "latency": 0.002212155, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/statistics"}
2023-02-01T14:57:57.390+0800 INFO [GIN] {"beginTime": "2023-02-01T14:57:57.389+0800", "status": 200, "latency": 0.001192636, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/statistics"}
2023-02-01T14:58:02.392+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:02.390+0800", "status": 200, "latency": 0.001763422, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/statistics"}
2023-02-01T14:58:03.914+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:03.913+0800", "status": 200, "latency": 0.000980992, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/themes/activation/template/custom/post"}
2023-02-01T14:58:06.897+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:06.896+0800", "status": 200, "latency": 0.000816589, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/attachments?page=0&size=40"}
2023-02-01T14:58:06.898+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:06.897+0800", "status": 200, "latency": 0.000598593, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/attachments/media_types"}
2023-02-01T14:58:06.906+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:06.905+0800", "status": 200, "latency": 0.00061402, "clientIP": "192.168.1.105", "method": "GET", "path": "/api/admin/attachments/types"}
2023-02-01T14:58:13.050+0800 DEBUG impl/local.go:59 Local FileStorage {"originalFilename": "1.jpg", "absPath": "/usr/local/projects/sonic/sonic-linux-amd64/upload/2023/02/1.jpg"}
2023-02-01T14:58:13.066+0800 ERROR handler/server.go:226 handler error {"error": ": record not found", "errorVerbose": "record not found\n\ngithub.com/go-sonic/sonic/util/xerr.ErrorType.Wrap\n\tgithub.com/go-sonic/sonic/util/xerr/error.go:50\ngithub.com/go-sonic/sonic/service/impl.WrapDBErr\n\tgithub.com/go-sonic/sonic/service/impl/common.go:21\ngithub.com/go-sonic/sonic/service/impl.(*attachmentServiceImpl).Upload\n\tgithub.com/go-sonic/sonic/service/impl/attachment.go:151\ngithub.com/go-sonic/sonic/handler/admin.(*AttachmentHandler).UploadAttachment\n\tgithub.com/go-sonic/sonic/handler/admin/attachment.go:57\ngithub.com/go-sonic/sonic/handler.(*Server).wrapHandler.func1\n\tgithub.com/go-sonic/sonic/handler/server.go:224\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*InstallRedirectMiddleware).InstallRedirect.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/install.go:43\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*RecoveryMiddleware).RecoveryWithLogger.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/recovery.go:62\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*GinLoggerMiddleware).LoggerWithConfig.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/log.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\tgithub.com/gin-gonic/[email protected]/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\tgithub.com/gin-gonic/[email protected]/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2947\nnet/http.(*conn).serve\n\tnet/http/server.go:1991\nruntime.goexit\n\truntime/asm_amd64.s:1594\n\nThe resource does not exist or has been deleted\n"}
2023-02-01T14:58:13.066+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:13.041+0800", "status": 404, "latency": 0.025358758, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/attachments/upload"}
2023-02-01T14:58:19.449+0800 DEBUG impl/local.go:59 Local FileStorage {"originalFilename": "1.jpg", "absPath": "/usr/local/projects/sonic/sonic-linux-amd64/upload/2023/02/1.jpg"}
2023-02-01T14:58:19.463+0800 ERROR handler/server.go:226 handler error {"error": ": record not found", "errorVerbose": "record not found\n\ngithub.com/go-sonic/sonic/util/xerr.ErrorType.Wrap\n\tgithub.com/go-sonic/sonic/util/xerr/error.go:50\ngithub.com/go-sonic/sonic/service/impl.WrapDBErr\n\tgithub.com/go-sonic/sonic/service/impl/common.go:21\ngithub.com/go-sonic/sonic/service/impl.(*attachmentServiceImpl).Upload\n\tgithub.com/go-sonic/sonic/service/impl/attachment.go:151\ngithub.com/go-sonic/sonic/handler/admin.(*AttachmentHandler).UploadAttachment\n\tgithub.com/go-sonic/sonic/handler/admin/attachment.go:57\ngithub.com/go-sonic/sonic/handler.(*Server).wrapHandler.func1\n\tgithub.com/go-sonic/sonic/handler/server.go:224\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*InstallRedirectMiddleware).InstallRedirect.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/install.go:43\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*RecoveryMiddleware).RecoveryWithLogger.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/recovery.go:62\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/go-sonic/sonic/handler/middleware.(*GinLoggerMiddleware).LoggerWithConfig.func1\n\tgithub.com/go-sonic/sonic/handler/middleware/log.go:50\ngithub.com/gin-gonic/gin.(*Context).Next\n\tgithub.com/gin-gonic/[email protected]/context.go:173\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest\n\tgithub.com/gin-gonic/[email protected]/gin.go:616\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP\n\tgithub.com/gin-gonic/[email protected]/gin.go:572\nnet/http.serverHandler.ServeHTTP\n\tnet/http/server.go:2947\nnet/http.(*conn).serve\n\tnet/http/server.go:1991\nruntime.goexit\n\truntime/asm_amd64.s:1594\n\nThe resource does not exist or has been deleted\n"}
2023-02-01T14:58:19.463+0800 INFO [GIN] {"beginTime": "2023-02-01T14:58:19.440+0800", "status": 404, "latency": 0.022704338, "clientIP": "192.168.1.105", "method": "POST", "path": "/api/admin/attachments/upload"}
latest
SQLite3
Executable file
No response
如果按照分类或者标签筛选后的文章在进行分页切换返回的路径前少了一个 /,导致会在浏览器现有url后再拼接返回的路径会造成404,且如果当前页面是第2页,上一页的href目前直接返回的项目根路径,丢失了路径中的/tag或者/category导致退出了按条件筛选
@hooxuu
No response
No response
1.0.5
SQLite3
Executable file
No response
No response
go1.19.2
SQLite3
Executable file
No response
请求 URL: http://be.de.allserver.buzz/api/admin/tags/3
请求方法: DELETE
状态代码: 404 Not Found
远程地址: [::ffff:c612:18e]:80
引用者策略: strict-origin-when-cross-origin
Content-Length: 18
Content-Type: text/plain
Date: Sat, 14 Jan 2023 10:15:03 GMT
Accept: application/json, text/plain, /
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.9,en;q=0.8,en-GB;q=0.7,en-US;q=0.6
Admin-Authorization:
Cache-Control: no-cache
Connection: keep-alive
Cookie:
DNT: 1
Host: be.de.allserver.buzz
Origin: http://be.de.allserver.buzz
Pragma: no-cache
Referer: http://be.de.allserver.buzz/admin/
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.76
No response
No response
Originally posted by LeannaClaire December 31, 2022
atom.xml 文件底部有CSS溢出
1.02
SQLite3
Executable file
No response
后台主题编辑,第一次选中文件可以显示并编辑保存,以后点击任何文件都不显示内容。
Firefox和Edge均是
No response
No response
latest
SQLite3
Executable file
No response
原因是获取相邻文章时没有排除掉自定义页面
No response
No response
Hi
请问一下日志在admin页面编辑的时候显示的时间是北京时间,服务器时间也改成这个时区了,但是为什么打开博客的日志页面上面显示的就是晚了7个小时的时区呢?
sonic使用的是Docker 1.0.6的版本,主题也是最新的版本。
请问可以如何解决呢?
Thanks
1.0.5
SQLite3
Executable file
See also http://yah2er0ne.fun/s/about
No response
No response
v1.0.3
MySQL 8.x
Executable file
No response
管理员界面评论界面,查询时筛选条件不生效
No response
No response
目前没有 release 包吗
Originally posted by beyondtop February 2, 2023
我想请教下默认主题的点赞,主要是哪个文件控制的?可能是有bug,首次访问可以点击加1,刷新后归0,然后无法再点击。https://xuexi.chat
v1.0.1
SQLite3
Executable file
No response
编辑新文章上传图片之后的图片的路径是:http://127.0.0.1:8080/upload/2022/11/image-1668316491268.png
在前台展示文章的时候,前台获取图片的路径是:http://127.0.0.1:8080/archives/upload/2022/11/image-1668316491268.png
No response
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.