add webmention link to base.html
This commit is contained in:
parent
2309dfb0ce
commit
61a5435971
|
@ -7,6 +7,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{{ .Title }}</title>
|
||||
<link rel="stylesheet" href="/static/pico.min.css">
|
||||
<link rel="webmention" href="{{ .User.WebmentionUrl }}">
|
||||
<style>
|
||||
header {
|
||||
background-color: {{.HeaderColor}};
|
||||
|
|
|
@ -143,3 +143,17 @@ func TestRendersHeaderTitle(t *testing.T) {
|
|||
t.Error("Header color not rendered. Got: " + result)
|
||||
}
|
||||
}
|
||||
|
||||
func TestRenderPostIncludesRelToWebMention(t *testing.T) {
|
||||
user := getTestUser()
|
||||
post, _ := user.CreateNewPost("testpost")
|
||||
|
||||
result, _ := owl.RenderPost(&post)
|
||||
if !strings.Contains(result, "rel=\"webmention\"") {
|
||||
t.Error("webmention rel not rendered. Got: " + result)
|
||||
}
|
||||
|
||||
if !strings.Contains(result, "href=\""+user.WebmentionUrl()+"\"") {
|
||||
t.Error("webmention href not rendered. Got: " + result)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue