feat: OG metadata and shortened desc
This commit is contained in:
parent
607ed44ee0
commit
ba4a9155a7
@ -148,13 +148,14 @@ func ViewQuestion(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
c.HTML(200, "question.html", gin.H{
|
c.HTML(200, "question.html", gin.H{
|
||||||
"title": questionText,
|
"title": questionText,
|
||||||
"body": template.HTML(questionBodyParentHTML),
|
"body": template.HTML(questionBodyParentHTML),
|
||||||
"timestamp": questionTimestamp,
|
"timestamp": questionTimestamp,
|
||||||
"author": questionAuthor,
|
"author": questionAuthor,
|
||||||
"authorURL": questionAuthorURL,
|
"authorURL": questionAuthorURL,
|
||||||
"answers": answers,
|
"answers": answers,
|
||||||
"imagePolicy": imagePolicy,
|
"imagePolicy": imagePolicy,
|
||||||
|
"shortenedBody": questionBodyParent.Text()[0:50],
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src 'self';"
|
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src 'self';"
|
||||||
/>
|
/>
|
||||||
<link rel="icon" href="/static/codecircles.png" />
|
<link rel="icon" href="/static/codecircles.png" />
|
||||||
|
<meta name="theme-color" content="#8CFFC1" />
|
||||||
|
<meta name="og:image" content="/static/codecircles.png" />
|
||||||
|
<meta name="description" content="View StackOverflow threads in privacy and without the clutter." />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src {{ .imagePolicy }};"
|
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src {{ .imagePolicy }};"
|
||||||
/>
|
/>
|
||||||
<link rel="icon" href="/static/codecircles.png" />
|
<link rel="icon" href="/static/codecircles.png" />
|
||||||
|
<meta name="theme-color" content="#8CFFC1" />
|
||||||
|
<meta name="og:image" content="/static/codecircles.png" />
|
||||||
|
<meta name="description" content="{{ .shortendBody }}..." />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="parent">
|
<div class="parent">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user