Giter Site home page Giter Site logo

sonic's Introduction

Sonic [ˈsɒnɪk], Sonic is a Go Blogging Platform. Simple and Powerful.

GitHub release GitHub All Releases Docker pulls GitHub last commit
Telegram Channel

English | 中文

📖 Introduction

Sonic means as fast as sound speed. Like its name, sonic is a high-performance blog system developed using golang.

Thanks to the Halo project team, who inspired this project. The front-end is a project fork from Halo.

🚀 Features:

  • Support multiple types of databases: SQLite、MySQL(TODO: PostgreSQL)
  • Small: The installation file is only 10mb size
  • High-performance: Post details page can withstand 2500 QPS(Enviroment: Intel Xeon Platinum 8260 4C 8G ,SQLite3)
  • Support changing theme
  • Support Linux、Windows、Mac OS. And Support x86、x64、Arm、Arm64、MIPS
  • Object storage(MINIO、Google Cloud、AWS、AliYun)

🎊 Preview

Default Theme

Console

🧰 Install

Download the latest installation package

Please pay attention to the operating os and instruction set and the version

wget https://github.com/go-sonic/sonic/releases/latest/download/sonic-linux-amd64.zip -O sonic.zip

Decompression

unzip -d sonic sonic.zip

Launch

cd sonic
./sonic -config conf/config.yaml

Initialization

Open http://ip:port/admin#install

Next, you can access sonic through the browser.

The URL of the admin console is http://ip:port/admin

The default port is 8080.

🔨️ Build

1. Pull Project

git clone --recursive --depth 1 https://github.com/go-sonic/sonic

2. Run

cd sonic
go run main.go

To compile this package on Windows, you must have the gcc compiler installed,for example the TDM-GCC Toolchain can be found (here).

🚀 Done! Your project is now compiled and ready to use.

Docker

See: https://hub.docker.com/r/gosonic/sonic

Theme ecology

Theme
Anatole
Journal
Clark
Earth
PaperMod
Tink

TODO

  • i18n
  • PostgreSQL
  • Better error handling
  • Plugin(base on Wasm)
  • Use new web framework(Hertz)

Contributing

Feel free to dive in! Open an issue or submit PRs.

Sonic follows the Contributor Covenant Code of Conduct.

Contributors

This project exists thanks to all the people who contribute.

Special thanks to Evan ([email protected]), who designed the logo.

📄 License

Source code in sonic is available under the MIT License.

sonic's People

Contributors

1379 avatar cuiko avatar cusox avatar dependabot[bot] avatar dopamine-joker avatar golangboy avatar if-nil avatar jakezhu9 avatar labulac avatar meepoljdx avatar popstk avatar raisons avatar richardlitt avatar textworld avatar yintokey avatar ztelliot 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

sonic's Issues

本地部署因资源问题而无法访问

你当前使用的版本

No response

描述一下此特性

现象:拉取master最新提交在本地部署(Mac),启动安装后无法进入主页面,日志显示找不到资源。
解决:在release v1.0.3下下载个包,解压后将resource目录复制到仓库目录下,重新启动即可。
建议:是否需要在master上将资源更新一下?

附加信息

No response

希望可以支持导入其他博客程序的数据

你当前使用的版本

v1.0.3

描述一下此特性

期望可以导入其他博客如Halo、WordPress、typecho 等等其他博客导出的文档数据,如果可以直接导入Halo 备份的全站数据就更好了。无论如何感谢您的辛苦开发!

附加信息

No response

标签计数不准确

检查清单

是什么版本出现了此问题?

latest

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Docker

在线站点地址

No response

发生了什么?

即使是未使用的标签,也会展示非0的文章数量

相关日志输出

No response

附加信息

No response

后台管理源码(resources/admin)

你当前使用的版本

1.0.8

描述一下此特性

Sonic项目非常优秀!感谢Sonic所有开发者!
但在学习此项目过程中,想重点关注以下后台管理golang+vue的实现,目前项目中的resources/admin是编译后文件,尝试拉取console项目的源码编译并替换后不能正常使用,故向Sonic开发者索要一下二次开发的后台管理源码(resources/admin),如能公开非常感谢,倘若涉及开发者个人版权,请忽略本条信息。非常感谢!。
再次感谢参与Sonic项目开发的所有人员。

附加信息

No response

改了下Halo Theme Journal主题以适配Sonic

