Skip to content

Commit

Permalink
feat: add landing page and config Seo
Browse files Browse the repository at this point in the history
  • Loading branch information
theodorusclarence committed Oct 15, 2021
1 parent 6a3c2a7 commit 2a49e71
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 250 deletions.
2 changes: 1 addition & 1 deletion next-sitemap.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = {
siteUrl: 'https://tsnext-tw.thcl.dev/',
siteUrl: 'https://og.thcl.dev/',
generateRobotsTxt: true,
robotsTxtOptions: {
policies: [{ userAgent: '*', allow: '/' }],
Expand Down
11 changes: 5 additions & 6 deletions src/components/Seo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { useRouter } from 'next/router';
import { openGraph } from '@/lib/helper';

const defaultMeta = {
title: 'Next.js + Tailwind CSS + TypeScript Starter',
site_name: 'Next.js + Tailwind CSS + TypeScript Starter',
description:
' A starter for Next.js, Tailwind CSS, and TypeScript with Absolute Import, Seo, Link component, pre-configured with Husky',
url: 'https://tsnext-tw.thcl.dev',
image: 'https://theodorusclarence.com/favicon/large-og.jpg',
title: 'Open Graph Generator',
site_name: 'Open Graph Generator',
description: 'Made for personal use by Theodorus Clarence',
url: 'https://og.thcl.dev',
image: 'https://og.thcl.dev/images/logo.jpg',
type: 'website',
robots: 'follow, index',
};
Expand Down
2 changes: 1 addition & 1 deletion src/pages/api/general.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default withOGImage<keyof typeof query>({
const query = {
title: title ?? 'Title',
description: description ?? 'Description',
logo: logo ?? 'https://theodorusclarence.com/favicon/large-og.jpg',
logo: logo ?? 'https://og.thcl.dev/images/logo.jpg',
};
return `
<html>
Expand Down
7 changes: 0 additions & 7 deletions src/pages/api/hello.ts

This file was deleted.

200 changes: 0 additions & 200 deletions src/pages/components.tsx

This file was deleted.

45 changes: 10 additions & 35 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,32 @@ import * as React from 'react';

import ButtonLink from '@/components/links/ButtonLink';
import CustomLink from '@/components/links/CustomLink';
import UnstyledLink from '@/components/links/UnstyledLink';
import Seo from '@/components/Seo';

export default function HomePage() {
return (
<>
<Seo templateTitle='Home' />
<Seo />

<main>
<section className='bg-dark'>
<div className='flex flex-col items-center justify-center min-h-screen text-center text-white layout'>
<h1>Next.js + Tailwind CSS + TypeScript Starter</h1>
<h1>Open Graph Generator</h1>
<p className='mt-2 text-sm text-gray-300'>
A starter for Next.js, Tailwind CSS, and TypeScript with Absolute
Import, Seo, Link component, pre-configured with Husky{' '}
Made for personal use using{' '}
<CustomLink href='https://github.com/neg4n/next-api-og-image'>
next-api-og-image
</CustomLink>
</p>
<p className='mt-2 text-sm text-gray-200'>
<CustomLink href='https://github.com/theodorusclarence/ts-nextjs-tailwind-starter'>
<p className='mt-4 text-sm text-gray-200'>
<ButtonLink href='https://github.com/theodorusclarence/og'>
See the repository
</CustomLink>
</ButtonLink>
</p>

<ButtonLink className='mt-6' href='/components' variant='light'>
See all components
</ButtonLink>

<UnstyledLink
href='https://vercel.com/new/git/external?repository-url=https%3A%2F%2Fgithub.com%2Ftheodorusclarence%2Fts-nextjs-tailwind-starter'
className='mt-4'
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
width='92'
height='32'
src='https://vercel.com/button'
alt='Deploy with Vercel'
/>
</UnstyledLink>

<footer className='absolute text-gray-500 bottom-2'>
© {new Date().getFullYear()} By{' '}
<CustomLink href='https://theodorusclarence.com?ref=tsnextstarter'>
<CustomLink href='https://theodorusclarence.com?ref=og'>
Theodorus Clarence
</CustomLink>
</footer>
Expand All @@ -53,12 +37,3 @@ export default function HomePage() {
</>
);
}

/**
* Default info that you should change:
* components/Seo.tsx
* next-sitemap.js
* public/favicon
*
* Please refer to the README.md
*/

0 comments on commit 2a49e71

Please sign in to comment.