templates: show page-specific title in og:title
field
Signed-off-by: Naman Sood <mail@nsood.in>
This commit is contained in:
parent
791a1db58b
commit
c9568c39f9
2 changed files with 3 additions and 3 deletions
|
@ -128,7 +128,7 @@ func (s *server) createWebPage(title, contents string) (string, error) {
|
|||
}
|
||||
|
||||
func (s *server) postPage(p *Post, res http.ResponseWriter, req *http.Request) {
|
||||
res.Header().Add("content-type", "text/html")
|
||||
res.Header().Add("content-type", "text/html; charset=utf-8")
|
||||
contents, err := p.render(s.templates["fullpost"])
|
||||
if err != nil {
|
||||
s.errorInRequest(res, req, err)
|
||||
|
@ -141,7 +141,7 @@ func (s *server) postPage(p *Post, res http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
|
||||
func (s *server) homePage(res http.ResponseWriter, req *http.Request) {
|
||||
res.Header().Add("content-type", "text/html")
|
||||
res.Header().Add("content-type", "text/html; charset=utf-8")
|
||||
|
||||
var posts string
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue