Skip to content

Commit fa040f2

Browse files
committed
tried to revert changes
1 parent feff94a commit fa040f2

File tree

9 files changed

+4094
-191
lines changed

9 files changed

+4094
-191
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
npm-debug.log*
2727
yarn-debug.log*
2828
yarn-error.log*
29-
yarn.lock
3029

3130
# local env files
3231
.env

components/NotionPage.tsx

Lines changed: 14 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import * as React from 'react'
22
import dynamic from 'next/dynamic'
33
import Image from 'next/image'
4-
//import Link from 'next/link'
4+
import Link from 'next/link'
55
import { useRouter } from 'next/router'
66

77
import cs from 'classnames'
88
import { PageBlock } from 'notion-types'
9-
//import { formatDate, getBlockTitle, getPageProperty } from 'notion-utils'
9+
import { formatDate, getBlockTitle, getPageProperty } from 'notion-utils'
1010
import BodyClassName from 'react-body-classname'
1111
import { NotionRenderer } from 'react-notion-x'
1212
import TweetEmbed from 'react-tweet-embed'
@@ -19,15 +19,13 @@ import { getCanonicalPageUrl, mapPageUrl } from '@/lib/map-page-url'
1919
import { searchNotion } from '@/lib/search-notion'
2020
import { useDarkMode } from '@/lib/use-dark-mode'
2121

22-
// components
22+
import { Footer } from './Footer'
23+
import { GitHubShareButton } from './GitHubShareButton'
2324
import { Loading } from './Loading'
25+
import { NotionPageHeader } from './NotionPageHeader'
2426
import { Page404 } from './Page404'
27+
import { PageAside } from './PageAside'
2528
import { PageHead } from './PageHead'
26-
// import { PageAside } from './PageAside'
27-
import { Footer } from './Footer'
28-
import { NotionPageHeader } from './NotionPageHeader'
29-
// import { GitHubShareButton } from './GitHubShareButton'
30-
3129
import styles from './styles.module.css'
3230

