mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-09-19 04:06:18 +08:00
feat(setting): add site version information (#859)
* feat(setting): add site version information * feat(conf): update conf.WebVersion to rolling * fix(static): update condition to check conf.Version instead of conf.WebVersion * fix(build.sh): use rolling release for web frontend in dev and beta builds * chore(build.sh): update GitAuthor to The OpenList Projects Contributors * fix(static): update condition to check conf.WebVersion
This commit is contained in:
@ -43,9 +43,9 @@ func replaceStrings(content string, replacements map[string]string) string {
|
||||
|
||||
func initIndex(siteConfig SiteConfig) {
|
||||
utils.Log.Debug("Initializing index.html...")
|
||||
// dist_dir is empty and cdn is not empty add web_version is empty or beta or dev
|
||||
if conf.Conf.DistDir == "" && conf.Conf.Cdn != "" && (conf.WebVersion == "" || conf.WebVersion == "beta" || conf.WebVersion == "dev") {
|
||||
utils.Log.Infof("Fetching index.html from CDN: %s/index.html...", conf.Conf.Cdn)
|
||||
// dist_dir is empty and cdn is not empty, and web_version is empty or beta or dev or rolling
|
||||
if conf.Conf.DistDir == "" && conf.Conf.Cdn != "" && (conf.WebVersion == "" || conf.WebVersion == "beta" || conf.WebVersion == "dev" || conf.WebVersion == "rolling") {
|
||||
utils.Log.Infof("Fetching index.html from CDN: %s/index.html...", siteConfig.Cdn)
|
||||
resp, err := base.RestyClient.R().
|
||||
SetHeader("Accept", "text/html").
|
||||
Get(fmt.Sprintf("%s/index.html", siteConfig.Cdn))
|
||||
|
Reference in New Issue
Block a user