code: func InstallHandlers(r *router.Router, base router.MiddlewareChain, cfg Config) {
  	tmpl := prepareTemplates(cfg.TemplatesPath)
  
  	m := base.Extend(func(c *router.Context, next router.Handler) {
  		c.Context = context.WithValue(c.Context, configContextKey(0), &cfg)
  		c.Context = context.WithValue(c.Context, startTimeContextKey(0), clock.Now(c.Context))
  		next(c)
  	})
  	m = m.Extend(
  		templates.WithTemplates(tmpl),
  		auth.Authenticate(server.UsersAPIAuthMethod{}),
  	)
  
  	r.GET("/", m, indexPage)
  	r.GET("/jobs/:ProjectID", m, projectPage)
  	r.GET("/jobs/:ProjectID/:JobName", m, jobPage)
  	r.GET("/jobs/:ProjectID/:JobName/:InvID", m, invocationPage)
  
  	// All POST forms must be protected with XSRF token.
  	mxsrf := m.Extend(xsrf.WithTokenCheck)
  	r.POST("/actions/triggerJob/:ProjectID/:JobName", mxsrf, triggerJobAction)
  	r.POST("/actions/pauseJob/:ProjectID/:JobName", mxsrf, pauseJobAction)
  	r.POST("/actions/resumeJob/:ProjectID/:JobName", mxsrf, resumeJobAction)
  	r.POST("/actions/abortJob/:ProjectID/:JobName", mxsrf, abortJobAction)
  	r.POST("/actions/abortInvocation/:ProjectID/:JobName/:InvID", mxsrf, abortInvocationAction)
  }
docs: // InstallHandlers adds HTTP handlers that render HTML pages.