feat: SEO backend data (1/4)

This commit is contained in:
Florian Sylvain committed 2026-10-15 19:30:29 +02:00
1 parent cb1410f0b0
commit 0eb46b0d74
90 files changed
+6094 -350

No files matched your search

@@ -38,10 +38,36 @@ type Filters struct {
Sort Sort
}
type Nullable[T any] struct {
Set bool
Value *T
}
type Update struct {
Body *string
SiteID *uint32
AuthorIDs *[]uint32
Body *string
SiteID *uint32
AuthorIDs *[]uint32
Slug *string
Excerpt *string
SEOTitle *string
SEODescription *string
CoverImageID Nullable[uint32]
CoverImageAlt *string
SocialTitle *string
SocialDescription *string
SocialImageID Nullable[uint32]
CanonicalURL *string
Noindex *bool
SEODismissed *[]string
}
type ImageReferences struct {
Cover []uint32
Social []uint32
}
func (r ImageReferences) Empty() bool {
return len(r.Cover) == 0 && len(r.Social) == 0
}
type Counts struct {
@@ -68,4 +94,9 @@ type Repository interface {
UpdateIsOnline(id uint32, isOnline bool) (Article, error)
Delete(id uint32) error
FindByBodyContaining(filename string) ([]Article, error)
FindByImage(imageID uint32) ([]Article, error)
SlugTaken(siteID uint32, slug string, exceptID uint32) (bool, error)
ClearImage(imageID uint32) (ImageReferences, error)
RestoreImage(references ImageReferences, imageID uint32) error
RepointImage(fromImageIDs []uint32, toImageID uint32) ([]uint32, error)
}