v3: search engine, responsive header with compact user menu
This commit is contained in:
@@ -2,6 +2,7 @@ import { Context, Next } from "@oak/oak";
|
||||
import { getDump } from "../services/dump-service.ts";
|
||||
import { getUserByUsername } from "../services/user-service.ts";
|
||||
import { getPlaylistById } from "../services/playlist-service.ts";
|
||||
import { OG_SITE_NAME } from "../config.ts";
|
||||
|
||||
interface OGMeta {
|
||||
title: string;
|
||||
@@ -10,8 +11,6 @@ interface OGMeta {
|
||||
url: string;
|
||||
}
|
||||
|
||||
const SITE_NAME = "gerbeur";
|
||||
|
||||
function escapeAttr(s: string): string {
|
||||
return s
|
||||
.replace(/&/g, "&")
|
||||
@@ -24,7 +23,7 @@ function buildTags(meta: OGMeta): string {
|
||||
const card = meta.imageUrl ? "summary_large_image" : "summary";
|
||||
const tags = [
|
||||
`<title>${escapeAttr(meta.title)}</title>`,
|
||||
`<meta property="og:site_name" content="${SITE_NAME}" />`,
|
||||
`<meta property="og:site_name" content="${OG_SITE_NAME}" />`,
|
||||
`<meta property="og:type" content="website" />`,
|
||||
`<meta property="og:url" content="${escapeAttr(meta.url)}" />`,
|
||||
`<meta property="og:title" content="${escapeAttr(meta.title)}" />`,
|
||||
|
||||
Reference in New Issue
Block a user