cerrado @ 10925e006bf43edc79331fbe601e09a28c43df2b

fix: Reduce some redirects
diff --git a/pkg/handler/router.go b/pkg/handler/router.go
index 3da812feb835f6d0e5ceed41bb688d45f34baae0..c8f89840effc9263911f7afc73b02722436b36f9 100644
--- a/pkg/handler/router.go
+++ b/pkg/handler/router.go
@@ -36,11 +36,11 @@ 	mux.AddMiddleware(ext.Log)
 
 	mux.HandleFunc("/static/{file}", staticHandler)
 	mux.HandleFunc("/{name}/about/{$}", gitHandler.About)
-	mux.HandleFunc("/{name}", gitHandler.Summary)
+	mux.HandleFunc("/{name}/", gitHandler.Summary)
 	mux.HandleFunc("/{name}/refs/{$}", gitHandler.Refs)
 	mux.HandleFunc("/{name}/tree/{ref}/{rest...}", gitHandler.Tree)
 	mux.HandleFunc("/{name}/blob/{ref}/{rest...}", gitHandler.Blob)
-	mux.HandleFunc("/{name}/log/{ref}", gitHandler.Log)
+	mux.HandleFunc("/{name}/log/{ref}/", gitHandler.Log)
 	mux.HandleFunc("/config", configHandler)
 	mux.HandleFunc("/about", aboutHandler.About)
 	mux.HandleFunc("/", gitHandler.List)
diff --git a/templates/gititemrefs.qtpl b/templates/gititemrefs.qtpl
index 09d7446a2dfa524db36d016a9ffcffafc57d504b..ff1561b7626970689ef318510c4610dbf20d5623 100644
--- a/templates/gititemrefs.qtpl
+++ b/templates/gititemrefs.qtpl
@@ -21,8 +21,8 @@            {%s t.Name().Short() %}
           </div>
           <div class="col-8">
             <div class="float-end">
-              <a href="/{%s name %}/tree/{%s t.Name().Short() %}">tree</a>
-              <a href="/{%s name %}/log/{%s t.Name().Short() %}">log</a>
+              <a href="/{%s name %}/tree/{%s t.Name().Short() %}/">tree</a>
+              <a href="/{%s name %}/log/{%s t.Name().Short() %}/">log</a>
             </div>
           </div>
       </div>
@@ -41,8 +41,8 @@            {%s b.Name().Short() %}
           </div>
           <div class="col-8">
             <div class="float-end">
-              <a href="/{%s name %}/tree/{%s b.Name().Short() %}">tree</a>
-              <a href="/{%s name %}/log/{%s b.Name().Short() %}">log</a>
+              <a href="/{%s name %}/tree/{%s b.Name().Short() %}/">tree</a>
+              <a href="/{%s name %}/log/{%s b.Name().Short() %}/">log</a>
             </div>
           </div>
       </div>
diff --git a/templates/gititemrefs.qtpl.go b/templates/gititemrefs.qtpl.go
index 62c1725248bccf069a7ab9b0f1fa10816fb1bc90..b00736ecb57ca6d0fca34676cb9e455591c92d7a 100644
--- a/templates/gititemrefs.qtpl.go
+++ b/templates/gititemrefs.qtpl.go
@@ -94,7 +94,7 @@ 			qw422016.N().S(`/tree/`)
 //line gititemrefs.qtpl:24
 			qw422016.E().S(t.Name().Short())
 //line gititemrefs.qtpl:24
