mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-15 20:44:01 +02:00
url_path => urlPath
This commit is contained in:
@@ -45,8 +45,8 @@ func ForceRefresh() {
|
|||||||
|
|
||||||
func RefreshPath(s string) {
|
func RefreshPath(s string) {
|
||||||
// Tell livereload a file has changed - will force a hard refresh if not CSS or an image
|
// Tell livereload a file has changed - will force a hard refresh if not CSS or an image
|
||||||
url_path := strings.Replace(s, "\\", "/", -1) // If path has backslashes on Windows, make path work for URL
|
urlPath := strings.Replace(s, "\\", "/", -1) // If path has backslashes on Windows, make path work for URL
|
||||||
wsHub.broadcast <- []byte(`{"command":"reload","path":"` + url_path + "\"" + `,"originalPath":"","liveCSS":true,"liveImg":true}`)
|
wsHub.broadcast <- []byte(`{"command":"reload","path":"` + urlPath + "\"" + `,"originalPath":"","liveCSS":true,"liveImg":true}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
func ServeJS(w http.ResponseWriter, r *http.Request) {
|
func ServeJS(w http.ResponseWriter, r *http.Request) {
|
||||||
|
Reference in New Issue
Block a user