diff --git a/admin/crud_validation_test.go b/admin/crud_validation_test.go index 7c0cdcd4..7c35bd3c 100644 --- a/admin/crud_validation_test.go +++ b/admin/crud_validation_test.go @@ -5,9 +5,10 @@ import ( "net/http" "testing" - "goblog/admin" - "goblog/auth" - "goblog/blog" + "github.com/goblogplatform/goblog/admin" + "github.com/goblogplatform/goblog/auth" + "github.com/goblogplatform/goblog/blog" + "github.com/goblogplatform/goblog/theme" "github.com/gin-gonic/gin" "github.com/stretchr/testify/mock" @@ -34,9 +35,7 @@ func crudAPI(t *testing.T, isAdmin bool) *gin.Engine { ad := admin.New(db, a, &b, "test") gin.SetMode(gin.TestMode) r := gin.New() - tmpl := template.Must(template.New("").Funcs(template.FuncMap{ - "rawHTML": func(s string) template.HTML { return template.HTML(s) }, - }).ParseGlob("../templates/shared/*.html")) + tmpl := template.Must(template.New("").Funcs(theme.FuncMap()).ParseGlob("../templates/shared/*.html")) template.Must(tmpl.ParseGlob("../themes/default/templates/*.html")) r.SetHTMLTemplate(tmpl) r.POST("/api/v1/pages", ad.CreatePage) diff --git a/admin/login_methods.go b/admin/login_methods.go index fed174f6..d370be49 100644 --- a/admin/login_methods.go +++ b/admin/login_methods.go @@ -10,7 +10,7 @@ import ( "github.com/gin-gonic/gin" - "goblog/datadir" + "github.com/goblogplatform/goblog/datadir" ) // githubCredential matches a GitHub OAuth app's client id ("Ov23li…", diff --git a/admin/login_methods_test.go b/admin/login_methods_test.go index 45eb2b0a..06f2ea00 100644 --- a/admin/login_methods_test.go +++ b/admin/login_methods_test.go @@ -8,9 +8,9 @@ import ( "strings" "testing" - "goblog/admin" - "goblog/blog" - "goblog/datadir" + "github.com/goblogplatform/goblog/admin" + "github.com/goblogplatform/goblog/blog" + "github.com/goblogplatform/goblog/datadir" "github.com/gin-gonic/gin" "github.com/stretchr/testify/mock" diff --git a/admin/settings_api_test.go b/admin/settings_api_test.go index 262462a4..ba0729ea 100644 --- a/admin/settings_api_test.go +++ b/admin/settings_api_test.go @@ -7,10 +7,10 @@ import ( "strings" "testing" - "goblog/admin" - "goblog/auth" - "goblog/blog" - "goblog/plugin" + "github.com/goblogplatform/goblog/admin" + "github.com/goblogplatform/goblog/auth" + "github.com/goblogplatform/goblog/blog" + "github.com/goblogplatform/goblog/plugin" "github.com/gin-gonic/gin" "github.com/stretchr/testify/mock" diff --git a/blog/post_type_test.go b/blog/post_type_test.go index 1c690b43..be49ec54 100644 --- a/blog/post_type_test.go +++ b/blog/post_type_test.go @@ -7,8 +7,9 @@ import ( "strings" "testing" - "goblog/auth" - "goblog/blog" + "github.com/goblogplatform/goblog/auth" + "github.com/goblogplatform/goblog/blog" + "github.com/goblogplatform/goblog/theme" "github.com/gin-gonic/gin" "github.com/stretchr/testify/mock" @@ -37,9 +38,7 @@ func postTypeFixture(t *testing.T, user *auth.BlogUser, isAdmin bool) (*gin.Engi gin.SetMode(gin.TestMode) router := gin.New() - tmpl := template.Must(template.New("").Funcs(template.FuncMap{ - "rawHTML": func(s string) template.HTML { return template.HTML(s) }, - }).ParseGlob("../templates/shared/*.html")) + tmpl := template.Must(template.New("").Funcs(theme.FuncMap()).ParseGlob("../templates/shared/*.html")) template.Must(tmpl.ParseGlob("../themes/default/templates/*.html")) router.SetHTMLTemplate(tmpl) router.NoRoute(b.NoRoute) diff --git a/plugin/posts.go b/plugin/posts.go index 9cf1e8e4..be67c92d 100644 --- a/plugin/posts.go +++ b/plugin/posts.go @@ -4,7 +4,7 @@ import ( "strings" "time" - "goblog/blog" + "github.com/goblogplatform/goblog/blog" ) // Post is a published post as a plugin sees it through the posts_list host diff --git a/plugin/posts_test.go b/plugin/posts_test.go index a33b184c..6f387034 100644 --- a/plugin/posts_test.go +++ b/plugin/posts_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "goblog/blog" - "goblog/plugin" + "github.com/goblogplatform/goblog/blog" + "github.com/goblogplatform/goblog/plugin" "gorm.io/driver/sqlite" "gorm.io/gorm" diff --git a/plugin/wasm/contract.go b/plugin/wasm/contract.go index 4062cfd7..8925f8c7 100644 --- a/plugin/wasm/contract.go +++ b/plugin/wasm/contract.go @@ -4,7 +4,7 @@ import ( "reflect" "strings" - "goblog/plugin" + "github.com/goblogplatform/goblog/plugin" ) // JSON shapes of the host contract (spec §1). Field names are the API: a diff --git a/tools/seed_backlinks_test.go b/tools/seed_backlinks_test.go index 7bd8024e..67bd7dec 100644 --- a/tools/seed_backlinks_test.go +++ b/tools/seed_backlinks_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "goblog/blog" - "goblog/tools" + "github.com/goblogplatform/goblog/blog" + "github.com/goblogplatform/goblog/tools" "gorm.io/driver/sqlite" "gorm.io/gorm" diff --git a/wizard/handlers_test.go b/wizard/handlers_test.go index 524bde57..a2b68396 100644 --- a/wizard/handlers_test.go +++ b/wizard/handlers_test.go @@ -1,7 +1,7 @@ package wizard import ( - "goblog/datadir" + "github.com/goblogplatform/goblog/datadir" "html/template" "io" "net/http"