-			qw422016.N().S(`">tree</a>
+			qw422016.N().S(`/">tree</a>
               <a href="/`)
 //line gititemrefs.qtpl:25
 			qw422016.E().S(name)
@@ -103,7 +103,7 @@ 			qw422016.N().S(`/log/`)
 //line gititemrefs.qtpl:25
 			qw422016.E().S(t.Name().Short())
 //line gititemrefs.qtpl:25
-			qw422016.N().S(`">log</a>
+			qw422016.N().S(`/">log</a>
             </div>
           </div>
       </div>
@@ -150,7 +150,7 @@ 		qw422016.N().S(`/tree/`)
 //line gititemrefs.qtpl:44
 		qw422016.E().S(b.Name().Short())
 //line gititemrefs.qtpl:44
-		qw422016.N().S(`">tree</a>
+		qw422016.N().S(`/">tree</a>
               <a href="/`)
 //line gititemrefs.qtpl:45
 		qw422016.E().S(name)
@@ -159,7 +159,7 @@ 		qw422016.N().S(`/log/`)
 //line gititemrefs.qtpl:45
 		qw422016.E().S(b.Name().Short())
 //line gititemrefs.qtpl:45
-		qw422016.N().S(`">log</a>
+		qw422016.N().S(`/">log</a>
             </div>
           </div>
       </div>
diff --git a/templates/gititemsummary.qtpl b/templates/gititemsummary.qtpl
index 9a3e2ee56526ef12d8b10e699d8ca98a3446cb88..e3d3a0828874c51b78a70cc172d34a7fada73a1e 100644
--- a/templates/gititemsummary.qtpl
+++ b/templates/gititemsummary.qtpl
@@ -23,8 +23,8 @@            {%s t.Name().Short() %}
           </div>
           <div class="col-8">
             <div class="float-end">
-              <a href="/{%s name %}/tree/{%s t.Name().Short() %}">tree</a>
-              <a href="/{%s name %}/log/{%s t.Name().Short() %}">log</a>
+              <a href="/{%s name %}/tree/{%s t.Name().Short() %}/">tree</a>
+              <a href="/{%s name %}/log/{%s t.Name().Short() %}/">log</a>
             </div>
           </div>
       </div>
@@ -43,8 +43,8 @@            {%s b.Name().Short() %}
           </div>
           <div class="col-8">
             <div class="float-end">
-              <a href="/{%s name %}/tree/{%s b.Name().Short() %}">tree</a>
-              <a href="/{%s name %}/log/{%s b.Name().Short() %}">log</a>
+              <a href="/{%s name %}/tree/{%s b.Name().Short() %}/">tree</a>
+              <a href="/{%s name %}/log/{%s b.Name().Short() %}/">log</a>
             </div>
           </div>
       </div>
diff --git a/templates/gititemsummary.qtpl.go b/templates/gititemsummary.qtpl.go
index cf1c07cac00b465234917bc9e5a92e2ec7eab62b..ad025f7e8a8343850615d1c5e27c1f2cbf89d68c 100644
--- a/templates/gititemsummary.qtpl.go
+++ b/templates/gititemsummary.qtpl.go
@@ -98,7 +98,7 @@ 			qw422016.N().S(`/tree/`)
 //line gititemsummary.qtpl:26
 			qw422016.E().S(t.Name().Short())
 //line gititemsummary.qtpl:26
-			qw422016.N().S(`">tree</a>
+			qw422016.N().S(`/">tree</a>
               <a href="/`)
 //line gititemsummary.qtpl:27
 			qw422016.E().S(name)
@@ -107,7 +107,7 @@ 			qw422016.N().S(`/log/`)
 //line gititemsummary.qtpl:27
 			qw422016.E().S(t.Name().Short())
 //line gititemsummary.qtpl:27
-			qw422016.N().S(`">log</a>
+			qw422016.N().S(`/">log</a>
             </div>
           </div>
       </div>
@@ -154,7 +154,7 @@ 		qw422016.N().S(`/tree/`)
 //line gititemsummary.qtpl:46
 		qw422016.E().S(b.Name().Short())
 //line gititemsummary.qtpl:46
-		qw422016.N().S(`">tree</a>
+		qw422016.N().S(`/">tree</a>
               <a href="/`)
 //line gititemsummary.qtpl:47
 		qw422016.E().S(name)
@@ -163,7 +163,7 @@ 		qw422016.N().S(`/log/`)
 //line gititemsummary.qtpl:47
 		qw422016.E().S(b.Name().Short())
 //line gititemsummary.qtpl:47
-		qw422016.N().S(`">log</a>
+		qw422016.N().S(`/">log</a>
             </div>
           </div>
       </div>
diff --git a/templates/gitlist.qtpl b/templates/gitlist.qtpl
index 937ba224e5709efc8c22623cf9b382ada77c2ba9..ff2eca9942e5a5fe2f053e1842bda33993d33977 100644
--- a/templates/gitlist.qtpl
+++ b/templates/gitlist.qtpl
@@ -18,14 +18,14 @@     <div class="event-list">
       {% for _, r := range p.Respositories %}
       <div class="event">
         <h4>
-          <a href="/{%s r.Name %}">{%s r.Name %}</a>
+          <a href="/{%s r.Name %}/">{%s r.Name %}</a>
         </h4>
         </hr>
         <p>{%s r.Description %}</p>
         <p>
-          <a href="/{%s r.Name %}/log/{%s r.Ref %}">log</a>
-          <a href="/{%s r.Name %}/tree/{%s r.Ref %}">tree</a>
-          <a href="/{%s r.Name %}/refs">refs</a>
+          <a href="/{%s r.Name %}/log/{%s r.Ref %}/">log</a>
+          <a href="/{%s r.Name %}/tree/{%s r.Ref %}/">tree</a>
+          <a href="/{%s r.Name %}/refs/">refs</a>
         </p>
       </div>
       {% endfor %}
diff --git a/templates/gitlist.qtpl.go b/templates/gitlist.qtpl.go
index 435626eee0d43f1f780dcae81de5fea21a7f8017..f38c404b328255e0ab6d6fdc932b31e31465b723 100644
--- a/templates/gitlist.qtpl.go
+++ b/templates/gitlist.qtpl.go
@@ -110,7 +110,7 @@           <a href="/`)
 //line gitlist.qtpl:21
 		qw422016.E().S(r.Name)
 //line gitlist.qtpl:21
-		qw422016.N().S(`">`)
+		qw422016.N().S(`/">`)
 //line gitlist.qtpl:21
 		qw422016.E().S(r.Name)
 //line gitlist.qtpl:21
@@ -131,7 +131,7 @@ 		qw422016.N().S(`/log/`)
 //line gitlist.qtpl:26
 		qw422016.E().S(r.Ref)
 //line gitlist.qtpl:26
-		qw422016.N().S(`">log</a>
+		qw422016.N().S(`/">log</a>
           <a href="/`)
 //line gitlist.qtpl:27
 		qw422016.E().S(r.Name)
@@ -140,12 +140,12 @@ 		qw422016.N().S(`/tree/`)
 //line gitlist.qtpl:27
 		qw422016.E().S(r.Ref)
 //line gitlist.qtpl:27
-		qw422016.N().S(`">tree</a>
+		qw422016.N().S(`/">tree</a>
           <a href="/`)
 //line gitlist.qtpl:28
 		qw422016.E().S(r.Name)
 //line gitlist.qtpl:28
-		qw422016.N().S(`/refs">refs</a>
+		qw422016.N().S(`/refs/">refs</a>
         </p>
       </div>
       `)
diff --git a/templates/navbar.qtpl b/templates/navbar.qtpl
index 4d2a6a93af93586389c21b685b1df89c818c39f5..9e2796166f9a668ee427deaaf977e186df2e262f 100644
--- a/templates/navbar.qtpl
+++ b/templates/navbar.qtpl
@@ -27,11 +27,11 @@           <div class="navbar-nav">
             <a class="nav-link{%= insertIfEqual(s, Git) %}" href="/">git</a>
 {% comment %}
 Add this back once needed
-            <a class="nav-link{%= insertIfEqual(s, List) %}" href="/list">list</a>
+            <a class="nav-link{%= insertIfEqual(s, List) %}" href="/list/">list</a>
 {% endcomment %}
 {% comment %}
 Add this back if needed
-            <a class="nav-link{%= insertIfEqual(s, About) %}" href="/about">about</a>
+            <a class="nav-link{%= insertIfEqual(s, About) %}" href="/about/">about</a>
 {% endcomment %}
             <a class="nav-link{%= insertIfEqual(s, Config) %}" href="/config">config</a>
           </div>
@@ -45,19 +45,19 @@ </div>
 <div class="row">
   <ul class="nav">
     <li class="nav-item">
-      <a class="nav-link{%= insertIfEqual(s, Readme) %}" aria-current="page" href="/{%s name %}/about">about</a>
+      <a class="nav-link{%= insertIfEqual(s, Readme) %}" aria-current="page" href="/{%s name %}/about/">about</a>
     </li>
     <li class="nav-item">
-      <a class="nav-link{%= insertIfEqual(s, Log) %}" aria-current="page" href="/{%s name %}/log/{%s ref %}">log</a>
+      <a class="nav-link{%= insertIfEqual(s, Log) %}" aria-current="page" href="/{%s name %}/log/{%s ref %}/">log</a>
     </li>
     <li class="nav-item">
-      <a class="nav-link{%= insertIfEqual(s, Summary) %}" aria-current="page" href="/{%s name %}">summary</a>
+      <a class="nav-link{%= insertIfEqual(s, Summary) %}" aria-current="page" href="/{%s name %}/">summary</a>
     </li>
     <li class="nav-item">
       <a class="nav-link{%= insertIfEqual(s, Refs) %}" aria-current="page" href="/{%s name %}/refs">refs</a>
     </li>
     <li class="nav-item">
-      <a class="nav-link{%= insertIfEqual(s, Tree) %}" aria-current="page" href="/{%s name %}/tree/{%s ref %}">tree</a>
+      <a class="nav-link{%= insertIfEqual(s, Tree) %}" aria-current="page" href="/{%s name %}/tree/{%s ref %}/">tree</a>
     </li>
   </ul>
 </div>
diff --git a/templates/navbar.qtpl.go b/templates/navbar.qtpl.go
index 1eacd6a7b0142adb82f16595cfc41d4dd9fafac5..28e6f8e2b587b4c7fffb019f9e02f42231496760 100644
--- a/templates/navbar.qtpl.go
+++ b/templates/navbar.qtpl.go
@@ -161,7 +161,7 @@ 	qw422016.N().S(`" aria-current="page" href="/`)
 //line navbar.qtpl:48
 	qw422016.E().S(name)
 //line navbar.qtpl:48
-	qw422016.N().S(`/about">about</a>
+	qw422016.N().S(`/about/">about</a>
     </li>
     <li class="nav-item">
       <a class="nav-link`)
@@ -176,7 +176,7 @@ 	qw422016.N().S(`/log/`)
 //line navbar.qtpl:51
 	qw422016.E().S(ref)
 //line navbar.qtpl:51
-	qw422016.N().S(`">log</a>
+	qw422016.N().S(`/">log</a>
     </li>
     <li class="nav-item">
       <a class="nav-link`)
@@ -187,7 +187,7 @@ 	qw422016.N().S(`" aria-current="page" href="/`)
 //line navbar.qtpl:54
 	qw422016.E().S(name)
 //line navbar.qtpl:54
-	qw422016.N().S(`">summary</a>
+	qw422016.N().S(`/">summary</a>
     </li>
     <li class="nav-item">
       <a class="nav-link`)
@@ -213,7 +213,7 @@ 	qw422016.N().S(`/tree/`)
 //line navbar.qtpl:60
 	qw422016.E().S(ref)
 //line navbar.qtpl:60
-	qw422016.N().S(`">tree</a>
+	qw422016.N().S(`/">tree</a>
     </li>
   </ul>
 </div>