你当前使用的版本

No response

描述一下此特性

对Sonic这个项目很感兴趣,以前一直使用的Halo,但无奈Java的占用相对Go大的多,我的RAM 512M的小鸡虽然可用但不堪重负,希望本项目能够持续发展,感谢作者的付出。

初学Go,不足之处请指正,谢谢。
sonic-theme-Journal仓库地址

附加信息

No response

如何使用Https

你当前使用的版本

1.0.8

描述一下此特性

前端访问,都是通过http。

如何改成https访问

附加信息

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

安装文档

你当前使用的版本

最新版本

描述一下此特性

很感谢作者实现了这么好的一个系统,希望有 源码安装的文档。

附加信息

No response

sonic.service里面缺少WorkingDirectory, 直接通过systemd启动会出现模板文件缺失

检查清单

是什么版本出现了此问题?

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

请问解压后安装配置那个./sonic 程序在哪啊 解压后目录下都没有./sonic这个命令 也没有sonic这个文件夹

检查清单

是什么版本出现了此问题?

请问解压后安装配置那个./sonic 程序在哪啊 解压后目录下都没有./sonic这个命令 也没有sonic这个文件夹

使用的什么数据库?

Other

使用的哪种方式部署?

Docker

在线站点地址

No response

发生了什么?

请问解压后安装配置那个./sonic 程序在哪啊 解压后目录下都没有./sonic这个命令 也没有sonic这个文件夹

相关日志输出

No response

附加信息

No response

关于主题的事情

你当前使用的版本

0.0.0

描述一下此特性

因为没有寻找到合适的地方沟通,所以冒昧问一下**支持 Halo 的主题么?**还是需要移植过来?

附加信息

No response

linux版本上传图片失败

检查清单

是什么版本出现了此问题?

1.0.7

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

从本地上传图片失败

如下图所示

1

相关日志输出

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"}

附加信息

2

redundant dal.Use calls?

Checklist

What is version of Sonic has the issue?

master

What database are you using?

SQLite3

What is your deployment method?

Executable file

Your site address.

No response

What happened?

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.

image

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.

Relevant log output

No response

Additional information

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

Search by tags not works

Checklist

What is version of Sonic has the issue?

1.0.5

What database are you using?

SQLite3

What is your deployment method?

Executable file

Your site address.

http://yah2er0ne.fun/

What happened?

  1. Click search button
  2. Click the tag
    image
    Also manually type "#TAG" doesn't work, got empty result:
    image

Relevant log output

No response

Additional information

No response

小工具-Markdown文章导入,报错404

检查清单

是什么版本出现了此问题?

v1.0.1

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

小工具-Markdown文章导入的时候,报错404
image-20221111144944054

相关日志输出

No response

附加信息

No response

清理未使用标签 报服务器错误

检查清单

是什么版本出现了此问题?

go1.19.2

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

image-20230114180927856

image-20230114180728672

请求 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

分类下不显示文章名称,预览报错

检查清单

是什么版本出现了此问题?

lastest

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?


相关日志输出

No response

附加信息

No response

Docker部署首页JS资源无法访问

检查清单

是什么版本出现了此问题?

1.0.4

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Docker

在线站点地址

https://www.xbbox.cn

发生了什么?

image
Docker 部署首页访问资源本地访问,导致拿不到对应的js文件

相关日志输出

1

附加信息

1

程序小bug

检查清单

是什么版本出现了此问题?

master

使用的什么数据库?

MySQL 8.x

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

