Make version part of config

This commit is contained in:
2024-10-27 13:58:19 +01:00
parent 03425fc2c6
commit 3b4e1e01d2
9 changed files with 84 additions and 32 deletions

View File

@ -18,7 +18,7 @@ func GenerateAtomFeed(c *Config, db *DB) (*string, error) {
feed.Generator = atom.NewGenerator("cpolis")
feed.Generator.URI = "https://git.streifling.com/jason/cpolis"
feed.Generator.Version = "0.13"
feed.Generator.Version = c.Version
articles, err := db.GetCertainArticles("published", true)
if err != nil {

View File

@ -27,6 +27,7 @@ type Config struct {
PicsDir string
Port string
Title string
Version string
WebDir string
MaxImgHeight int
MaxImgWidth int
@ -47,6 +48,7 @@ func newConfig() *Config {
PDFDir: "/var/www/cpolis/pdfs",
PicsDir: "/var/www/cpolis/pics",
Port: ":8080",
Version: "v0.13.0",
WebDir: "/var/www/cpolis/web",
}
}