This commit is contained in:
Anya Tokugawa committed 2026-05-19 21:30:42 +09:00
commit fa6a4c650f
93 files changed
+6555

No files matched your search

+43
View File
@@ -0,0 +1,43 @@
package service
import (
"html/template"
"pageswiki/internal/render"
"pageswiki/internal/store"
)
type Breadcrumb struct {
Name string
Path string
}
type PageView struct {
Path string
Body string
HTML template.HTML
Tags []string
Breadcrumbs []Breadcrumb
}
type PageService struct {
Store *store.Store
}
func NewPageService(
st *store.Store,
) *PageService {
return &PageService{
Store: st,
}
}
func (s *PageService) RenderHTML(
markdown string,
) template.HTML {
return render.SafeHTML(
render.Markdown(markdown),
)
}