fix meta properties and images

This commit is contained in:
bas 2024-02-25 16:13:19 +08:00
parent 843fcf2d7f
commit bd0ac15872
No known key found for this signature in database
GPG key ID: 4A3E296AE018EDC6
18 changed files with 46 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,28 @@
---
import * as config from '../config.yaml';
const { title, description, metaTitle, image } = Astro.props;
---
<meta name="viewport" content="width=device-width" />
<meta name="generator" content={Astro.generator} />
<title>{(metaTitle || title) ? ((metaTitle || title) + ' | ' + config.title) : config.title}</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={(metaTitle || title) ? (metaTitle || title) : config.title} />
<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={(metaTitle || title) ? (metaTitle || title) : config.title} />
<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

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">