Removing twitter OG meta tags

This commit also moving svelte meta head to root layout.svelte
This commit is contained in:
ditatompel 2024-05-08 02:54:14 +07:00
parent c8c0cf7ebb
commit c1ab301055
No known key found for this signature in database
GPG key ID: 31D3D06D77950979
7 changed files with 51 additions and 100 deletions

View file

@ -1,68 +1,10 @@
<script> <script>
import { page } from '$app/stores';
import '../../app.css'; import '../../app.css';
import { Drawer } from '@skeletonlabs/skeleton'; import { Drawer } from '@skeletonlabs/skeleton';
import { MainNav, MobileDrawer } from '$lib/components/navigation'; import { MainNav, MobileDrawer } from '$lib/components/navigation';
import Footer from '$lib/components/Footer.svelte'; import Footer from '$lib/components/Footer.svelte';
/* prettier-ignore */
const metaDefaults = {
title: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
description: '',
keywords: '',
};
const meta = {
title: metaDefaults.title,
description: metaDefaults.description,
keywords: metaDefaults.keywords,
// Twitter
twitter: {
title: metaDefaults.title,
description: metaDefaults.description
}
};
page.subscribe((page) => {
meta.title = metaDefaults.title;
meta.description = metaDefaults.description;
meta.keywords = metaDefaults.keywords;
meta.twitter.title = metaDefaults.title;
meta.twitter.description = metaDefaults.description;
if (typeof page.data.meta === 'object') {
meta.title = page.data.meta.title ?? metaDefaults.title;
meta.description = page.data.meta.description ?? metaDefaults.description;
meta.keywords = page.data.meta.keywords ?? metaDefaults.description;
meta.twitter.title = page.data.meta.title ?? metaDefaults.title;
meta.twitter.description = page.data.meta.description ?? metaDefaults.description;
}
});
</script> </script>
<svelte:head>
<title>{meta.title} — xmr.ditatompel.com</title>
<!-- Meta Tags -->
<meta name="title" content="{meta.title} — xmr.ditatompel.com" />
<meta name="description" content={meta.description} />
<meta name="keywords" content={meta.keywords} />
<meta name="theme-color" content="#272b31" />
<meta name="author" content="ditatompel" />
<!-- Open Graph - https://ogp.me/ -->
<meta property="og:site_name" content="xmr.ditatompel.com" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://xmr.ditatompel.com{$page.url.pathname}" />
<meta property="og:locale" content="en_US" />
<meta property="og:title" content="{meta.title} — xmr.ditatompel.com" />
<meta property="og:description" content={meta.description} />
<!-- Open Graph: Twitter -->
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@ditatompel" />
<meta name="twitter:creator" content="@ditatompel" />
<meta name="twitter:title" content="{meta.twitter.title} — xmr.ditatompel.com" />
<meta name="twitter:description" content={meta.twitter.description} />
</svelte:head>
<Drawer> <Drawer>
<h2 class="p-4">Navigation</h2> <h2 class="p-4">Navigation</h2>
<hr /> <hr />

View file

@ -1,22 +1,12 @@
/** @type {import('./$types').PageLoad} */ /** @type {import('./$types').PageLoad} */
export async function load({ data }) { export async function load({ data }) {
/* prettier-ignore */ /* prettier-ignore */
const metaDefaults = {
title: 'Add Monero Node',
description: 'You can use this page to add known remote node to the system so my bots can monitor it.',
keywords: 'monero, monero node, monero public node, monero wallet'
};
return { return {
meta: { meta: {
title: metaDefaults.title, title: 'Add Monero Node',
description: metaDefaults.description, description:
keywords: metaDefaults.keywords, 'You can use this page to add known remote node to the system so my bots can monitor it.',
// Twitter keywords: 'monero,monero node,monero public node,monero wallet,list monero node,monero node monitoring'
twitter: {
title: metaDefaults.title,
description: metaDefaults.description
}
} }
}; };
} }

View file

@ -1,22 +1,11 @@
/** @type {import('./$types').PageLoad} */ /** @type {import('./$types').PageLoad} */
export async function load({ data }) { export async function load({ data }) {
/* prettier-ignore */ /* prettier-ignore */
const metaDefaults = {
title: 'Monero (XMR)',
description: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
keywords: 'monero,xmr,monero node,xmrnode,cryptocurrency'
};
return { return {
meta: { meta: {
title: metaDefaults.title, title: 'Public Monero Remote Nodes List',
description: metaDefaults.description, description: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
keywords: metaDefaults.keywords, keywords: 'monero remote nodes,public monero nodes,monero public nodes,monero wallet'
// Twitter
twitter: {
title: metaDefaults.title,
description: metaDefaults.description
}
} }
}; };
} }