3331
// -----------------------------------------------------------------------------
@@ -153,21 +151,6 @@ export const NotionPage: React.FC<types.PageProps> = ({
153151
const router = useRouter()
154152
const lite = useSearchParam('lite')
155153

156-
React.useEffect(() => {
157-
const intro = document.getElementsByClassName(
158-
'notion-block-e2937a32ee344038bc1fb55c74a22d8f'
159-
)
160-
if (intro && intro.length > 0) intro[0].id = 'link-intro'
161-
const careers = document.getElementsByClassName(
162-
'notion-block-85f68c0cbfd44be5a0d85a3137a673de'
163-
)
164-
if (careers && careers.length > 0) careers[0].id = 'link-careers'
165-
const projects = document.getElementsByClassName(
166-
'notion-block-781d9405d3494e808dcdfc106dc8e46d'
167-
)
168-
if (projects && projects.length > 0) projects[0].id = 'link-projects'
169-
}, [])
170-
171154
const components = React.useMemo(
172155
() => ({
173156
nextImage: Image,
@@ -210,12 +193,12 @@ export const NotionPage: React.FC<types.PageProps> = ({
210193
const showTableOfContents = !!isBlogPost
211194
const minTableOfContentsItems = 3
212195

213-
// const pageAside = React.useMemo(
214-
// () => (
215-
// <PageAside block={block} recordMap={recordMap} isBlogPost={isBlogPost} />
216-
// ),
217-
// [block, recordMap, isBlogPost]
218-
// )
196+
const pageAside = React.useMemo(
197+
() => (
198+
<PageAside block={block} recordMap={recordMap} isBlogPost={isBlogPost} />
199+
),
200+
[block, recordMap, isBlogPost]
201+
)
219202

220203
const footer = React.useMemo(() => <Footer />, [])
221204

@@ -294,11 +277,11 @@ export const NotionPage: React.FC<types.PageProps> = ({
294277
mapPageUrl={siteMapPageUrl}
295278
mapImageUrl={mapImageUrl}
296279
searchNotion={config.isSearchEnabled ? searchNotion : null}
297-
// pageAside={pageAside}
280+
pageAside={pageAside}
298281
footer={footer}
299282
/>
300283

301-
{/* <GitHubShareButton /> */}
284+
<GitHubShareButton />
302285
</>
303286
)
304287
}

components/NotionPageHeader.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { isSearchEnabled, navigationLinks, navigationStyle } from '@/lib/config'
1010
import { useDarkMode } from '@/lib/use-dark-mode'
1111

1212
import styles from './styles.module.css'
13-
import Link from 'next/link'
1413

1514
const ToggleThemeButton = () => {
1615
const [hasMounted, setHasMounted] = React.useState(false)
@@ -51,7 +50,7 @@ export const NotionPageHeader: React.FC<{
5150
<div className='notion-nav-header-rhs breadcrumbs'>
5251
{navigationLinks
5352
?.map((link, index) => {
54-
if (!link.pageId && !link.url && !link.id) {
53+
if (!link.pageId && !link.url) {
5554
return null
5655
}
5756

@@ -65,7 +64,7 @@ export const NotionPageHeader: React.FC<{
6564
{link.title}
6665
</components.PageLink>
6766
)
68-
} else if (link.url) {
67+
} else {
6968
return (
7069
<components.Link
7170
href={link.url}
@@ -75,17 +74,6 @@ export const NotionPageHeader: React.FC<{
7574
{link.title}
7675
</components.Link>
7776
)
78-
} else {
79-
return (
80-
<span
81-
style={{ padding: 8 }}
82-
className={cs(styles.navLink, 'breadcrumb', 'button')}
83-
>
84-
<Link href={link.id} key={index} scroll={true}>
85-
{link.title}
86-
</Link>
87-
</span>
88-
)
8977
}
9078
})
9179
.filter(Boolean)}

components/styles.module.css

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545

4646
.footer {
4747
width: 100%;
48-
height: 200px;
4948
max-width: 1100px;
5049
margin: auto auto 0;
5150
padding: 8px;

lib/site-config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export interface NavigationLink {
3939
title: string
4040
pageId?: string
4141
url?: string
42-
id?: string
4342
}
4443

4544
export const siteConfig = (config: SiteConfig): SiteConfig => {

pages/_document.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default class MyDocument extends Document {
77
render() {
88
return (
99
<IconContext.Provider value={{ style: { verticalAlign: 'middle' } }}>
10-
<Html lang='ko' style={{ scrollBehavior: 'smooth' }}>
10+
<Html lang='en'>
1111
<Head>
1212
<link rel='shortcut icon' href='/favicon.ico' />
1313
<link

site.config.ts

Lines changed: 21 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,29 @@ import { siteConfig } from './lib/site-config'
22

33
export default siteConfig({
44
// the site's root Notion page (required)
5+
<<<<<<< HEAD
56
rootNotionPageId: 'a9cd5fde09d1448fb8419f1514470361',
7+
=======
8+
rootNotionPageId: '7875426197cf461698809def95960ebf',
9+
>>>>>>> parent of fb3f6a7 (Merge branch 'pr/1')
610

711
// if you want to restrict pages to a single notion workspace (optional)
812
// (this should be a Notion ID; see the docs for how to extract this)
913
rootNotionSpaceId: null,
1014

1115
// basic site info (required)
12-
name: '소프트웨어 엔지니어, 한창완',
13-
domain: 'about.1c1.dev',
14-
author: '1chang1',
16+
name: 'Next.js Notion Starter Kit',
17+
domain: 'nextjs-notion-starter-kit.transitivebullsh.it',
18+
author: 'Travis Fischer',
1519

1620
// open graph metadata (optional)
17-
description: 'Software Engineer, 한창완의 이력서',
21+
description: 'Example Next.js Notion Starter Kit Site',
1822

1923
// social usernames (optional)
20-
2124
twitter: 'transitive_bs',
2225
github: 'transitive-bullshit',
2326
linkedin: 'fisch2',
2427
// mastodon: '#', // optional mastodon profile URL, provides link verification
25-
2628
// newsletter: '#', // optional newsletter URL
2729
// youtube: '#', // optional youtube channel name or `channel/UCGbXXXXXXXXXXXXXXXXXXXXXX`
2830

@@ -48,38 +50,20 @@ export default siteConfig({
4850
// '/foo': '067dd719a912471ea9a3ac10710e7fdf',
4951
// '/bar': '0be6efce9daf42688f65c76b89f8eb27'
5052
// }
51-
pageUrlOverrides: {
52-
'/careers-p2achai': '7a39a94e4e104d04ab14385f244e5613',
53-
'/careers-teamluckly': 'SW-12-6c60cc7c9b064bab9963598a1da21805',
54-
'/careers-teamrare': 'SW-12-93c0e513e98048209b20b117210959e4',
55-
'/careers-rokaf': '15-8cfb950730264881a2e90576617db4a6',
56-
'/careers-ajou': '0ddbb2fb30814fbdb1d6156f64839ca9',
57-
'/projects-teft': 'Teft-3796aad2db414f82a85569be93247268',
58-
'/projects-ojjam': 'f0f7beabb162475583cfe432179ae4a1',
59-
'/projects-mytypetest': 'd4dbb5d3300140e9a947598d11a4c07e',
60-
'/projects-stady': 'STADY-84595d1b794745baaa8fd2c79ad49ecf',
61-
'/projects-routelog': 'RouteLog-10d1892dc4c848dc998cc989a68bc2d9',
62-
'/projects-traffin': 'TRAFFIN-24971d0c6a8e470e8d05ac7ed12327d4',
63-
'/projects-hyowonlife': '750da52c857648978e315f5d11c00daf',
64-
'/projects-tothesky': 'toTheSky-1b33457e15fa4ba3851eb685f2edbfac'
65-
},
53+
pageUrlOverrides: null,
6654

6755
// whether to use the default notion navigation style or a custom one with links to
6856
// important pages
69-
// navigationStyle: 'default',
70-
navigationStyle: 'custom',
71-
navigationLinks: [
72-
{
73-
title: 'Intro',
74-
id: '#link-intro'
75-
},
76-
{
77-
title: 'Careers',
78-
id: '#link-careers'
79-
},
80-
{
81-
title: 'Projects',
82-
id: '#link-projects'
83-
}
84-
]
57+
navigationStyle: 'default'
58+
// navigationStyle: 'custom',
59+
// navigationLinks: [
60+
// {
61+
// title: 'About',
62+
// pageId: 'f1199d37579b41cbabfc0b5174f4256a'
63+
// },
64+
// {
65+
// title: 'Contact',
66+
// pageId: '6a29ebcb935a4f0689fe661ab5f3b8d1'
67+
// }
68+
// ]
8569
})

0 commit comments

Comments
 (0)