mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-29 01:28:59 -05:00
Add Open Graph tags
This commit is contained in:
parent
5409b115e7
commit
506e6b0cab
5 changed files with 26 additions and 7 deletions
|
@ -5,7 +5,7 @@ export default [
|
||||||
$write: [],
|
$write: [],
|
||||||
name: "Shares",
|
name: "Shares",
|
||||||
enabled: true,
|
enabled: true,
|
||||||
permission: "document",
|
permission: "collection",
|
||||||
attributes: [
|
attributes: [
|
||||||
{
|
{
|
||||||
key: "securityID",
|
key: "securityID",
|
||||||
|
@ -70,7 +70,7 @@ export default [
|
||||||
$write: [],
|
$write: [],
|
||||||
name: "ShareSecurity",
|
name: "ShareSecurity",
|
||||||
enabled: true,
|
enabled: true,
|
||||||
permission: "document",
|
permission: "collection",
|
||||||
attributes: [
|
attributes: [
|
||||||
{
|
{
|
||||||
key: "password",
|
key: "password",
|
||||||
|
|
|
@ -99,6 +99,7 @@ const generateFunctionsApiKey = async () => {
|
||||||
"buckets.read",
|
"buckets.read",
|
||||||
"buckets.write",
|
"buckets.write",
|
||||||
"files.read",
|
"files.read",
|
||||||
|
"users.read",
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
return res.data.secret;
|
return res.data.secret;
|
||||||
|
@ -142,6 +143,3 @@ export default {
|
||||||
generateFunctionsApiKey,
|
generateFunctionsApiKey,
|
||||||
addPlatform,
|
addPlatform,
|
||||||
};
|
};
|
||||||
function token(token: any) {
|
|
||||||
throw new Error("Function not implemented.");
|
|
||||||
}
|
|
||||||
|
|
BIN
public/img/opengraph-default.png
Normal file
BIN
public/img/opengraph-default.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
|
@ -1,9 +1,25 @@
|
||||||
import Head from "next/head";
|
import Head from "next/head";
|
||||||
|
|
||||||
const Meta = ({ title }: { title: string }) => {
|
const Meta = ({
|
||||||
|
title,
|
||||||
|
description,
|
||||||
|
}: {
|
||||||
|
title: string;
|
||||||
|
description?: string;
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Head>
|
<Head>
|
||||||
|
{/* TODO: Doesn't work because script get only executed on client side */}
|
||||||
<title>{title} - Pingvin Share</title>
|
<title>{title} - Pingvin Share</title>
|
||||||
|
<meta name="og:title" content={`${title} - Pingvin Share`} />
|
||||||
|
<meta
|
||||||
|
name="og:description"
|
||||||
|
content={
|
||||||
|
description ?? "An open-source and selfhosted sharing platform."
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<meta name="twitter:title" content={`${title} - Pingvin Share`} />
|
||||||
|
<meta name="twitter:description" content={description} />
|
||||||
</Head>
|
</Head>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -11,8 +11,13 @@ export default class _Document extends Document {
|
||||||
<Html>
|
<Html>
|
||||||
<Head>
|
<Head>
|
||||||
<link rel="manifest" href="/manifest.json" />
|
<link rel="manifest" href="/manifest.json" />
|
||||||
<meta name="theme-color" content="#46509e" />
|
|
||||||
<link rel="apple-touch-icon" href="/icons/icon-white-128x128.png" />
|
<link rel="apple-touch-icon" href="/icons/icon-white-128x128.png" />
|
||||||
|
|
||||||
|
<meta property="og:image" content="/img/opengraph-default.png" />
|
||||||
|
<meta name="twitter:card" content="summary_large_image" />
|
||||||
|
<meta name="twitter:image" content="/img/opengraph-default.png" />
|
||||||
|
<meta name="robots" content="noindex" />
|
||||||
|
<meta name="theme-color" content="#46509e" />
|
||||||
</Head>
|
</Head>
|
||||||
<body>
|
<body>
|
||||||
<Main />
|
<Main />
|
||||||
|
|
Loading…
Add table
Reference in a new issue