From f3e990bc50bb47d4c1efbc26ff2e3e1295b651b6 Mon Sep 17 00:00:00 2001 From: iBakuman <67883044+iBakuman@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:21:53 +0800 Subject: [PATCH 1/2] comment out replace statement in go.mod file. --- go.mod | 6 +++--- go.sum | 4 ++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 02abd70..b80056f 100644 --- a/go.mod +++ b/go.mod @@ -25,7 +25,7 @@ require ( ) require ( - cloud.google.com/go v0.67.0 // indirectj + cloud.google.com/go v0.67.0 // indirect github.com/NYTimes/gziphandler v1.1.1 // indirect github.com/aymerick/douceur v0.2.0 // indirect github.com/boombuler/barcode v1.0.1 // indirect @@ -91,8 +91,8 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace github.com/qor5/web => ../web +//replace github.com/qor5/web => ../web -replace github.com/qor5/ui => ../ui +//replace github.com/qor5/ui => ../ui //replace github.com/qor5/admin => ../admin diff --git a/go.sum b/go.sum index 8a22119..207ccce 100644 --- a/go.sum +++ b/go.sum @@ -237,6 +237,10 @@ github.com/qor/oss v0.0.0-20230717083721-c04686f83630 h1:CRi4xF7B8aGX/y48NCjarNd github.com/qor/oss v0.0.0-20230717083721-c04686f83630/go.mod h1:FDxJAVwmZ1j8ITcKJExFlzkTYuUor1dBKZgNVWqEqlM= github.com/qor5/admin v0.0.0-20231009020927-485bb3c7c83b h1:zOGIeZCo1kV2UVojeJxfHF7g6nxOeKhe8ZQj+284ohg= github.com/qor5/admin v0.0.0-20231009020927-485bb3c7c83b/go.mod h1:OukkFSjsJaN0FKHBCsZOy/5Mzo/eR8sJJbm8w85Vf4g= +github.com/qor5/ui v1.0.1-0.20230913083355-743825ff29b1 h1:6ZIyg13zG0ki2yE2XcFN20RkwCMUjIJkYHCGIIqrq5c= +github.com/qor5/ui v1.0.1-0.20230913083355-743825ff29b1/go.mod h1:bgBqjIytHRdfTsiZea8df/ltAcyQyuHiLbecgo8Iwgw= +github.com/qor5/web v1.3.0 h1:nz/MP1TJ/ffGA6FgWXJ1ljPZDfd3RQSTHz/4ZrzKqX0= +github.com/qor5/web v1.3.0/go.mod h1:4VXydGmy5Uwz8rEeKjcmCetciJo8TpU0mnN7Ca5kMR0= github.com/qor5/x v1.2.1-0.20230907054212-50b1a850acf6 h1:GyPeYULwjUPGR6fT/lZicJ8dkoKL5cu/hRNefxX+V7g= github.com/qor5/x v1.2.1-0.20230907054212-50b1a850acf6/go.mod h1:Zfy7B3X5DnQSud0HTV4h/ih5TTQgaT2NWwuSIRGLdcM= github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro= From d2a89a65b98b1f4784756efeaea85a7689e40fbb Mon Sep 17 00:00:00 2001 From: iBakuman <67883044+iBakuman@users.noreply.github.com> Date: Mon, 9 Oct 2023 14:40:21 +0800 Subject: [PATCH 2/2] fixed website-template missing parameters. --- cmd/qor5/website-template/admin/config.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/cmd/qor5/website-template/admin/config.go b/cmd/qor5/website-template/admin/config.go index 6b7c959..3cae88b 100644 --- a/cmd/qor5/website-template/admin/config.go +++ b/cmd/qor5/website-template/admin/config.go @@ -1,6 +1,7 @@ package admin import ( + "github.com/qor5/admin/seo" "net/http" "github.com/qor/oss/filesystem" @@ -90,14 +91,16 @@ func newPB() Config { l10nBuilder := l10n.New() pageBuilder := example.ConfigPageBuilder(db, "/admin/page_builder", ``, b.I18n()) - pm := pageBuilder.Configure(b, db, l10nBuilder, ab) + storage := filesystem.New(PublishDir) + publisher := publish.New(db, storage).WithPageBuilder(pageBuilder) + + seoCollection := seo.NewCollection() + pm := pageBuilder.Configure(b, db, l10nBuilder, ab, publisher, seoCollection) tm := pageBuilder.ConfigTemplate(b, db) - cm := pageBuilder.ConfigCategory(b, db) + cm := pageBuilder.ConfigCategory(b, db, l10nBuilder) ab.RegisterModels(pm, tm, cm) - storage := filesystem.New(PublishDir) - publisher := publish.New(db, storage).WithPageBuilder(pageBuilder) publish_view.Configure(b, db, ab, publisher, pm) l10nBuilder.