feat: OG metadata and shortened desc

This commit is contained in:
httpjamesm 2022-12-28 00:58:41 -05:00
parent 607ed44ee0
commit ba4a9155a7
3 changed files with 14 additions and 7 deletions

View File

@ -155,6 +155,7 @@ func ViewQuestion(c *gin.Context) {
"authorURL": questionAuthorURL, "authorURL": questionAuthorURL,
"answers": answers, "answers": answers,
"imagePolicy": imagePolicy, "imagePolicy": imagePolicy,
"shortenedBody": questionBodyParent.Text()[0:50],
}) })
} }

View File

@ -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">

View File

@ -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">