vanity import
This commit is contained in:
parent
58b2870883
commit
225759ddb3
|
@ -161,7 +161,15 @@ func Build() (*Site, error) {
|
|||
}
|
||||
|
||||
// Add HTTP routes here
|
||||
s.mux.Handle("/", s.renderTemplatePage("index.html", nil))
|
||||
s.mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.URL.Path != "/" {
|
||||
w.WriteHeader(http.StatusNotFound)
|
||||
s.renderTemplatePage("error.html", "can't find " + r.URL.Path).ServeHTTP(w,r)
|
||||
return
|
||||
}
|
||||
|
||||
s.renderTemplatePage("index.html", nil).ServeHTTP(w, r)
|
||||
})
|
||||
s.mux.Handle("/resume", s.renderTemplatePage("resume.html", s.Resume))
|
||||
s.mux.Handle("/blog", s.renderTemplatePage("blogindex.html", s.Posts))
|
||||
s.mux.Handle("/contact", s.renderTemplatePage("contact.html", nil))
|
||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
|||
module github.com/Xe/site
|
||||
module christine.website
|
||||
|
||||
require (
|
||||
github.com/Xe/gopreload v0.0.0-20170326043426-a00a8beb369c
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
<head>
|
||||
{{ template "title" . }}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="go-import" content="christine.website git https://github.com/Xe/site">
|
||||
<link rel="stylesheet" href="/css/hack.css" />
|
||||
<link rel="stylesheet" href="/css/gruvbox-dark.css" />
|
||||
<link rel="manifest" href="/static/manifest.json" />
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
{{ define "title" }}<title>Christine Dodrill</title>{{ end }}
|
||||
{{ define "title" }}
|
||||
<title>Christine Dodrill</title>
|
||||
{{ end }}
|
||||
|
||||
{{ define "content" }}
|
||||
<div class="grid">
|
||||
|
|
Loading…
Reference in New Issue