Documentation
¶
Index ¶
- type Generator
- type Handlers
- func (h *Handlers) GetArticleHTML(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetArticleJSON(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetAtomFeed(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) IndexHTML(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ListArticlesHTML(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ListArticlesJSON(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) SearchArticlesJSON(w http.ResponseWriter, r *http.Request)
- type Module
- func (m *Module) Mount(_ context.Context, r platform.Router) error
- func (m *Module) Name() string
- func (m *Module) ScanMarkdownFiles(ctx context.Context) (int, error)
- func (m *Module) SetRepository(repo *storage.Storage)
- func (m *Module) Start(ctx context.Context) error
- func (m *Module) Stop(context.Context) error
- type OverlayFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator generates static HTML files from blog content
func NewGenerator ¶
NewGenerator creates a new Generator instance
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers handles HTTP requests for the blog module
func NewHandlers ¶
NewHandlers creates a new Handlers instance with the given storage
func (*Handlers) GetArticleHTML ¶
func (h *Handlers) GetArticleHTML(w http.ResponseWriter, r *http.Request)
GetArticleHTML returns a single article as HTML
func (*Handlers) GetArticleJSON ¶
func (h *Handlers) GetArticleJSON(w http.ResponseWriter, r *http.Request)
GetArticleJSON returns a single article as JSON
func (*Handlers) GetAtomFeed ¶
func (h *Handlers) GetAtomFeed(w http.ResponseWriter, r *http.Request)
GetAtomFeed returns an Atom XML feed of all articles
func (*Handlers) IndexHTML ¶
func (h *Handlers) IndexHTML(w http.ResponseWriter, r *http.Request)
IndexHTML returns an HTML index page listing blogs
func (*Handlers) ListArticlesHTML ¶
func (h *Handlers) ListArticlesHTML(w http.ResponseWriter, r *http.Request)
ListArticlesHTML returns an HTML list of articles
func (*Handlers) ListArticlesJSON ¶
func (h *Handlers) ListArticlesJSON(w http.ResponseWriter, r *http.Request)
ListArticlesJSON returns a JSON list of all articles
func (*Handlers) SearchArticlesJSON ¶
func (h *Handlers) SearchArticlesJSON(w http.ResponseWriter, r *http.Request)
SearchArticlesJSON performs full-text search on articles
type Module ¶
type Module struct {
platform.UnimplementedModule
// contains filtered or unexported fields
}
Module implements the blog module for the platform
func (*Module) ScanMarkdownFiles ¶
ScanMarkdownFiles scans the data directory for markdown files and indexes them Returns the count of scanned files
func (*Module) SetRepository ¶
SetRepository sets the repository on the module