Skip to content

Commit

Permalink
Use Open Graph Protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
WKHAllen committed Aug 2, 2020
1 parent 330d525 commit 804626a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/routes/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,7 @@ export function adminAuth (req: Request, res: Response, next: NextFunction) {
// Render a page
export function renderPage(req: Request, res: Response, page: string, options: any) {
options = options || {};
options.url = req.originalUrl;
services.MetaService.getMeta('Version', (version) => {
options.version = version;
if (!req.session || !req.session.sessionId) {
Expand Down
13 changes: 10 additions & 3 deletions src/views/layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,21 @@
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="NorseBooks is a place for Luther College students to resell textbooks">
<meta name="description" content="NorseBooks is a place for Luther College students to buy and sell textbooks">
<link rel="icon" href="/favicon.ico">
<link rel="apple-touch-icon" href="/img/favicon-192.png">
<link rel="manifest" href="/manifest.json">
<meta property="og:type" content="website">
<meta property="og:url" content="https://www.norsebooks.com{{url}}">
<meta property="og:image" content="/img/favicon.png">
<meta property="og:site_name" content="NorseBooks">
<meta property="og:description" content="NorseBooks is a place for Luther College students to buy and sell textbooks">
{{#if title}}
<title>{{title}} - Norse Books</title>
<meta property="og:title" content="{{title}} - NorseBooks">
<title>{{title}} - NorseBooks</title>
{{else}}
<title>Norse Books</title>
<meta property="og:title" content="NorseBooks">
<title>NorseBooks</title>
{{/if}}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="/css/main.css">
Expand Down

0 comments on commit 804626a

Please sign in to comment.