master/config/config.go文件25行
viper.SetConfigName("config.yaml"),
应该为viper.SetConfigName("config“)

相关日志输出

No response

附加信息

No response

Back up files in any directory through directory traversal

Checklist

What is version of Sonic has the issue?

1.0.4

What database are you using?

SQLite3

What is your deployment method?

Executable file

Your site address.

No response

What happened?

Vulnerability Version

1.0.4

Recurring environment

  • Kali Linux
  • Go 1.19.1

Vulnerability Description AND recurrence

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"]

1
2

Relevant log output

No response

Additional information

No response

Do you have any plans to support various languages? & some issue

Your current Sonic version

1.0.3

Describe this feature

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.

Additional information

Screenshot 2023-01-02 at 3 48 10 PM

自定义全局 head添加的内容出现在body里,并且有双引号无法起作用

检查清单

是什么版本出现了此问题?

博客设置

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

自定义全局 head添加的内容出现在body里,并且有双引号无法起作用。使用的是1.0.6版本。

相关日志输出

No response

附加信息

No response

管理员界面评论查询筛选条件不生效

检查清单

是什么版本出现了此问题?

v1.0.3

使用的什么数据库?

MySQL 8.x

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

管理员界面评论界面,查询时筛选条件不生效

相关日志输出

No response

附加信息

No response

500 error

Checklist

What is version of Sonic has the issue?

latest

What database are you using?

SQLite3

What is your deployment method?

Executable file

Your site address.

No response

What happened?

{"status":500,"message":"Internal Server Error","data":null}

Relevant log output

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

Additional information

sqlite driver:
"github.com/glebarez/sqlite" //pure go sqlite driver

Migrate to Hertz

你当前使用的版本

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

当前使用的Halo主题版本过低

你当前使用的版本

数据库:SQLite 3.39.2 运行模式:production 启用主题:Anatole 启动时间:2023-02-13 15:26

描述一下此特性

当前的Halo版本

我看了下默认主题的版本,还有代码里的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"`
}

新版本的格式

https://halo.run/里找到的

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

希望可以支持docker-compose部署

Your current Sonic version

No response

Describe this feature

建议可以增加基于docker化的部署方案,集成mysql到compose中,以便快速部署环境、快速备份数据、切换运行平台等。

Additional information

No response

点击安装时报错

检查清单

是什么版本出现了此问题?

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

建议增加移动客户端

你当前使用的版本

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

分页问题

Checklist

What is version of Sonic has the issue?

latest

What database are you using?

SQLite3

What is your deployment method?

Executable file

Your site address.

No response

What happened?

如果按照分类或者标签筛选后的文章在进行分页切换返回的路径前少了一个 /,导致会在浏览器现有url后再拼接返回的路径会造成404,且如果当前页面是第2页,上一页的href目前直接返回的项目根路径,丢失了路径中的/tag或者/category导致退出了按条件筛选
@hooxuu

Relevant log output

No response

Additional information

No response

The parameter status type is incorrect

检查清单

是什么版本出现了此问题?

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

主题编辑问题

检查清单

是什么版本出现了此问题?

1.02

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

后台主题编辑,第一次选中文件可以显示并编辑保存,以后点击任何文件都不显示内容。
Firefox和Edge均是

相关日志输出

No response

附加信息

No response

点赞不能使用

Discussed in #137

Originally posted by beyondtop February 2, 2023
我想请教下默认主题的点赞,主要是哪个文件控制的?可能是有bug,首次访问可以点击加1,刷新后归0,然后无法再点击。https://xuexi.chat

服务器安装之后css和js提示404

检查清单

是什么版本出现了此问题?

v1.0.3

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Docker

在线站点地址

No response

发生了什么?

image

相关日志输出

No response

附加信息

No response

主题更新后没有正确重新Load模板文件

检查清单

是什么版本出现了此问题?

latest

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

重新Load的时候只加载了被更新的文件,没有加载整个主题文件

相关日志输出

No response

附加信息

No response

日志的显示时区问题

Hi

请问一下日志在admin页面编辑的时候显示的时间是北京时间,服务器时间也改成这个时区了,但是为什么打开博客的日志页面上面显示的就是晚了7个小时的时区呢?
sonic使用的是Docker 1.0.6的版本,主题也是最新的版本。
请问可以如何解决呢?

Thanks

通过Markdown上传图片后,展示路径出错

检查清单

是什么版本出现了此问题?

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

用户管理

你当前使用的版本

1.0.6

描述一下此特性

博客搭建起来后,第一次运行,提示管理员注册。

管理员写文章后,所有人都可以查看文档

如果有新用户想注册,该怎么弄

管理员可以实现对用户的管理吗,比如,新增用户,删除用户等

附加信息

No response

没有官方文档吗?

Your current Sonic version

No response

Describe this feature

没有官方文档吗?

Additional information

No response

搜索页面的标签点击错误

检查清单

是什么版本出现了此问题?

106

使用的什么数据库?

SQLite3

使用的哪种方式部署?

Executable file

在线站点地址

No response

发生了什么?

搜索页面的标签点击错误

QQ截图20221227220615

点击之后:
QQ截图20221227220629

相关日志输出

No response

附加信息

No response

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.