Add og metatags to public facing pages
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 11s
All checks were successful
Publish Docker Image / Publish Docker Image (push) Successful in 11s
This commit is contained in:
@ -3,10 +3,12 @@ import type {
|
||||
ContactCardPortraitVariables,
|
||||
} from 'types/graphql'
|
||||
|
||||
import type {
|
||||
TypedDocumentNode,
|
||||
CellFailureProps,
|
||||
CellSuccessProps,
|
||||
import { routes } from '@redwoodjs/router'
|
||||
import {
|
||||
type TypedDocumentNode,
|
||||
type CellFailureProps,
|
||||
type CellSuccessProps,
|
||||
Metadata,
|
||||
} from '@redwoodjs/web'
|
||||
|
||||
import CellEmpty from 'src/components/Cell/CellEmpty/CellEmpty'
|
||||
@ -43,5 +45,20 @@ export const Success = ({
|
||||
portrait,
|
||||
socials,
|
||||
}: CellSuccessProps<ContactCardPortrait, ContactCardPortraitVariables>) => (
|
||||
<>
|
||||
<Metadata
|
||||
title="Contact"
|
||||
og={{
|
||||
title: 'Contact',
|
||||
type: 'website',
|
||||
image: {
|
||||
url: portrait.fileId,
|
||||
type: 'image/webp',
|
||||
alt: `${process.env.FIRST_NAME} ${process.env.LAST_NAME}`,
|
||||
},
|
||||
url: routes.contact(),
|
||||
}}
|
||||
/>
|
||||
<ContactCard portraitUrl={portrait.fileId} socials={socials} />
|
||||
</>
|
||||
)
|
||||
|
@ -1,9 +1,11 @@
|
||||
import type { FindProjectById, FindProjectByIdVariables } from 'types/graphql'
|
||||
|
||||
import type {
|
||||
CellSuccessProps,
|
||||
CellFailureProps,
|
||||
TypedDocumentNode,
|
||||
import { routes } from '@redwoodjs/router'
|
||||
import {
|
||||
type CellSuccessProps,
|
||||
type CellFailureProps,
|
||||
type TypedDocumentNode,
|
||||
Metadata,
|
||||
} from '@redwoodjs/web'
|
||||
|
||||
import CellEmpty from 'src/components/Cell/CellEmpty/CellEmpty'
|
||||
@ -40,5 +42,23 @@ export const Failure = ({
|
||||
export const Success = ({
|
||||
project,
|
||||
}: CellSuccessProps<FindProjectById, FindProjectByIdVariables>) => (
|
||||
<>
|
||||
<Metadata
|
||||
title={project.title}
|
||||
og={{
|
||||
title: project.title,
|
||||
type: 'website',
|
||||
image:
|
||||
project.images.length > 0
|
||||
? {
|
||||
url: project.images[0],
|
||||
type: 'image/webp',
|
||||
alt: 'Image 1',
|
||||
}
|
||||
: undefined,
|
||||
url: routes.project({ id: project.id }),
|
||||
}}
|
||||
/>
|
||||
<Project project={project} />
|
||||
</>
|
||||
)
|
||||
|
@ -1,9 +1,11 @@
|
||||
import type { FindProjects, FindProjectsVariables } from 'types/graphql'
|
||||
|
||||
import type {
|
||||
CellSuccessProps,
|
||||
CellFailureProps,
|
||||
TypedDocumentNode,
|
||||
import { routes } from '@redwoodjs/router'
|
||||
import {
|
||||
type CellSuccessProps,
|
||||
type CellFailureProps,
|
||||
type TypedDocumentNode,
|
||||
Metadata,
|
||||
} from '@redwoodjs/web'
|
||||
|
||||
import CellEmpty from 'src/components/Cell/CellEmpty/CellEmpty'
|
||||
@ -40,5 +42,16 @@ export const Failure = ({ error }: CellFailureProps<FindProjectsVariables>) => (
|
||||
export const Success = ({
|
||||
projects,
|
||||
}: CellSuccessProps<FindProjects, FindProjectsVariables>) => (
|
||||
<>
|
||||
<Metadata
|
||||
title="Projects"
|
||||
og={{
|
||||
title: 'Projects',
|
||||
type: 'website',
|
||||
description: `${projects.length} projects`,
|
||||
url: routes.projects(),
|
||||
}}
|
||||
/>
|
||||
<ProjectsShowcase projects={projects} />
|
||||
</>
|
||||
)
|
||||
|
@ -1,9 +1,11 @@
|
||||
import type { FindResume, FindResumeVariables } from 'types/graphql'
|
||||
|
||||
import type {
|
||||
CellSuccessProps,
|
||||
CellFailureProps,
|
||||
TypedDocumentNode,
|
||||
import { routes } from '@redwoodjs/router'
|
||||
import {
|
||||
type CellSuccessProps,
|
||||
type CellFailureProps,
|
||||
type TypedDocumentNode,
|
||||
Metadata,
|
||||
} from '@redwoodjs/web'
|
||||
|
||||
import CellEmpty from 'src/components/Cell/CellEmpty/CellEmpty'
|
||||
@ -29,5 +31,15 @@ export const Failure = ({ error }: CellFailureProps<FindResumeVariables>) => (
|
||||
export const Success = ({
|
||||
resume,
|
||||
}: CellSuccessProps<FindResume, FindResumeVariables>) => (
|
||||
<>
|
||||
<Metadata
|
||||
title="Contact"
|
||||
og={{
|
||||
title: 'Resume',
|
||||
type: 'website',
|
||||
url: routes.resume(),
|
||||
}}
|
||||
/>
|
||||
<Resume resume={resume} />
|
||||
</>
|
||||
)
|
||||
|
@ -1,7 +1,5 @@
|
||||
import { useEffect, useRef, useState } from 'react'
|
||||
|
||||
import { Metadata } from '@redwoodjs/web'
|
||||
|
||||
import ContactCardCell from 'src/components/ContactCard/ContactCardCell'
|
||||
|
||||
const ContactPage = () => {
|
||||
@ -29,13 +27,9 @@ const ContactPage = () => {
|
||||
}, [width, height])
|
||||
|
||||
return (
|
||||
<>
|
||||
<Metadata title="Contact" />
|
||||
|
||||
<div className="flex min-h-[calc(100vh-6rem)] items-center justify-center">
|
||||
<ContactCardCell />
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,15 @@ import { getLogoComponent } from 'src/lib/handle'
|
||||
|
||||
const HomePage = () => (
|
||||
<>
|
||||
<Metadata title="Home" />
|
||||
<Metadata
|
||||
title="Home"
|
||||
og={{
|
||||
title: `${process.env.FIRST_NAME} ${process.env.LAST_NAME}`,
|
||||
description: 'Check out my portfolio!',
|
||||
type: 'website',
|
||||
url: routes.home(),
|
||||
}}
|
||||
/>
|
||||
|
||||
<div className="hero min-h-[calc(100vh-6rem)]">
|
||||
<div className="hero-content flex flex-col gap-8">
|
||||
|
@ -1,5 +1,3 @@
|
||||
import { Metadata } from '@redwoodjs/web'
|
||||
|
||||
import ProjectCell from 'src/components/Project/ProjectCell'
|
||||
|
||||
interface ProjectPageProps {
|
||||
@ -7,13 +5,7 @@ interface ProjectPageProps {
|
||||
}
|
||||
|
||||
const ProjectPage = ({ id }: ProjectPageProps) => {
|
||||
return (
|
||||
<>
|
||||
<Metadata title="Project" />
|
||||
|
||||
<ProjectCell id={id} />
|
||||
</>
|
||||
)
|
||||
return <ProjectCell id={id} />
|
||||
}
|
||||
|
||||
export default ProjectPage
|
||||
|
@ -1,14 +1,10 @@
|
||||
import mobile from 'is-mobile'
|
||||
|
||||
import { Metadata } from '@redwoodjs/web'
|
||||
|
||||
import ProjectsShowcaseCell from 'src/components/Project/ProjectsShowcaseCell'
|
||||
|
||||
const ProjectsPage = () => {
|
||||
return (
|
||||
<>
|
||||
<Metadata title="Projects" />
|
||||
|
||||
<div className="hero min-h-64">
|
||||
<div className="hero-content">
|
||||
<div className="max-w-md text-center">
|
||||
|
@ -1,15 +1,7 @@
|
||||
import { Metadata } from '@redwoodjs/web'
|
||||
|
||||
import ResumeCell from 'src/components/Resume/ResumeCell'
|
||||
|
||||
const ResumePage = () => {
|
||||
return (
|
||||
<>
|
||||
<Metadata title="Resume" />
|
||||
|
||||
<ResumeCell />
|
||||
</>
|
||||
)
|
||||
return <ResumeCell />
|
||||
}
|
||||
|
||||
export default ResumePage
|
||||
|
Reference in New Issue
Block a user