upstream #1
@ -31,7 +31,7 @@ const BlogSeo = ({ title, summary, date, url, image }) => {
|
|||||||
datePublished={publishedAt}
|
datePublished={publishedAt}
|
||||||
description={summary}
|
description={summary}
|
||||||
images={[featuredImage]}
|
images={[featuredImage]}
|
||||||
publisherLogo="/static/favicons/android-chrome-192x192.png"
|
publisherLogo="/static/favicons/android-chrome-96x96.png"
|
||||||
publisherName={siteMetadata.author}
|
publisherName={siteMetadata.author}
|
||||||
title={title}
|
title={title}
|
||||||
url={url}
|
url={url}
|
||||||
|
@ -21,9 +21,8 @@ const MobileNav = () => {
|
|||||||
<div className="sm:hidden">
|
<div className="sm:hidden">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="rounded ml-1 mr-1 h-8 w-8 focus:outline-none"
|
className="rounded ml-1 mr-1 h-8 w-8"
|
||||||
aria-label="Toggle Menu"
|
aria-label="Toggle Menu"
|
||||||
aria-hidden={!navShow}
|
|
||||||
onClick={onToggleNav}
|
onClick={onToggleNav}
|
||||||
>
|
>
|
||||||
<svg
|
<svg
|
||||||
@ -54,6 +53,7 @@ const MobileNav = () => {
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
aria-label="toggle modal"
|
||||||
className="w-full h-full fixed cursor-auto focus:outline-none"
|
className="w-full h-full fixed cursor-auto focus:outline-none"
|
||||||
onClick={onToggleNav}
|
onClick={onToggleNav}
|
||||||
></button>
|
></button>
|
||||||
|
@ -3,7 +3,6 @@ import siteMetadata from '@/data/siteMetadata'
|
|||||||
const SEO = {
|
const SEO = {
|
||||||
title: siteMetadata.title,
|
title: siteMetadata.title,
|
||||||
description: siteMetadata.description,
|
description: siteMetadata.description,
|
||||||
canonical: siteMetadata.siteUrl,
|
|
||||||
openGraph: {
|
openGraph: {
|
||||||
type: 'website',
|
type: 'website',
|
||||||
locale: siteMetadata.language,
|
locale: siteMetadata.language,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
import Link from 'next/link'
|
|
||||||
import tinytime from 'tinytime'
|
import tinytime from 'tinytime'
|
||||||
|
import Link from '@/components/Link'
|
||||||
import Tag from '@/components/Tag'
|
import Tag from '@/components/Tag'
|
||||||
|
|
||||||
const postDateTemplate = tinytime('{MMMM} {DD}, {YYYY}')
|
const postDateTemplate = tinytime('{MMMM} {DD}, {YYYY}')
|
||||||
@ -58,11 +58,11 @@ export default function ListLayout({ posts, title }) {
|
|||||||
<div className="space-y-3 xl:col-span-3">
|
<div className="space-y-3 xl:col-span-3">
|
||||||
<div>
|
<div>
|
||||||
<h3 className="text-2xl leading-8 font-bold tracking-tight">
|
<h3 className="text-2xl leading-8 font-bold tracking-tight">
|
||||||
<Link href={`/blog/${slug}`}>
|
<Link href={`/blog/${slug}`} className="text-gray-900 dark:text-gray-100">
|
||||||
<a className="text-gray-900 dark:text-gray-100">{title}</a>
|
{title}
|
||||||
</Link>
|
</Link>
|
||||||
</h3>
|
</h3>
|
||||||
<div className="space-x-2">
|
<div className="space-x-3">
|
||||||
{tags.map((tag) => (
|
{tags.map((tag) => (
|
||||||
<Tag key={tag} text={tag} />
|
<Tag key={tag} text={tag} />
|
||||||
))}
|
))}
|
||||||
|
@ -80,7 +80,7 @@ export default function PostLayout({ children, frontMatter, next, prev }) {
|
|||||||
<h2 className="text-xs tracking-wide uppercase text-gray-500 dark:text-gray-400">
|
<h2 className="text-xs tracking-wide uppercase text-gray-500 dark:text-gray-400">
|
||||||
Tags
|
Tags
|
||||||
</h2>
|
</h2>
|
||||||
<div className="space-x-2 xl:flex xl:flex-col xl:space-x-0">
|
<div className="space-x-3 xl:flex xl:flex-col xl:space-x-0">
|
||||||
{tags.map((tag) => (
|
{tags.map((tag) => (
|
||||||
<Tag key={tag} text={tag} />
|
<Tag key={tag} text={tag} />
|
||||||
))}
|
))}
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import tinytime from 'tinytime'
|
import tinytime from 'tinytime'
|
||||||
import Link from 'next/link'
|
import { NextSeo } from 'next-seo'
|
||||||
import { getAllFilesFrontMatter } from '@/lib/mdx'
|
import { getAllFilesFrontMatter } from '@/lib/mdx'
|
||||||
import siteMetadata from '@/data/siteMetadata'
|
import siteMetadata from '@/data/siteMetadata'
|
||||||
import Tag from '@/components/Tag'
|
import Tag from '@/components/Tag'
|
||||||
|
import Link from '@/components/Link'
|
||||||
|
|
||||||
const MAX_DISPLAY = 5
|
const MAX_DISPLAY = 5
|
||||||
const postDateTemplate = tinytime('{MMMM} {DD}, {YYYY}')
|
const postDateTemplate = tinytime('{MMMM} {DD}, {YYYY}')
|
||||||
@ -15,7 +16,16 @@ export async function getStaticProps() {
|
|||||||
|
|
||||||
export default function Home({ posts }) {
|
export default function Home({ posts }) {
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
|
<NextSeo
|
||||||
|
title={siteMetadata.title}
|
||||||
|
description={siteMetadata.description}
|
||||||
|
canonical={siteMetadata.siteUrl}
|
||||||
|
openGraph={{
|
||||||
|
url: siteMetadata.siteUrl,
|
||||||
|
description: siteMetadata.description,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
<div className="divide-y divide-gray-200 dark:divide-gray-700">
|
||||||
<div className="pt-6 pb-8 space-y-2 md:space-y-5">
|
<div className="pt-6 pb-8 space-y-2 md:space-y-5">
|
||||||
<h1 className="text-3xl leading-9 font-extrabold text-gray-900 dark:text-gray-100 tracking-tight sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
<h1 className="text-3xl leading-9 font-extrabold text-gray-900 dark:text-gray-100 tracking-tight sm:text-4xl sm:leading-10 md:text-6xl md:leading-14">
|
||||||
@ -42,11 +52,11 @@ export default function Home({ posts }) {
|
|||||||
<div className="space-y-6">
|
<div className="space-y-6">
|
||||||
<div>
|
<div>
|
||||||
<h2 className="text-2xl leading-8 font-bold tracking-tight">
|
<h2 className="text-2xl leading-8 font-bold tracking-tight">
|
||||||
<Link href={`/blog/${slug}`}>
|
<Link href={`/blog/${slug}`} className="text-gray-900 dark:text-gray-100">
|
||||||
<a className="text-gray-900 dark:text-gray-100">{title}</a>
|
{title}
|
||||||
</Link>
|
</Link>
|
||||||
</h2>
|
</h2>
|
||||||
<div className="space-x-2">
|
<div className="space-x-3">
|
||||||
{tags.map((tag) => (
|
{tags.map((tag) => (
|
||||||
<Tag key={tag} text={tag} />
|
<Tag key={tag} text={tag} />
|
||||||
))}
|
))}
|
||||||
@ -57,13 +67,12 @@ export default function Home({ posts }) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="text-base leading-6 font-medium">
|
<div className="text-base leading-6 font-medium">
|
||||||
<Link href={`/blog/${slug}`}>
|
<Link
|
||||||
<a
|
href={`/blog/${slug}`}
|
||||||
className="text-blue-500 hover:text-blue-600 dark:hover:text-blue-400"
|
className="text-blue-500 hover:text-blue-600 dark:hover:text-blue-400"
|
||||||
aria-label={`Read "${title}"`}
|
aria-label={`Read "${title}"`}
|
||||||
>
|
>
|
||||||
Read more →
|
Read more →
|
||||||
</a>
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -85,6 +94,6 @@ export default function Home({ posts }) {
|
|||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import Link from 'next/link'
|
|
||||||
import kebabCase from 'just-kebab-case'
|
import kebabCase from 'just-kebab-case'
|
||||||
import { NextSeo } from 'next-seo'
|
import { NextSeo } from 'next-seo'
|
||||||
import siteMetadata from '@/data/siteMetadata'
|
import siteMetadata from '@/data/siteMetadata'
|
||||||
import { getAllTags } from '@/lib/tags'
|
import { getAllTags } from '@/lib/tags'
|
||||||
import Tag from '@/components/Tag'
|
import Tag from '@/components/Tag'
|
||||||
|
import Link from '@/components/Link'
|
||||||
|
|
||||||
export async function getStaticProps() {
|
export async function getStaticProps() {
|
||||||
const tags = await getAllTags('blog')
|
const tags = await getAllTags('blog')
|
||||||
@ -35,8 +35,11 @@ export default function Tags({ tags }) {
|
|||||||
return (
|
return (
|
||||||
<div key={t} className="m-2">
|
<div key={t} className="m-2">
|
||||||
<Tag text={t} />
|
<Tag text={t} />
|
||||||
<Link href={`/tags/${kebabCase(t)}`}>
|
<Link
|
||||||
<a className="uppercase font-semibold text-sm mx-1 text-gray-600 dark:text-gray-300">{` (${tags[t]})`}</a>
|
href={`/tags/${kebabCase(t)}`}
|
||||||
|
className="uppercase font-semibold text-sm mx-1 text-gray-600 dark:text-gray-300"
|
||||||
|
>
|
||||||
|
{` (${tags[t]})`}
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user