Added meta tags

This commit is contained in:
Pitu 2019-03-12 07:43:14 +00:00
parent f11cb56db8
commit 455c9ee25c
3 changed files with 38 additions and 3 deletions

View File

@ -20,12 +20,37 @@ export default {
}, },
srcDir: 'src/site/', srcDir: 'src/site/',
head: { head: {
title: process.env.SERVICE_NAME,
titleTemplate: `%s | ${process.env.SERVICE_NAME}`,
// TODO: Add the directory with pictures for favicon and stuff
meta: [ meta: [
{ charset: 'utf-8' }, { charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' } { name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'theme-color', name: 'theme-color', content: process.env.META_THEME_COLOR },
{ hid: 'description', name: 'description', content: process.env.META_DESCRIPTION },
{ hid: 'keywords', name: 'keywords', content: process.env.META_KEYWORDS },
{ hid: 'apple-mobile-web-app-title', name: 'apple-mobile-web-app-title', content: process.env.SERVICE_NAME },
{ hid: 'application-name', name: 'application-name', content: process.env.SERVICE_NAME },
// { hid: 'msapplication-config', name: 'msapplication-config', content: `${process.env.DOMAIN}/browserconfig.xml` },
{ hid: 'twitter:card', name: 'twitter:card', content: 'summary_large_image' },
{ hid: 'twitter:site', name: 'twitter:site', content: process.env.META_TWITTER_HANDLE },
{ hid: 'twitter:creator', name: 'twitter:creator', content: process.env.META_TWITTER_HANDLE },
{ hid: 'twitter:title', name: 'twitter:title', content: process.env.SERVICE_NAME },
{ hid: 'twitter:description', name: 'twitter:description', content: process.env.META_DESCRIPTION },
{ hid: 'twitter:image', name: 'twitter:image', content: `${process.env.DOMAIN}/share.jpg` },
{ hid: 'og:url', property: 'og:url', content: process.env.DOMAIN },
{ hid: 'og:type', property: 'og:type', content: 'website' },
{ hid: 'og:title', property: 'og:title', content: process.env.SERVICE_NAME },
{ hid: 'og:description', property: 'og:description', content: process.env.META_DESCRIPTION },
{ hid: 'og:image', property: 'og:image', content: `${process.env.DOMAIN}/share.jpg` },
{ hid: 'og:image:secure_url', property: 'og:image:secure_url', content: `${process.env.DOMAIN}/share.jpg` },
{ hid: 'og:site_name', property: 'og:site_name', content: process.env.SERVICE_NAME }
], ],
link: [ link: [
{ rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Nunito:300,400,600,700' } { rel: 'stylesheet', href: 'https://fonts.googleapis.com/css?family=Nunito:300,400,600,700' },
// This one is a pain in the ass to make it customizable, so you should edit it manually
{ type: 'application/json+oembed', href: `${process.env.DOMAIN}/oembed.json` }
] ]
}, },
plugins: [ plugins: [

View File

@ -0,0 +1,6 @@
{
"title": "lolisafe",
"author_name": "Blazing fast file uploader and bunker written in node! 🚀",
"provider_name": "lolisafe",
"provider_url": "https://lolisafe.moe"
}

View File

@ -142,7 +142,11 @@ async function start() {
BLOCKED_EXTENSIONS: ['.jar', '.exe', '.msi', '.com', '.bat', '.cmd', '.scr', '.ps1', '.sh'], BLOCKED_EXTENSIONS: ['.jar', '.exe', '.msi', '.com', '.bat', '.cmd', '.scr', '.ps1', '.sh'],
UPLOAD_FOLDER: 'uploads', UPLOAD_FOLDER: 'uploads',
SECRET: randomstring.generate(64), SECRET: randomstring.generate(64),
MAX_LINKS_PER_ALBUM: 5 MAX_LINKS_PER_ALBUM: 5,
META_THEME_COLOR: '#20222b',
META_DESCRIPTION: 'Blazing fast file uploader and bunker written in node! 🚀',
META_KEYWORDS: 'lolisafe,upload,uploader,file,vue,images,ssr,file uploader,free',
META_TWITTER_HANDLE: '@its_pitu'
}; };
const allSettings = Object.assign(defaultSettings, response); const allSettings = Object.assign(defaultSettings, response);