Documentation
¶
Index ¶
- type CachedDoc
- type CachedIndex
- type DocServer
- func (ds *DocServer) GetIndexDocument() (*markdown.Document, error)
- func (ds *DocServer) GetIndexJSONLD() ([]byte, error)
- func (ds *DocServer) HandleDoc(w http.ResponseWriter, r *http.Request, slug string)
- func (ds *DocServer) HandleDocJSONLD(w http.ResponseWriter, r *http.Request, slug string)
- func (ds *DocServer) HandleDocList(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleIndexJSONLD(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleRSSList(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleSearch(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleSiteRSS(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleSitemap(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleTagPage(w http.ResponseWriter, r *http.Request, tag string)
- func (ds *DocServer) HandleTagsPage(w http.ResponseWriter, r *http.Request)
- func (ds *DocServer) HandleUserRSS(w http.ResponseWriter, r *http.Request, userName string)
- type DocumentCache
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CachedIndex ¶
CachedIndex represents the cached document index
type DocServer ¶
type DocServer struct {
// contains filtered or unexported fields
}
DocServer handles markdown document requests
func NewDocServer ¶
NewDocServer creates a new document server
func (*DocServer) GetIndexDocument ¶ added in v0.6.0
GetIndexDocument returns the parsed index.md document, or nil if not found
func (*DocServer) GetIndexJSONLD ¶
GetIndexJSONLD returns the JSON-LD index data without setting HTTP headers This is used for embedding JSON-LD in HTML pages
func (*DocServer) HandleDocJSONLD ¶
HandleDocJSONLD handles GET /posts/:slug.jsonld - return JSON-LD only
func (*DocServer) HandleDocList ¶
func (ds *DocServer) HandleDocList(w http.ResponseWriter, r *http.Request)
HandleDocList handles GET /posts - list all posts
func (*DocServer) HandleIndexJSONLD ¶
func (ds *DocServer) HandleIndexJSONLD(w http.ResponseWriter, r *http.Request)
HandleIndexJSONLD handles GET /posts/index.jsonld - return collection index
func (*DocServer) HandleRSSList ¶
func (ds *DocServer) HandleRSSList(w http.ResponseWriter, r *http.Request)
HandleRSSList handles GET /rss - return HTML page listing all available RSS feeds
func (*DocServer) HandleSearch ¶ added in v0.7.0
func (ds *DocServer) HandleSearch(w http.ResponseWriter, r *http.Request)
HandleSearch handles GET /search - client-side search page
func (*DocServer) HandleSiteRSS ¶
func (ds *DocServer) HandleSiteRSS(w http.ResponseWriter, r *http.Request)
HandleSiteRSS handles GET /posts.rss - return RSS feed for all blog posts
func (*DocServer) HandleSitemap ¶ added in v0.7.0
func (ds *DocServer) HandleSitemap(w http.ResponseWriter, r *http.Request)
HandleSitemap handles GET /sitemap.xml - return XML sitemap for all pages
func (*DocServer) HandleTagPage ¶ added in v0.5.0
HandleTagPage handles GET /tags/{tag} - show posts with a specific tag
func (*DocServer) HandleTagsPage ¶ added in v0.5.0
func (ds *DocServer) HandleTagsPage(w http.ResponseWriter, r *http.Request)
HandleTagsPage handles GET /tags - display word cloud of all tags
func (*DocServer) HandleUserRSS ¶
HandleUserRSS handles GET /u/{user}/posts.rss - return RSS feed for user's blog posts
type DocumentCache ¶
type DocumentCache struct {
// contains filtered or unexported fields
}
DocumentCache caches rendered documents