Documentation ¶
Index ¶
- Constants
- Variables
- func HugoInternalProcessConfig(ch *CaddyHugo, es *editSession, touchFn func()) (idleshut.Config, error)
- func UploadPage(elemName string) string
- type CaddyHugo
- func (ch *CaddyHugo) Admin() caddyhttp.Handler
- func (ch *CaddyHugo) Auth(r *http.Request) bool
- func (ch *CaddyHugo) AuthorHome() caddyhttp.Handler
- func (ch *CaddyHugo) BasePath() string
- func (ch *CaddyHugo) Build() error
- func (m *CaddyHugo) CaddyModule() caddy.ModuleInfo
- func (ch *CaddyHugo) ClearConfirmed(lowestPending uint64)
- func (ch *CaddyHugo) ConfirmLTime(ltime uint64)
- func (ch *CaddyHugo) Confirming() []uint64
- func (ch *CaddyHugo) DeltaWebsocket(w http.ResponseWriter, r *http.Request) error
- func (ch *CaddyHugo) Edit() caddyhttp.Handler
- func (ch *CaddyHugo) LTime() uint64
- func (ch *CaddyHugo) LowestPendingConfirmation() uint64
- func (ch *CaddyHugo) Match(r *http.Request) bool
- func (ch *CaddyHugo) Message(deltas ...acedoc.Delta) Message
- func (ch *CaddyHugo) NewContent(name, ctype string) (string, error)
- func (ch *CaddyHugo) ObserveLTime(ltime uint64) uint64
- func (m *CaddyHugo) Provision(ctx caddy.Context) error
- func (ch *CaddyHugo) Publish() error
- func (ch *CaddyHugo) ReferencedMedia() map[string]map[page.Page]struct{}
- func (ch *CaddyHugo) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error
- func (ch *CaddyHugo) ServeNewContent(w http.ResponseWriter, r *http.Request) error
- func (ch *CaddyHugo) Setup(dir string) error
- func (ch *CaddyHugo) ShouldApply(ltime uint64) bool
- func (ch *CaddyHugo) TmplData(r *http.Request, docref *editSession) interface{}
- type Content
- type DeltaConn
- type Message
- type Metadata
- type SiteConfig
Constants ¶
const ( IdleWebsocketTimeout = 10 * time.Minute WebsocketFileTicker = 1 * time.Second )
Variables ¶
var AdminPage = frontend.AdminPage()
var AuthorPage = frontend.AuthorPage()
var EditPage = frontend.EditPage()
Functions ¶
func UploadPage ¶
Types ¶
type CaddyHugo ¶
type CaddyHugo struct { ServerType string Site SiteConfig HugoSites *hugolib.HugoSites HugoCfg *deps.DepsCfg Dir string Media *media.MediaSource Comments *comments.Service // contains filtered or unexported fields }
CaddyHugo implements the plugin for a single site
func (*CaddyHugo) AuthorHome ¶
func (*CaddyHugo) BasePath ¶
BasePath returns the directory that the CaddyHugo internal/author pages are under
func (*CaddyHugo) Build ¶
Build rebuilds the cached state of the site. TODO: determine if this republishes
func (*CaddyHugo) CaddyModule ¶
func (m *CaddyHugo) CaddyModule() caddy.ModuleInfo
func (*CaddyHugo) ClearConfirmed ¶
func (*CaddyHugo) ConfirmLTime ¶
ConfirmLTime marks an ltime as something that should be confirmed with clients
func (*CaddyHugo) Confirming ¶
Confirming returns the current list of LTimes that need to be confirmed to clients
func (*CaddyHugo) DeltaWebsocket ¶
func (*CaddyHugo) LowestPendingConfirmation ¶
LowestPendingConfirmation identifies the lowest LTime that needs to be confirmed to clients
func (*CaddyHugo) NewContent ¶
NewContent initializes new content with the name (title) and content type. If ctype is empty string, "default" is used. The return value is the filename, which may be modified from the title and includes the content type if other than default, but does not include the full directory relative to the site.
func (*CaddyHugo) ObserveLTime ¶
func (*CaddyHugo) ReferencedMedia ¶
func (*CaddyHugo) ServeNewContent ¶
func (*CaddyHugo) ShouldApply ¶
type SiteConfig ¶
func (*SiteConfig) UnmarshalCaddyfile ¶
func (s *SiteConfig) UnmarshalCaddyfile(d *caddyfile.Dispenser) error
UnmarshalCaddyfile implements caddyfile.Unmarshaler.