mirror of
https://github.com/r-freeman/portfolio.git
synced 2025-06-27 22:20:20 +00:00
Clean up stuff
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m9s
All checks were successful
Build And Publish / BuildAndPublish (push) Successful in 3m9s
This commit is contained in:
parent
f6331e435a
commit
400e199c15
@ -3,7 +3,7 @@ import {Feed} from 'feed'
|
|||||||
import {getAllArticles} from '@/lib/getAllArticles'
|
import {getAllArticles} from '@/lib/getAllArticles'
|
||||||
|
|
||||||
export async function GET(req: NextRequest) {
|
export async function GET(req: NextRequest) {
|
||||||
let siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? ""
|
let siteUrl = process.env.NEXT_PUBLIC_SITE_URL ?? ''
|
||||||
let articles = await getAllArticles()
|
let articles = await getAllArticles()
|
||||||
let author = {
|
let author = {
|
||||||
name: 'Ryan Freeman',
|
name: 'Ryan Freeman',
|
||||||
|
@ -86,7 +86,7 @@ export default async function Reading() {
|
|||||||
title: 'HTML and CSS',
|
title: 'HTML and CSS',
|
||||||
author: 'Jon Duckett',
|
author: 'Jon Duckett',
|
||||||
url: 'https://www.goodreads.com/book/show/10361330-html-and-css?from_search=true&from_srp=true&qid=OKIiricQbD&rank=1'
|
url: 'https://www.goodreads.com/book/show/10361330-html-and-css?from_search=true&from_srp=true&qid=OKIiricQbD&rank=1'
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
import { MetadataRoute } from 'next'
|
import {MetadataRoute} from 'next'
|
||||||
|
|
||||||
export default function robots(): MetadataRoute.Robots {
|
export default function robots(): MetadataRoute.Robots {
|
||||||
return {
|
return {
|
||||||
rules: {
|
rules: {
|
||||||
userAgent: '*',
|
userAgent: '*',
|
||||||
allow: '/',
|
allow: '/',
|
||||||
disallow: '/private/',
|
disallow: '/private/'
|
||||||
},
|
},
|
||||||
sitemap: 'https://ryanfreeman.dev/sitemap.xml',
|
sitemap: 'https://ryanfreeman.dev/sitemap.xml'
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
export function formatDate(dateString: string) {
|
export function formatDate(dateString: string) {
|
||||||
return new Date(`${dateString}T00:00:00Z`).toLocaleDateString('en-IE', {
|
return new Date(`${dateString}`).toLocaleDateString('en-IE', {
|
||||||
day: 'numeric',
|
day: 'numeric',
|
||||||
month: 'long',
|
month: 'long',
|
||||||
year: 'numeric',
|
year: 'numeric',
|
||||||
timeZone: 'UTC',
|
timeZone: 'UTC'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -8,13 +8,13 @@ async function importArticle(articleFilename: string) {
|
|||||||
return {
|
return {
|
||||||
slug: articleFilename.replace(/(\/page)?\.mdx$/, ''),
|
slug: articleFilename.replace(/(\/page)?\.mdx$/, ''),
|
||||||
...meta,
|
...meta,
|
||||||
component,
|
component
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getAllArticles(dateDesc = true) {
|
export async function getAllArticles(dateDesc = true) {
|
||||||
let articleFilenames = await glob(['*.mdx', '*/page.mdx'], {
|
let articleFilenames = await glob(['*.mdx', '*/page.mdx'], {
|
||||||
cwd: path.join(process.cwd(), './app/writing'),
|
cwd: path.join(process.cwd(), './app/writing')
|
||||||
})
|
})
|
||||||
|
|
||||||
let articles = await Promise.all(articleFilenames.map(importArticle))
|
let articles = await Promise.all(articleFilenames.map(importArticle))
|
||||||
|
@ -3,7 +3,7 @@ import fetcher from '@/lib/fetcher'
|
|||||||
|
|
||||||
const GITHUB_ACCESS_TOKEN = process.env.GITHUB_ACCESS_TOKEN
|
const GITHUB_ACCESS_TOKEN = process.env.GITHUB_ACCESS_TOKEN
|
||||||
const GITHUB_USERNAME = process.env.GITHUB_USERNAME
|
const GITHUB_USERNAME = process.env.GITHUB_USERNAME
|
||||||
const GITHUB_GRAPHQL = "https://api.github.com/graphql"
|
const GITHUB_GRAPHQL = 'https://api.github.com/graphql'
|
||||||
|
|
||||||
type PinnedReposResponse = {
|
type PinnedReposResponse = {
|
||||||
data: {
|
data: {
|
||||||
|
@ -3,9 +3,9 @@ import fetch from 'node-fetch'
|
|||||||
const SPOTIFY_CLIENT_ID = process.env.SPOTIFY_CLIENT_ID
|
const SPOTIFY_CLIENT_ID = process.env.SPOTIFY_CLIENT_ID
|
||||||
const SPOTIFY_CLIENT_SECRET = process.env.SPOTIFY_CLIENT_SECRET
|
const SPOTIFY_CLIENT_SECRET = process.env.SPOTIFY_CLIENT_SECRET
|
||||||
const SPOTIFY_REFRESH_TOKEN = process.env.SPOTIFY_REFRESH_TOKEN
|
const SPOTIFY_REFRESH_TOKEN = process.env.SPOTIFY_REFRESH_TOKEN
|
||||||
const SPOTIFY_TOKEN = "https://accounts.spotify.com/api/token"
|
const SPOTIFY_TOKEN = 'https://accounts.spotify.com/api/token'
|
||||||
const SPOTIFY_CURRENTLY_PLAYING = "https://api.spotify.com/v1/me/player/currently-playing"
|
const SPOTIFY_CURRENTLY_PLAYING = 'https://api.spotify.com/v1/me/player/currently-playing'
|
||||||
const SPOTIFY_RECENTLY_PLAYED = "https://api.spotify.com/v1/me/player/recently-played"
|
const SPOTIFY_RECENTLY_PLAYED = 'https://api.spotify.com/v1/me/player/recently-played'
|
||||||
|
|
||||||
const basic = Buffer.from(`${SPOTIFY_CLIENT_ID}:${SPOTIFY_CLIENT_SECRET}`).toString('base64')
|
const basic = Buffer.from(`${SPOTIFY_CLIENT_ID}:${SPOTIFY_CLIENT_SECRET}`).toString('base64')
|
||||||
|
|
||||||
@ -22,7 +22,7 @@ const getAccessToken = async () => {
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Basic ${basic}`,
|
Authorization: `Basic ${basic}`,
|
||||||
'Content-Type': 'application/x-www-form-urlencoded',
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
},
|
},
|
||||||
body: new URLSearchParams({
|
body: new URLSearchParams({
|
||||||
'grant_type': 'refresh_token',
|
'grant_type': 'refresh_token',
|
||||||
|
@ -9,10 +9,10 @@ import {Heading} from './components/ui/Heading'
|
|||||||
// This file is required to use MDX in `app` directory.
|
// This file is required to use MDX in `app` directory.
|
||||||
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
export function useMDXComponents(components: MDXComponents): MDXComponents {
|
||||||
return {
|
return {
|
||||||
h2: ({children}) => <Heading as='h2'>{children}</Heading>,
|
h2: ({children}) => <Heading as="h2">{children}</Heading>,
|
||||||
h3: ({children}) => <Heading as='h3'>{children}</Heading>,
|
h3: ({children}) => <Heading as="h3">{children}</Heading>,
|
||||||
// Allows customizing built-in components, e.g. to add styling.
|
// Allows customizing built-in components, e.g. to add styling.
|
||||||
// h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
|
// h1: ({ children }) => <h1 style={{ fontSize: "100px" }}>{children}</h1>,
|
||||||
...components,
|
...components
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -33,7 +33,7 @@ export default {
|
|||||||
'6xl': ['3.75rem', {lineHeight: '1'}],
|
'6xl': ['3.75rem', {lineHeight: '1'}],
|
||||||
'7xl': ['4.5rem', {lineHeight: '1'}],
|
'7xl': ['4.5rem', {lineHeight: '1'}],
|
||||||
'8xl': ['6rem', {lineHeight: '1'}],
|
'8xl': ['6rem', {lineHeight: '1'}],
|
||||||
'9xl': ['8rem', {lineHeight: '1'}],
|
'9xl': ['8rem', {lineHeight: '1'}]
|
||||||
},
|
},
|
||||||
typography: (theme: any) => ({
|
typography: (theme: any) => ({
|
||||||
invert: {
|
invert: {
|
||||||
@ -57,8 +57,8 @@ export default {
|
|||||||
'--tw-prose-pre-bg': 'var(--tw-prose-invert-pre-bg)',
|
'--tw-prose-pre-bg': 'var(--tw-prose-invert-pre-bg)',
|
||||||
'--tw-prose-pre-border': 'var(--tw-prose-invert-pre-border)',
|
'--tw-prose-pre-border': 'var(--tw-prose-invert-pre-border)',
|
||||||
'--tw-prose-th-borders': 'var(--tw-prose-invert-th-borders)',
|
'--tw-prose-th-borders': 'var(--tw-prose-invert-th-borders)',
|
||||||
'--tw-prose-td-borders': 'var(--tw-prose-invert-td-borders)',
|
'--tw-prose-td-borders': 'var(--tw-prose-invert-td-borders)'
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
DEFAULT: {
|
DEFAULT: {
|
||||||
css: {
|
css: {
|
||||||
@ -107,37 +107,37 @@ export default {
|
|||||||
lineHeight: theme('lineHeight.7'),
|
lineHeight: theme('lineHeight.7'),
|
||||||
'> *': {
|
'> *': {
|
||||||
marginTop: theme('spacing.10'),
|
marginTop: theme('spacing.10'),
|
||||||
marginBottom: theme('spacing.10'),
|
marginBottom: theme('spacing.10')
|
||||||
},
|
},
|
||||||
p: {
|
p: {
|
||||||
marginTop: theme('spacing.7'),
|
marginTop: theme('spacing.7'),
|
||||||
marginBottom: theme('spacing.7'),
|
marginBottom: theme('spacing.7')
|
||||||
},
|
},
|
||||||
|
|
||||||
// Headings
|
// Headings
|
||||||
'h2, h3': {
|
'h2, h3': {
|
||||||
color: 'var(--tw-prose-headings)',
|
color: 'var(--tw-prose-headings)',
|
||||||
fontWeight: theme('fontWeight.semibold'),
|
fontWeight: theme('fontWeight.semibold')
|
||||||
},
|
},
|
||||||
h2: {
|
h2: {
|
||||||
fontSize: theme('fontSize.xl')[0],
|
fontSize: theme('fontSize.xl')[0],
|
||||||
lineHeight: theme('lineHeight.7'),
|
lineHeight: theme('lineHeight.7'),
|
||||||
marginTop: theme('spacing.20'),
|
marginTop: theme('spacing.20'),
|
||||||
marginBottom: theme('spacing.4'),
|
marginBottom: theme('spacing.4')
|
||||||
},
|
},
|
||||||
h3: {
|
h3: {
|
||||||
fontSize: theme('fontSize.base')[0],
|
fontSize: theme('fontSize.base')[0],
|
||||||
lineHeight: theme('lineHeight.7'),
|
lineHeight: theme('lineHeight.7'),
|
||||||
marginTop: theme('spacing.16'),
|
marginTop: theme('spacing.16'),
|
||||||
marginBottom: theme('spacing.4'),
|
marginBottom: theme('spacing.4')
|
||||||
},
|
},
|
||||||
':is(h2, h3) + *': {
|
':is(h2, h3) + *': {
|
||||||
marginTop: 0,
|
marginTop: 0
|
||||||
},
|
},
|
||||||
|
|
||||||
// Images
|
// Images
|
||||||
img: {
|
img: {
|
||||||
borderRadius: theme('borderRadius.3xl'),
|
borderRadius: theme('borderRadius.3xl')
|
||||||
},
|
},
|
||||||
|
|
||||||
// Inline elements
|
// Inline elements
|
||||||
@ -148,15 +148,15 @@ export default {
|
|||||||
textDecorationColor: 'var(--tw-prose-underline)',
|
textDecorationColor: 'var(--tw-prose-underline)',
|
||||||
transitionProperty: 'color, text-decoration-color',
|
transitionProperty: 'color, text-decoration-color',
|
||||||
transitionDuration: theme('transitionDuration.150'),
|
transitionDuration: theme('transitionDuration.150'),
|
||||||
transitionTimingFunction: theme('transitionTimingFunction.in-out'),
|
transitionTimingFunction: theme('transitionTimingFunction.in-out')
|
||||||
},
|
},
|
||||||
'a:hover': {
|
'a:hover': {
|
||||||
color: 'var(--tw-prose-links-hover)',
|
color: 'var(--tw-prose-links-hover)',
|
||||||
textDecorationColor: 'var(--tw-prose-underline-hover)',
|
textDecorationColor: 'var(--tw-prose-underline-hover)'
|
||||||
},
|
},
|
||||||
strong: {
|
strong: {
|
||||||
color: 'var(--tw-prose-bold)',
|
color: 'var(--tw-prose-bold)',
|
||||||
fontWeight: theme('fontWeight.semibold'),
|
fontWeight: theme('fontWeight.semibold')
|
||||||
},
|
},
|
||||||
code: {
|
code: {
|
||||||
display: 'inline-block',
|
display: 'inline-block',
|
||||||
@ -166,13 +166,13 @@ export default {
|
|||||||
backgroundColor: 'var(--tw-prose-code-bg)',
|
backgroundColor: 'var(--tw-prose-code-bg)',
|
||||||
borderRadius: theme('borderRadius.lg'),
|
borderRadius: theme('borderRadius.lg'),
|
||||||
paddingLeft: theme('spacing.1'),
|
paddingLeft: theme('spacing.1'),
|
||||||
paddingRight: theme('spacing.1'),
|
paddingRight: theme('spacing.1')
|
||||||
},
|
},
|
||||||
'a code': {
|
'a code': {
|
||||||
color: 'inherit',
|
color: 'inherit'
|
||||||
},
|
},
|
||||||
':is(h2, h3) code': {
|
':is(h2, h3) code': {
|
||||||
fontWeight: theme('fontWeight.bold'),
|
fontWeight: theme('fontWeight.bold')
|
||||||
},
|
},
|
||||||
|
|
||||||
// Quotes
|
// Quotes
|
||||||
@ -180,7 +180,7 @@ export default {
|
|||||||
paddingLeft: theme('spacing.6'),
|
paddingLeft: theme('spacing.6'),
|
||||||
borderLeftWidth: theme('borderWidth.2'),
|
borderLeftWidth: theme('borderWidth.2'),
|
||||||
borderLeftColor: 'var(--tw-prose-quote-borders)',
|
borderLeftColor: 'var(--tw-prose-quote-borders)',
|
||||||
fontStyle: 'italic',
|
fontStyle: 'italic'
|
||||||
},
|
},
|
||||||
|
|
||||||
// Figures
|
// Figures
|
||||||
@ -188,44 +188,44 @@ export default {
|
|||||||
color: 'var(--tw-prose-captions)',
|
color: 'var(--tw-prose-captions)',
|
||||||
fontSize: theme('fontSize.sm')[0],
|
fontSize: theme('fontSize.sm')[0],
|
||||||
lineHeight: theme('lineHeight.6'),
|
lineHeight: theme('lineHeight.6'),
|
||||||
marginTop: theme('spacing.3'),
|
marginTop: theme('spacing.3')
|
||||||
},
|
},
|
||||||
'figcaption > p': {
|
'figcaption > p': {
|
||||||
margin: 0,
|
margin: 0
|
||||||
},
|
},
|
||||||
|
|
||||||
// Lists
|
// Lists
|
||||||
ul: {
|
ul: {
|
||||||
listStyleType: 'disc',
|
listStyleType: 'disc'
|
||||||
},
|
},
|
||||||
ol: {
|
ol: {
|
||||||
listStyleType: 'decimal',
|
listStyleType: 'decimal'
|
||||||
},
|
},
|
||||||
'ul, ol': {
|
'ul, ol': {
|
||||||
paddingLeft: theme('spacing.6'),
|
paddingLeft: theme('spacing.6')
|
||||||
},
|
},
|
||||||
li: {
|
li: {
|
||||||
marginTop: theme('spacing.6'),
|
marginTop: theme('spacing.6'),
|
||||||
marginBottom: theme('spacing.6'),
|
marginBottom: theme('spacing.6'),
|
||||||
paddingLeft: theme('spacing[3.5]'),
|
paddingLeft: theme('spacing[3.5]')
|
||||||
},
|
},
|
||||||
'li::marker': {
|
'li::marker': {
|
||||||
fontSize: theme('fontSize.sm')[0],
|
fontSize: theme('fontSize.sm')[0],
|
||||||
fontWeight: theme('fontWeight.semibold'),
|
fontWeight: theme('fontWeight.semibold')
|
||||||
},
|
},
|
||||||
'ol > li::marker': {
|
'ol > li::marker': {
|
||||||
color: 'var(--tw-prose-counters)',
|
color: 'var(--tw-prose-counters)'
|
||||||
},
|
},
|
||||||
'ul > li::marker': {
|
'ul > li::marker': {
|
||||||
color: 'var(--tw-prose-bullets)',
|
color: 'var(--tw-prose-bullets)'
|
||||||
},
|
},
|
||||||
'li :is(ol, ul)': {
|
'li :is(ol, ul)': {
|
||||||
marginTop: theme('spacing.4'),
|
marginTop: theme('spacing.4'),
|
||||||
marginBottom: theme('spacing.4'),
|
marginBottom: theme('spacing.4')
|
||||||
},
|
},
|
||||||
'li :is(li, p)': {
|
'li :is(li, p)': {
|
||||||
marginTop: theme('spacing.3'),
|
marginTop: theme('spacing.3'),
|
||||||
marginBottom: theme('spacing.3'),
|
marginBottom: theme('spacing.3')
|
||||||
},
|
},
|
||||||
|
|
||||||
// Code blocks
|
// Code blocks
|
||||||
@ -238,7 +238,7 @@ export default {
|
|||||||
padding: theme('spacing.8'),
|
padding: theme('spacing.8'),
|
||||||
overflowX: 'auto',
|
overflowX: 'auto',
|
||||||
border: '1px solid',
|
border: '1px solid',
|
||||||
borderColor: 'var(--tw-prose-pre-border)',
|
borderColor: 'var(--tw-prose-pre-border)'
|
||||||
},
|
},
|
||||||
'pre code': {
|
'pre code': {
|
||||||
display: 'inline',
|
display: 'inline',
|
||||||
@ -247,7 +247,7 @@ export default {
|
|||||||
fontWeight: 'inherit',
|
fontWeight: 'inherit',
|
||||||
backgroundColor: 'transparent',
|
backgroundColor: 'transparent',
|
||||||
borderRadius: 0,
|
borderRadius: 0,
|
||||||
padding: 0,
|
padding: 0
|
||||||
},
|
},
|
||||||
|
|
||||||
// Horizontal rules
|
// Horizontal rules
|
||||||
@ -258,8 +258,8 @@ export default {
|
|||||||
borderColor: 'var(--tw-prose-hr)',
|
borderColor: 'var(--tw-prose-hr)',
|
||||||
'@screen lg': {
|
'@screen lg': {
|
||||||
marginLeft: `calc(${theme('spacing.12')} * -1)`,
|
marginLeft: `calc(${theme('spacing.12')} * -1)`,
|
||||||
marginRight: `calc(${theme('spacing.12')} * -1)`,
|
marginRight: `calc(${theme('spacing.12')} * -1)`
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
// Tables
|
// Tables
|
||||||
@ -267,54 +267,54 @@ export default {
|
|||||||
width: '100%',
|
width: '100%',
|
||||||
tableLayout: 'auto',
|
tableLayout: 'auto',
|
||||||
textAlign: 'left',
|
textAlign: 'left',
|
||||||
fontSize: theme('fontSize.sm')[0],
|
fontSize: theme('fontSize.sm')[0]
|
||||||
},
|
},
|
||||||
thead: {
|
thead: {
|
||||||
borderBottomWidth: '1px',
|
borderBottomWidth: '1px',
|
||||||
borderBottomColor: 'var(--tw-prose-th-borders)',
|
borderBottomColor: 'var(--tw-prose-th-borders)'
|
||||||
},
|
},
|
||||||
'thead th': {
|
'thead th': {
|
||||||
color: 'var(--tw-prose-headings)',
|
color: 'var(--tw-prose-headings)',
|
||||||
fontWeight: theme('fontWeight.semibold'),
|
fontWeight: theme('fontWeight.semibold'),
|
||||||
verticalAlign: 'bottom',
|
verticalAlign: 'bottom',
|
||||||
paddingBottom: theme('spacing.2'),
|
paddingBottom: theme('spacing.2')
|
||||||
},
|
},
|
||||||
'thead th:not(:first-child)': {
|
'thead th:not(:first-child)': {
|
||||||
paddingLeft: theme('spacing.2'),
|
paddingLeft: theme('spacing.2')
|
||||||
},
|
},
|
||||||
'thead th:not(:last-child)': {
|
'thead th:not(:last-child)': {
|
||||||
paddingRight: theme('spacing.2'),
|
paddingRight: theme('spacing.2')
|
||||||
},
|
},
|
||||||
'tbody tr': {
|
'tbody tr': {
|
||||||
borderBottomWidth: '1px',
|
borderBottomWidth: '1px',
|
||||||
borderBottomColor: 'var(--tw-prose-td-borders)',
|
borderBottomColor: 'var(--tw-prose-td-borders)'
|
||||||
},
|
},
|
||||||
'tbody tr:last-child': {
|
'tbody tr:last-child': {
|
||||||
borderBottomWidth: 0,
|
borderBottomWidth: 0
|
||||||
},
|
},
|
||||||
'tbody td': {
|
'tbody td': {
|
||||||
verticalAlign: 'baseline',
|
verticalAlign: 'baseline'
|
||||||
},
|
},
|
||||||
tfoot: {
|
tfoot: {
|
||||||
borderTopWidth: '1px',
|
borderTopWidth: '1px',
|
||||||
borderTopColor: 'var(--tw-prose-th-borders)',
|
borderTopColor: 'var(--tw-prose-th-borders)'
|
||||||
},
|
},
|
||||||
'tfoot td': {
|
'tfoot td': {
|
||||||
verticalAlign: 'top',
|
verticalAlign: 'top'
|
||||||
},
|
},
|
||||||
':is(tbody, tfoot) td': {
|
':is(tbody, tfoot) td': {
|
||||||
paddingTop: theme('spacing.2'),
|
paddingTop: theme('spacing.2'),
|
||||||
paddingBottom: theme('spacing.2'),
|
paddingBottom: theme('spacing.2')
|
||||||
},
|
},
|
||||||
':is(tbody, tfoot) td:not(:first-child)': {
|
':is(tbody, tfoot) td:not(:first-child)': {
|
||||||
paddingLeft: theme('spacing.2'),
|
paddingLeft: theme('spacing.2')
|
||||||
},
|
},
|
||||||
':is(tbody, tfoot) td:not(:last-child)': {
|
':is(tbody, tfoot) td:not(:last-child)': {
|
||||||
paddingRight: theme('spacing.2'),
|
paddingRight: theme('spacing.2')
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
}),
|
})
|
||||||
},
|
}
|
||||||
} satisfies Config
|
} satisfies Config
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user