This commit is contained in:
Travis Fischer
2022-10-15 18:03:52 -04:00
parent 44026d9766
commit 3a229e357c
19 changed files with 56 additions and 54 deletions

View File

@@ -1,3 +1,3 @@
import { Page404 } from 'components'
import { Page404 } from '@/components'
export default Page404

View File

@@ -1,12 +1,12 @@
import * as React from 'react'
import { GetStaticProps } from 'next'
import { NotionPage } from 'components'
import { NotionPage } from '@/components'
import { domain, isDev } from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import { resolveNotionPage } from 'lib/resolve-notion-page'
import { PageProps, Params } from 'lib/types'
import { domain, isDev } from '@/lib/config'
import { getSiteMap } from '@/lib/get-site-map'
import { resolveNotionPage } from '@/lib/resolve-notion-page'
import { PageProps, Params } from '@/lib/types'
export const getStaticProps: GetStaticProps<PageProps, Params> = async (
context

View File

@@ -11,15 +11,6 @@ import posthog from 'posthog-js'
import 'prismjs/themes/prism-coy.css'
// core styles shared by all of react-notion-x (required)
import 'react-notion-x/src/styles.css'
import { bootstrap } from 'lib/bootstrap-client'
import {
fathomConfig,
fathomId,
isServer,
posthogConfig,
posthogId
} from 'lib/config'
import 'styles/global.css'
// this might be better for dark mode
// import 'prismjs/themes/prism-okaidia.css'
@@ -28,6 +19,15 @@ import 'styles/notion.css'
// global style overrides for prism theme (optional)
import 'styles/prism-theme.css'
import { bootstrap } from '@/lib/bootstrap-client'
import {
fathomConfig,
fathomId,
isServer,
posthogConfig,
posthogId
} from '@/lib/config'
if (!isServer) {
bootstrap()
}

View File

@@ -1,3 +1,3 @@
import { ErrorPage } from 'components'
import { ErrorPage } from '@/components'
export default ErrorPage

View File

@@ -9,10 +9,10 @@ import {
parsePageId
} from 'notion-utils'
import * as libConfig from 'lib/config'
import { mapImageUrl } from 'lib/map-image-url'
import { notion } from 'lib/notion-api'
import { NotionPageInfo } from 'lib/types'
import * as libConfig from '@/lib/config'
import { mapImageUrl } from '@/lib/map-image-url'
import { notion } from '@/lib/notion-api'
import { NotionPageInfo } from '@/lib/types'
export default async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method !== 'POST') {

View File

@@ -3,8 +3,8 @@ import { NextRequest } from 'next/server'
import { ImageResponse } from '@vercel/og'
import { api, apiHost } from 'lib/config'
import { NotionPageInfo } from 'lib/types'
import { api, apiHost } from '@/lib/config'
import { NotionPageInfo } from '@/lib/types'
const interRegularFontP = fetch(
new URL('../../public/fonts/Inter-Regular.ttf', import.meta.url)

View File

@@ -9,10 +9,10 @@ import {
} from 'notion-utils'
import RSS from 'rss'
import * as config from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import { getSocialImageUrl } from 'lib/get-social-image-url'
import { getCanonicalPageUrl } from 'lib/map-page-url'
import * as config from '@/lib/config'
import { getSiteMap } from '@/lib/get-site-map'
import { getSocialImageUrl } from '@/lib/get-social-image-url'
import { getCanonicalPageUrl } from '@/lib/map-page-url'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {

View File

@@ -1,9 +1,9 @@
import * as React from 'react'
import { NotionPage } from 'components'
import { NotionPage } from '@/components'
import { domain } from 'lib/config'
import { resolveNotionPage } from 'lib/resolve-notion-page'
import { domain } from '@/lib/config'
import { resolveNotionPage } from '@/lib/resolve-notion-page'
export const getStaticProps = async () => {
try {

View File

@@ -1,6 +1,6 @@
import type { GetServerSideProps } from 'next'
import { host } from 'lib/config'
import { host } from '@/lib/config'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {

View File

@@ -1,8 +1,8 @@
import type { GetServerSideProps } from 'next'
import { host } from 'lib/config'
import { getSiteMap } from 'lib/get-site-map'
import type { SiteMap } from 'lib/types'
import { host } from '@/lib/config'
import { getSiteMap } from '@/lib/get-site-map'
import type { SiteMap } from '@/lib/types'
export const getServerSideProps: GetServerSideProps = async ({ req, res }) => {
if (req.method !== 'GET') {