mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
pass hub version through html and update dependencies
- Changed Vite configuration to replace version during development.
This commit is contained in:
@@ -172,6 +172,7 @@ func (h *Hub) startServer(se *core.ServeEvent) error {
|
||||
basePath := strings.TrimSuffix(parsedURL.Path, "/") + "/"
|
||||
indexFile, _ := fs.ReadFile(site.DistDirFS, "index.html")
|
||||
indexContent := strings.ReplaceAll(string(indexFile), "./", basePath)
|
||||
indexContent = strings.Replace(indexContent, "{{V}}", beszel.Version, 1)
|
||||
// set up static asset serving
|
||||
staticPaths := [2]string{"/static/", "/assets/"}
|
||||
serveStatic := apis.Static(site.DistDirFS, false)
|
||||
|
||||
Reference in New Issue
Block a user