summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-06-03 20:43:32 -0400
committerBen Morrison <ben@gbmor.dev>2019-06-03 20:43:32 -0400
commite988045d87f1a413daca3affb8bb381f1eb9d297 (patch)
tree70def001466ebc78c2bb281250f5bb129f57aa84
parent44ade3d1fed0f02f174a659f93b0075f67834352 (diff)
downloadgetwtxt-0.2.0.tar.gz
adding version to index template v0.2.0
-rw-r--r--assets/tmpl/index.html4
-rw-r--r--init.go1
-rw-r--r--types.go1
3 files changed, 4 insertions, 2 deletions
diff --git a/assets/tmpl/index.html b/assets/tmpl/index.html
index 15856f7..509107b 100644
--- a/assets/tmpl/index.html
+++ b/assets/tmpl/index.html
@@ -3,7 +3,7 @@
 <head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <meta name="application-name" content="getwtxt">
+  <meta name="application-name" content="getwtxt {{.Vers}}">
   <link rel="stylesheet" type="text/css" href="/css">
   <title>{{.Name}} - twtxt Registry</title>
 </head>
@@ -34,7 +34,7 @@
 /api/plain/mentions
 /api/plain/tweets
 /api/plain/tags</code></pre>
-      <p>All queries accept <code>?page=N</code> as a parameter, returning sets of 20 results. 
+      <p>All queries accept <code>?page=N</code> as a parameter, returning groups of 20 results. 
       This may be omitted for the first page of results.</p>
       <p>Query by user:</p>
         <pre><code>$ curl '{{.URL}}/api/plain/users?q=foo'
diff --git a/init.go b/init.go
index d3881dc..eacbea4 100644
--- a/init.go
+++ b/init.go
@@ -156,6 +156,7 @@ func initConfig() {
 	confObj.LastPush = time.Now()
 	confObj.Version = getwtxt
 
+	confObj.Instance.Vers = getwtxt
 	confObj.Instance.Name = viper.GetString("Instance.SiteName")
 	confObj.Instance.URL = viper.GetString("Instance.URL")
 	confObj.Instance.Owner = viper.GetString("Instance.OwnerName")
diff --git a/types.go b/types.go
index 5032c5a..16f3c55 100644
--- a/types.go
+++ b/types.go
@@ -27,6 +27,7 @@ type Configuration struct {
 
 // Instance refers to this specific instance of getwtxt
 type Instance struct {
+	Vers  string `json:"-"`
 	Name  string `json:"Instance.SiteName"`
 	URL   string `json:"Instance.URL"`
 	Owner string `json:"Instance.OwnerName"`