youbbs
youbbs
1752 27 2

改变一个主题比做一个全新的都难

前段时间发现一个挺好的主题,看 css 也挺简单,没用框架。

改变主题

问题是要在现有的数据结构、页面内容下做改变,太难了,比全新写程序+爬前端都难。

而且会导致强迫症发作,不忍心再去看代码。

2

See Also

Nearby


Discussion (27)

waiducom
waiducom 2022-06-08 17:19

刚刚在玩手机才发现主题变了,哈哈 一种新的感觉。

0
waiducom
waiducom 2022-06-08 17:20

为什么连URL也变了?难到重写程序了?

1
youbbs
youbbs 2022-06-08 19:32

在原来基础上增添一些数据、功能。

2
waiducom
waiducom 2022-06-08 19:43

@youbbs 改变URL 应该会影响seo吧?

1
youbbs
youbbs 2022-06-08 19:46

@waiducom 原地址 301 转向到新地址,headcanonical 内容为新地址。

1
waiducom
waiducom 2022-06-09 08:12

@youbbs nice

0
gem
gem 2022-06-09 11:16

注册一个账号,发现换新的主题了

0
gem
gem 2022-06-09 11:19

@gem 给自己留个言

0
mywander
mywander 2022-06-15 09:32

改版了吗

0
medivh
medivh 2022-06-17 00:43

大佬,这个改变跨度挺大啊。

0
youbbs
youbbs 2022-06-24 22:10

@medivh 论坛已没落,改个博客主题自己玩。

1
小萌娘
小萌娘 2022-06-25 06:23

好久没来了 UI变化好大呀

0
waiducom
waiducom 2022-06-26 14:51

@ eg008 现在不能发帖了吗?想问一下怎样查看goyoubbs的运行日记呢?最近发现goyoubbs不能自动备份数据了,快一个星期的数据没有备份了!谢谢

0
youbbs
youbbs 2022-06-26 19:40

@waiducom 备份成功会在终端输出如下内容,参见源码

log.Println("databackup done", ic, ic2, time.Now().Sub(t1))
0
waiducom
waiducom 2022-06-26 21:58

@youbbs 嗯。守护进程使用的是supervisor,开了supervisor日记也没有记录。

0
youbbs
youbbs 2022-06-26 22:22

@waiducom 查看 supervisor 里配置的 log file

0
waiducom
waiducom 2022-06-27 11:26
        /root/go/pkg/mod/github.com/valyala/fasthttp@v1.30.0/header.go:1586 +0x1e
created by github.com/valyala/fasthttp.updateServerDate
        /root/go/pkg/mod/github.com/valyala/fasthttp@v1.30.0/header.go:1584 +0x25
2022/06/27 05:29:00 UploadDir from "upload"
2022/06/27 05:29:00 Serving sdb from directory "localdb"
2022/06/27 05:29:00 TCP address to listen to ":8080"
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x4631ff]


goroutine 1 [chan receive, 9 minutes]:
main.main()
        /home/wwwroot/domain/main.go:143 +0x751

goroutine 7 [select]:
go.opencensus.io/stats/view.(*worker).start(0xc000436000)
        /root/go/pkg/mod/go.opencensus.io@v0.22.5/stats/view/worker.go:276 +0xad
created by go.opencensus.io/stats/view.init.0
        /root/go/pkg/mod/go.opencensus.io@v0.22.5/stats/view/worker.go:34 +0x8d

ser@172-0233 /home/wwwroot # 
0
youbbs
youbbs 2022-06-27 21:09

好像是经常抛错导致进程重启

默认是 :8080,换个端口试试,如 :8082

./goyoubbs -addr=":8082"
0
waiducom
waiducom 2022-06-27 21:59

@youbbs 好的,我今晚再测试看看。谢谢!谢谢!

0
waiducom
waiducom 2022-06-28 08:54

通过昨晚的日记记录还是不行

2022/06/28 08:48:10 UploadDir from "upload"
2022/06/28 08:48:10 Serving sdb from directory "localdb"
2022/06/28 08:48:10 TCP address to listen to ":8080"
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x4631ff]

goroutine 30 [running]:
runtime.throw({0xf6ca6a?, 0x0?})
        /usr/local/go/src/runtime/panic.go:992 +0x71 fp=0xc0010c7308 sp=0xc0010c72d8 pc=0x435d31
runtime.sigpanic()
        /usr/local/go/src/runtime/signal_unix.go:825 +0x305 fp=0xc0010c7358 sp=0xc0010c7308 pc=0x44b3a5
aeshashbody()
        /usr/local/go/src/runtime/asm_amd64.s:1343 +0x39f fp=0xc0010c7360 sp=0xc0010c7358 pc=0x4631ff
runtime.mapiternext(0xc00057b040)
        /usr/local/go/src/runtime/map.go:934 +0x2cb fp=0xc0010c73d0 sp=0xc0010c7360 pc=0x41172b
runtime.mapiterinit(0xc0001f4800?, 0xc00070f2c0?, 0x0?)
        /usr/local/go/src/runtime/map.go:861 +0x228 fp=0xc0010c73f0 sp=0xc0010c73d0 pc=0x411408
reflect.mapiterinit(0x40f2a7?, 0xc0010c7478?, 0x45c8c5?)
        /usr/local/go/src/runtime/map.go:1373 +0x19 fp=0xc0010c7418 sp=0xc0010c73f0 pc=0x45fd19
github.com/modern-go/reflect2.(*UnsafeMapType).UnsafeIterate(...)
        /root/go/pkg/mod/github.com/modern-go/reflect2@v0.0.0-20180701023420-4b7aa43c6742/unsafe_map.go:112
