package livereload
import "github.com/gohugoio/hugo/livereload"
Index ¶
- func ForceRefresh()
- func Handler(w http.ResponseWriter, r *http.Request)
- func Initialize()
- func NavigateToPathForPort(path string, port int)
- func RefreshPath(s string)
- func ServeJS(w http.ResponseWriter, r *http.Request)
Functions ¶
func ForceRefresh ¶
func ForceRefresh()
ForceRefresh tells livereload to force a hard refresh.
func Handler ¶
func Handler(w http.ResponseWriter, r *http.Request)
Handler is a HandlerFunc handling the livereload Websocket interaction.
func Initialize ¶
func Initialize()
Initialize starts the Websocket Hub handling live reloads.
func NavigateToPathForPort ¶
NavigateToPathForPort is similar to NavigateToPath but will also set window.location.port to the given port value.
func RefreshPath ¶
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 ¶
func ServeJS(w http.ResponseWriter, r *http.Request)
ServeJS serves the livereload.js who's reference is injected into the page.
Source Files ¶
connection.go hub.go livereload.go
Directories ¶
Path | Synopsis |
---|---|
livereload/gen |
- Version
- v0.144.2 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 10 packages
- Last checked
- 13 hours ago –
Tools for package owners.