feat: title on pages
This commit is contained in:
1 parent
2b07701762
commit
16e5107185
18 files changed
+251
-36
No files matched your search
@@ -16,6 +16,7 @@ type PageHeader struct {
|
||||
type Page struct {
|
||||
PageHeader
|
||||
Content string
|
||||
Images []Image
|
||||
}
|
||||
|
||||
func (s *Service) GetPages(ctx context.Context) (pages []PageHeader, err error) {
|
||||
@@ -46,7 +47,7 @@ func (s *Service) GetPage(ctx context.Context, uid string) (page Page, err error
|
||||
return
|
||||
}
|
||||
|
||||
html, err := s.getHTML(ctx, p)
|
||||
html, imgs, err := s.getHTML(ctx, p)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -54,6 +55,7 @@ func (s *Service) GetPage(ctx context.Context, uid string) (page Page, err error
|
||||
page = Page{
|
||||
PageHeader: p,
|
||||
Content: string(html),
|
||||
Images: imgs,
|
||||
}
|
||||
return
|
||||
}
|
||||
Reference in new issue
Block a user