Skip to content

Commit

Permalink
Use Remix v2 conventions
Browse files Browse the repository at this point in the history
Adds a bonus built-in Tailwind config and gets rid of some extraneous
dependencies as a result.
  • Loading branch information
hugo committed Aug 21, 2023
1 parent 18e6398 commit 4c1cbb4
Show file tree
Hide file tree
Showing 8 changed files with 70 additions and 2,781 deletions.
39 changes: 22 additions & 17 deletions app/root.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import type {LinksFunction, MetaFunction} from '@remix-run/node'
import type {
LinksFunction,
V2_MetaFunction as MetaFunction,
} from '@remix-run/node'
import {Links, LiveReload, Meta, Outlet, Scripts} from '@remix-run/react'

import styles from './styles/index.css'
Expand All @@ -11,25 +14,27 @@ export let links: LinksFunction = () => {
]
}

export let meta: MetaFunction = () => ({
viewport: 'width=device-width, initial-scale=1, viewport-fit=cover',
description: 'Hugo Jobling. Trying my best.',
export let meta: MetaFunction = () => [
{
viewport: 'width=device-width, initial-scale=1, viewport-fit=cover',
description: 'Hugo Jobling. Trying my best.',

'og:title': 'Hugo Jobling',
'og:site_name': 'Hugo Jobling',
'og:url': 'https://thisishugo.com',
'og:description': 'Hugo Jobling. Trying my best',
'og:profile': 'profile',
'og:image': '/images/hugo_large.jpg',
'og:title': 'Hugo Jobling',
'og:site_name': 'Hugo Jobling',
'og:url': 'https://thisishugo.com',
'og:description': 'Hugo Jobling. Trying my best',
'og:profile': 'profile',
'og:image': '/images/hugo_large.jpg',

'twitter:card': 'summary',
'twitter:site': '@dissimile',
'twitter:title': 'Hugo Jobling',
'twitter:description': 'Trying my best',
'twitter:image': '/images/hugo_large.jpg',
'twitter:card': 'summary',
'twitter:site': '@dissimile',
'twitter:title': 'Hugo Jobling',
'twitter:description': 'Trying my best',
'twitter:image': '/images/hugo_large.jpg',

'theme-color': 'rgb(75, 106, 136)',
})
'theme-color': 'rgb(75, 106, 136)',
},
]

export default function App() {
return (
Expand Down
2 changes: 1 addition & 1 deletion app/routes/index.test.tsx → app/routes/_index.test.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {render, screen} from '@testing-library/react'

import Index from './index'
import Index from './_index'

test('welcome message', () => {
render(<Index />)
Expand Down
6 changes: 2 additions & 4 deletions app/routes/index.tsx → app/routes/_index.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type {MetaFunction} from '@remix-run/node'
import type {V2_MetaFunction as MetaFunction} from '@remix-run/node'

export let meta: MetaFunction = () => ({
title: 'Hugo Jobling',
})
export let meta: MetaFunction = () => [{title: 'Hugo Jobling'}]

export default function Index() {
return (
Expand Down
Loading

0 comments on commit 4c1cbb4

Please sign in to comment.