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{
|
||||
"title": questionText,
|
||||
"body": template.HTML(questionBodyParentHTML),
|
||||
"timestamp": questionTimestamp,
|
||||
"author": questionAuthor,
|
||||
"authorURL": questionAuthorURL,
|
||||
"answers": answers,
|
||||
"imagePolicy": imagePolicy,
|
||||
"title": questionText,
|
||||
"body": template.HTML(questionBodyParentHTML),
|
||||
"timestamp": questionTimestamp,
|
||||
"author": questionAuthor,
|
||||
"authorURL": questionAuthorURL,
|
||||
"answers": answers,
|
||||
"imagePolicy": imagePolicy,
|
||||
"shortenedBody": questionBodyParent.Text()[0:50],
|
||||
})
|
||||
|
||||
}
|
||||
|
@ -10,6 +10,9 @@
|
||||
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src 'self';"
|
||||
/>
|
||||
<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>
|
||||
<body>
|
||||
<div class="container">
|
||||
|
@ -10,6 +10,9 @@
|
||||
content="default-src 'none'; style-src 'self'; script-src 'none'; img-src {{ .imagePolicy }};"
|
||||
/>
|
||||
<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>
|
||||
<body>
|
||||
<div class="parent">
|
||||
|
Loading…
x
Reference in New Issue
Block a user