github.com/json-iterator/go.(*sortKeysMapEncoder).Encode(0xc00070f1d0, 0xc00070ed18, 0xc00054f080)
        /root/go/pkg/mod/github.com/json-iterator/go@v1.1.10/reflect_map.go:291 +0x225 fp=0xc0010c7588 sp=0xc0010c7418 pc=0xba2e25
github.com/json-iterator/go.(*structFieldEncoder).Encode(0xc00070f260, 0xdd2aee?, 0xc00054f080)
        /root/go/pkg/mod/github.com/json-iterator/go@v1.1.10/reflect_struct_encoder.go:110 +0x56 fp=0xc0010c7600 sp=0xc0010c7588 pc=0xbb0576
github.com/json-iterator/go.(*structEncoder).Encode(0xc00070f2c0, 0x14cec98?, 0xc00054f080)
        /root/go/pkg/mod/github.com/json-iterator/go@v1.1.10/reflect_struct_encoder.go:158 +0x765 fp=0xc0010c76e8 sp=0xc0010c7600 pc=0xbb0f85
github.com/json-iterator/go.(*Stream).WriteVal(0xc00054f080, {0xed3600, 0xc00070ecf0})
        /root/go/pkg/mod/github.com/json-iterator/go@v1.1.10/reflect.go:98 +0x158 fp=0xc0010c7758 sp=0xc0010c76e8 pc=0xb9a5f8
github.com/json-iterator/go.(*Encoder).Encode(0xc000a8b288, {0xed3600?, 0xc00070ecf0?})
        /root/go/pkg/mod/github.com/json-iterator/go@v1.1.10/adapter.go:127 +0x32 fp=0xc0010c77a8 sp=0xc0010c7758 pc=0xb863b2
goyoubbs/controller.(*BaseHandler).GetLinkCount(0xc0005241d0, 0xc000441600)
        /var/www/vpslala/controller/get_link_count.go:100 +0x7a7 fp=0xc0010c7b50 sp=0xc0010c77a8 pc=0xc6f867
goyoubbs/controller.(*BaseHandler).GetLinkCount-fm(0xc00050eff0?)
        <autogenerated>:1 +0x2c fp=0xc0010c7b70 sp=0xc0010c7b50 pc=0xc836ec
github.com/fasthttp/router.(*Router).Handler(0xc0003be230, 0xc000441600)
        /root/go/pkg/mod/github.com/fasthttp/router@v1.3.9/router.go:414 +0x46a fp=0xc0010c7c20 sp=0xc0010c7b70 pc=0x84dd4a
github.com/fasthttp/router.(*Router).Handler-fm(0xc000441600?)
        <autogenerated>:1 +0x2c fp=0xc0010c7c40 sp=0xc0010c7c20 pc=0xdd148c
github.com/valyala/fasthttp.(*Server).serveConn(0xc000127a00, {0x14cd088?, 0xc000a8aee0})
        /root/go/pkg/mod/github.com/valyala/fasthttp@v1.30.0/server.go:2266 +0x12e7 fp=0xc0010c7ec8 sp=0xc0010c7c40 pc=0x787227
github.com/valyala/fasthttp.(*Server).serveConn-fm({0x14cd088?, 0xc000a8aee0?})
        <autogenerated>:1 +0x39 fp=0xc0010c7ef0 sp=0xc0010c7ec8 pc=0x796559
github.com/valyala/fasthttp.(*workerPool).workerFunc(0xc0002efe00, 0xc00046e6a0)
        /root/go/pkg/mod/github.com/valyala/fasthttp@v1.30.0/workerpool.go:223 +0xa9 fp=0xc0010c7fa0 sp=0xc0010c7ef0 pc=0x792ac9
github.com/valyala/fasthttp.(*workerPool).getCh.func1()
        /root/go/pkg/mod/github.com/valyala/fasthttp@v1.30.0/workerpool.go:195 +0x38 fp=0xc0010c7fe0 sp=0xc0010c7fa0 pc=0x792858
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1571 +0x1 fp=0xc0010c7fe8 sp=0xc0010c7fe0 pc=0x465e01
created by github.com/valyala/fasthttp.(*workerPool).getCh
        /root/go/pkg/mod/github.com/valyala/fasthttp@v1.30.0/workerpool.go:194 +0x1b0
0
waiducom
waiducom 2022-06-28 08:55

@youbbs 端口号,我已经修改过的,不过发出来的不是真是的端口号。

0
youbbs
youbbs 2022-06-28 10:11

@waiducom 数据库、静态文件备份好,换上 github 上的代码,重新编译试试。

0
waiducom
waiducom 2022-06-28 10:43

@youbbs. 好的 ,我再试试?有什么命令可以直接执行备份数据的吗?这样就不用等程序自动备份数据库查看日记了?谢谢!

0
waiducom
waiducom 2022-06-28 10:49

@youbbs 现在github仓库代码是不是2.0版本的?不是很like2.0的变化 有点不习惯哈!

0
youbbs
youbbs 2022-06-28 11:28

管理员登录,设置 - 打包下载当前数据 | 打包下载图片。或者停止进程后,直接复制 数据库文件夹、静态文件夹、上传图片的文件夹。这种替换主程序的方法是为寻找哪地方出问题及原因。

0
waiducom
waiducom 2022-06-28 15:03

@youbbs 嗯 好的 备份数据我知道的,目前已经重新拉起了源代码,在其它目录编译好主程序,然后替换掉了线上的程序,

0
waiducom
waiducom 2022-06-29 11:43

@youbbs 可以自动备份数据库了,谢谢您!

0
Login Topics