Merge pull request #7 from agonist/fix/og-meta

Fix meta tags and links preview
This commit is contained in:
tree🌴 2024-02-25 22:24:13 +01:00 committed by GitHub
commit 3ca53d3352
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
18 changed files with 48 additions and 15 deletions

BIN
public/og/og_about.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
public/og/og_events.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 43 KiB

BIN
public/og/og_index.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
public/og/og_people.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

BIN
public/og/og_research.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
public/og/og_talks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@ -0,0 +1,30 @@
---
import * as config from '../config.yaml';
const { title, description, metaTitle, image } = Astro.props;
const titleFull = (metaTitle || title) ? ((metaTitle || title) + ' | ' + config.title) : config.title;
---
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>{titleFull}</title>
<meta name="description" content={description} />
<!-- Open Graph / Facebook -->
<meta property="og:type" content="website" />
<meta property="og:url" content={Astro.request.url} />
<meta property="og:title" content={titleFull} />
<meta property="og:description" content={description} />
<meta property="og:image" content={image ? `https://web3privacy.info/og/${image}.png` : 'https://web3privacy.info/og/og_index.png'} />
<!-- Twitter -->
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:url" content={Astro.request.url} />
<meta property="twitter:title" content={titleFull} />
<meta property="twitter:description" content={description} />
<meta property="twitter:image" content={image ? `https://web3privacy.info/og/${image}.png` : 'https://web3privacy.info/og/og_index.png'} />

View File

@ -1,4 +1,5 @@
title: Web3Privacy Now
description: Privacy advocates worldwide are coming together to discuss how to mainstream privacy within the Web3 industry. So it will become a cultural phenomenon embodying both decentralisation & anti-surveillance capitalism practices.
header:
menu:
- name: Home
@ -107,4 +108,4 @@ landing:
text: Community discussion
ico: forum
community: |
Our aim with gatherings is to bring together key players, different perspectives, skills and visions. We aggregate tech and non tech people, key players and contributors, builders, researchers, philosophers, lawyers, policymakers, activists, local communities and general public.
Our aim with gatherings is to bring together key players, different perspectives, skills and visions. We aggregate tech and non tech people, key players and contributors, builders, researchers, philosophers, lawyers, policymakers, activists, local communities and general public.

View File

@ -5,7 +5,9 @@ import * as config from '../config.yaml';
import * as pkg from '../../package.json';
import core from '../core.json';
import '../styles/base.css';
const {banner, title, metaTitle, description} = Astro.props;
import MetaTags from '../components/MetaTags.astro';
const {banner, title, metaTitle, description, image} = Astro.props;
import cfonts from 'cfonts';
@ -18,10 +20,12 @@ function genHeading(str) {
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/x-icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<meta name="description" content={description} />
<title>{(metaTitle || title) ? ((metaTitle || title) + ' | ' + config.title) : config.title}</title>
<MetaTags
title={metaTitle ? metaTitle : (title ? title : config.name)}
description={description ? description : config.description}
image={image}
/>
<link
rel="preload"

View File

@ -7,7 +7,7 @@ import AboutFooter from '../components/AboutFooter.astro';
---
<BaseLayout title="About">
<BaseLayout title="About" image="og_about">
<div class="middle-pane-medium mt-10">
<div class="grid grid-cols-1 xl:grid-cols-2 gap-16">

View File

@ -18,7 +18,7 @@ const status = eventStatus(item)
const ext = findExt(EventsExt, item)
---
<BaseLayout title={id} metaTitle={nameRenderer(item, true)}>
<BaseLayout title={id} metaTitle={nameRenderer(item, true)} image="og_events">
<div class="middle-pane-medium mt-10">

View File

@ -31,7 +31,7 @@ for (const year of pastYears.reverse()) {
---
<BaseLayout title="Events">
<BaseLayout title="Events" image="og_events">
<div class="middle-pane-medium mt-10">

View File

@ -2,12 +2,10 @@
import BaseLayout from '../layouts/base.astro';
import AboutFooter from '../components/AboutFooter.astro';
import * as config from '../config.yaml';
import core from '../core.json';
import articles from '../articles.json';
import talks from '../talks.json';
import explorer from '../explorer.json';
import { isRenderTemplateResult } from 'astro/runtime/server/render/astro/render-template.js';
import { isPast, format } from 'date-fns';
const events = core.events;

View File

@ -23,7 +23,7 @@ function getPoint (num){
---
<BaseLayout title="Leaderboard">
<BaseLayout title="Leaderboard" image="og_leaderboard">
<div class="middle-pane-medium mt-10 flex items-center justify-center">
<!--code><pre>

View File

@ -5,7 +5,7 @@ import core from '../core.json';
---
<BaseLayout title="People">
<BaseLayout title="People" image="og_people">
<div class="middle-pane-medium mt-10">
{core.people.map((person) => (

View File

@ -7,7 +7,7 @@ const research = core.projects.filter(x => x.type && x.type === "research");
---
<BaseLayout title="Research">
<BaseLayout title="Research" image="og_research">
<div class="middle-pane-medium mt-10">

View File

@ -5,7 +5,7 @@ import talks from '../talks.json';
---
<BaseLayout title="Talks">
<BaseLayout title="Talks" image="og_talks">
<div class="middle-pane-medium mt-10">
<div class="mt-16">