diff --git a/assets/config.ini b/assets/config.ini index b6d3c5e..f60e60c 100644 --- a/assets/config.ini +++ b/assets/config.ini @@ -9,12 +9,9 @@ HeaderLinksHypha = header-links [Network] HTTPPort = 8080 URL = https://wiki -GeminiCertificatePath = /home/wiki/gemcerts [Authorization] UseFixedAuth = true -FixedAuthCredentialsPath = /home/wiki/mycocredentials.json UseRegistration = true -RegistrationCredentialsPath = /home/wiki/mycoregistration.json LimitRegistration = 10 diff --git a/assets/devconfig.ini b/assets/devconfig.ini index 4a26789..08435a1 100644 --- a/assets/devconfig.ini +++ b/assets/devconfig.ini @@ -12,8 +12,6 @@ URL = http://localhost:1737 [Authorization] UseFixedAuth = true -FixedAuthCredentialsPath = mycocredentials.json UseRegistration = true -RegistrationCredentialsPath = mycoregistration.json LimitRegistration = 3 diff --git a/cfg/config.go b/cfg/config.go index 602312f..9011955 100644 --- a/cfg/config.go +++ b/cfg/config.go @@ -30,9 +30,9 @@ var ( UseRegistration bool LimitRegistration int - OmnipresentScripts []string - ViewScripts []string - EditScripts []string + CommonScripts []string + ViewScripts []string + EditScripts []string ) // WikiDir is a full path to the wiki storage directory, which also must be a @@ -68,8 +68,8 @@ type Network struct { // CustomScripts is a section with paths to JavaScript files that are loaded on // specified pages. type CustomScripts struct { - // OmnipresentScripts: everywhere... - OmnipresentScripts []string `delim:"," comment:"These scripts are loaded from anywhere."` + // CommonScripts: everywhere... + CommonScripts []string `delim:"," comment:"These scripts are loaded from anywhere."` // ViewScripts: /hypha, /rev ViewScripts []string `delim:"," comment:"These scripts are only loaded on view pages."` // Edit: /edit @@ -106,9 +106,9 @@ func ReadConfigFile(path string) error { LimitRegistration: 0, }, CustomScripts: CustomScripts{ - OmnipresentScripts: []string{}, - ViewScripts: []string{}, - EditScripts: []string{}, + CommonScripts: []string{}, + ViewScripts: []string{}, + EditScripts: []string{}, }, } @@ -167,7 +167,7 @@ func ReadConfigFile(path string) error { UseFixedAuth = cfg.UseFixedAuth UseRegistration = cfg.UseRegistration LimitRegistration = int(cfg.LimitRegistration) - OmnipresentScripts = cfg.OmnipresentScripts + CommonScripts = cfg.CommonScripts ViewScripts = cfg.ViewScripts EditScripts = cfg.EditScripts diff --git a/views/stuff.qtpl b/views/stuff.qtpl index bdb37d1..0d7e74d 100644 --- a/views/stuff.qtpl +++ b/views/stuff.qtpl @@ -39,7 +39,7 @@
- {%= omnipresentScripts() %} + {%= CommonScripts() %}