hugo: github.com/spf13/hugo/livereload Index | Files

package livereload

import "github.com/spf13/hugo/livereload"

Index

Package Files

connection.go hub.go livereload.go

func ForceRefresh Uses

func ForceRefresh()

ForceRefresh tells livereload to force a hard refresh.

func Handler Uses

func Handler(w http.ResponseWriter, r *http.Request)

Handler is a HandlerFunc handling the livereload Websocket interaction.

func Initialize Uses

func Initialize()

Initialize starts the Websocket Hub handling live reloads.

func RefreshPath Uses

func RefreshPath(s string)

RefreshPath tells livereload to refresh only the given path. If that path points to a CSS stylesheet or an image, only the changes will be updated in the browser, not the entire page.

func ServeJS Uses

func ServeJS(w http.ResponseWriter, r *http.Request)

ServeJS serves the liverreload.js who's reference is injected into the page.

Package livereload imports 5 packages (graph) and is imported by 76 packages. Updated 2017-04-30. Refresh now. Tools for package owners.