Merge pull request #87 from robbiedv/social-preview

Social Preview Feature
This commit is contained in:
Sacha Weatherstone 2021-11-13 11:26:54 +11:00 committed by GitHub
commit 1c948d75a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,6 +5,7 @@ import clsx from 'clsx';
import useBaseUrl from '@docusaurus/useBaseUrl'; import useBaseUrl from '@docusaurus/useBaseUrl';
import useDocusaurusContext from '@docusaurus/useDocusaurusContext'; import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
import Layout from '@theme/Layout'; import Layout from '@theme/Layout';
import Head from '@docusaurus/Head';
import styles from './styles.module.css'; import styles from './styles.module.css';
@ -65,10 +66,20 @@ function Home() {
const context = useDocusaurusContext(); const context = useDocusaurusContext();
const { siteConfig } = context; const { siteConfig } = context;
return ( return (
<Layout <Layout>
title="" <Head>
description="Description will go into a meta tag in <head />" <meta property="og:title" content="Meshtastic" />
> <meta
property="og:image"
content={useBaseUrl("img/meshtastic-design/web/social-preview-1200x630.png")}
/>
<meta
property="og:description"
content="Open Source hiking, pilot, skiing and secure GPS mesh communicator"
/>
<meta property="og:url" content="https://meshtastic.org/" />
<meta name="twitter:card" content="summary_large_image" />
</Head>
<header className={clsx("hero hero--primary", styles.heroBanner)}> <header className={clsx("hero hero--primary", styles.heroBanner)}>
<div className="container"> <div className="container">
<h1 className="hero__title"> <h1 className="hero__title">