View file

@ -1,22 +1,11 @@
/** @type {import('./$types').PageLoad} */ /** @type {import('./$types').PageLoad} */
export async function load({ data }) { export async function load({ data }) {
/* prettier-ignore */ /* prettier-ignore */
const metaDefaults = {
title: 'Probe Logs',
description: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
keywords: 'monero,xmr,monero node,xmrnode,cryptocurrency'
};
return { return {
meta: { meta: {
title: metaDefaults.title, title: 'Probe Logs',
description: metaDefaults.description, description: 'Monero RPC response frpm monitored remote nodes',
keywords: metaDefaults.keywords, keywords: 'monero log,monero node log,monitoring monero log,monero,xmr,monero node,xmrnode,cryptocurrency'
// Twitter
twitter: {
title: metaDefaults.title,
description: metaDefaults.description
}
} }
}; };
} }

View file

@ -3,6 +3,9 @@
import { AdminNav, AdminSidebar, AdminMobileDrawer } from '$lib/components/navigation'; import { AdminNav, AdminSidebar, AdminMobileDrawer } from '$lib/components/navigation';
</script> </script>
<svelte:head>
<meta name="robots" content="noindex,nofollow" />
</svelte:head>
<Drawer> <Drawer>
<h2 class="p-4">Navigation</h2> <h2 class="p-4">Navigation</h2>
<hr /> <hr />

View file

@ -1,5 +1,6 @@
<script> <script>
import '../app.css'; import '../app.css';
import { page } from '$app/stores';
import { Toast, Modal } from '@skeletonlabs/skeleton'; import { Toast, Modal } from '@skeletonlabs/skeleton';
import { beforeNavigate, afterNavigate } from '$app/navigation'; import { beforeNavigate, afterNavigate } from '$app/navigation';
import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom'; import { computePosition, autoUpdate, offset, shift, flip, arrow } from '@floating-ui/dom';
@ -13,8 +14,41 @@
afterNavigate(() => { afterNavigate(() => {
isLoading = false; isLoading = false;
}); });
/* prettier-ignore */
const meta = {
title: 'Monero (XMR)',
description: 'Monero is private, decentralized cryptocurrency that keeps your finances confidential and secure.',
keywords: 'monero,xmr,monero node,xmrnode,cryptocurrency,testnet monero node,stagenet monero node,xmr node'
};
page.subscribe((page) => {
if (typeof page.data.meta === 'object') {
meta.title = page.data.meta.title ?? meta.title;
meta.description = page.data.meta.description ?? meta.description;
meta.keywords = page.data.meta.keywords ?? meta.description;
}
});
</script> </script>
<svelte:head>
<title>{meta.title} — xmr.ditatompel.com</title>
<!-- Meta Tags -->
<meta name="title" content="{meta.title} — xmr.ditatompel.com" />
<meta name="description" content={meta.description} />
<meta name="keywords" content={meta.keywords} />
<meta name="theme-color" content="#272b31" />
<meta name="author" content="ditatompel" />
<!-- Open Graph - https://ogp.me/ -->
<meta property="og:site_name" content="xmr.ditatompel.com" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://xmr.ditatompel.com{$page.url.pathname}" />
<meta property="og:locale" content="en_US" />
<meta property="og:title" content="{meta.title} — xmr.ditatompel.com" />
<meta property="og:description" content={meta.description} />
</svelte:head>
<Modal /> <Modal />
<Toast /> <Toast />

View file

@ -40,6 +40,10 @@
} }
</script> </script>
<svelte:head>
<meta name="robots" content="noindex,nofollow" />
</svelte:head>
<section class="bg-gray-50 dark:bg-gray-900"> <section class="bg-gray-50 dark:bg-gray-900">
<div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0"> <div class="flex flex-col items-center justify-center px-6 py-8 mx-auto md:h-screen lg:py-0">
<a href="/" class="flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white" <a href="/" class="flex items-center mb-6 text-2xl font-semibold text-gray-900 dark:text-white"