Next.js static blog using Notion as a Content Management System (CMS). Supports both Blog format Post as well as Page format for Resume. Deployed using Vercel.
π Writing posts using notion
- No need of commiting to Github for posting anything to your website.
- Posts made on Notion are automaticaly updated on your site.
π Use as a page as resume
- Useful for generating full page sites using Notion.
- Can be used for Resume, Portfolios etc.
π SEO friendly
- Dynamically generates OG IMAGEs (thumbnails!) for posts. (og-image-korean).
- Dynamically creates sitemap for posts.
π€ Customisable and Supports various plugin through CONFIG
- Your profile information can be updated through Config. (
site.config.js) - Plugins support includes, Google Analytics, Search Console and also Commenting using Github Issues(Utterances) or Cusdis.
π Table of Contents (TOC)
- Fast loading without delay timers
- Native implementation without external dependencies
- Responsive design that hides on mobile/tablet (β€1300px)
- Smooth scroll navigation with active section highlighting
- Memory efficient with caching and memoization
- Keyboard navigation and ARIA attributes support
-
Star this repo.
-
Fork the repo to your Profile.
-
Duplicate this Notion template, and Share to Web.
-
Copy the Web Link and keep note of the Notion Page Id from the Link which will be in this format [username.notion.site/
NOTION_PAGE_ID?v=VERSION_ID]. -
Clone your forked repo and then customize
site.config.jsbased on your preference. -
Deploy on Vercel, with the following environment variables.
NOTION_PAGE_ID(Required): The Notion page Id got from the Share to Web URL. This is not the entire URL, but just the NOTION_PAGE_ID part as shown above.NEXT_PUBLIC_GOOGLE_MEASUREMENT_ID: For Google analytics Plugin.NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION: For Google search console Plugin.NEXT_PUBLIC_NAVER_SITE_VERIFICATION: For Naver search advisor Plugin.NEXT_PUBLIC_UTTERANCES_REPO: For Utterances Plugin.
Click to see guide
-
Prepare Notion, Vercel account.
-
β
StarandForkthis repo.
- As you
clickthe Notion template, you will see this notion page in your browser. ClickDuplicatebutton(볡μ in image) in right top.
- And you will see
notion page in notion appin your account.
- Click
ShareandPublishin right top, and check web link. (Copy web link)
Modifysite.config.js file in your forked repo.
π‘ NOTE. I changed 2 RED PART
- Move and
loginto vercel.
Buildnew project using Add New...
Importyour forked morethan-log repository
AddEnvironment variabes to vercel project
Waitfor the deployment to complete. After the deployment is successful, you should see an image like the one below.
π₯³ Congratulations. Now check out your blog
The blog includes a Table of Contents system for navigation within blog posts.
The TOC system consists of three main components:
-
useTOCHook (src/hooks/useTOC.ts)- Replaces the old tocbot-based implementation
- Provides fast initialization without delay timers
- Includes responsive optimization for mobile devices
- Uses native browser APIs
-
TOC Utilities (
src/libs/utils/toc.ts)- DOM traversal for heading extraction
- Hierarchical TOC structure building
- Caching for performance
- Safe ID generation for Korean and special characters
-
TableOfContents Component (
src/components/TableOfContents/index.tsx)- Native React implementation
- Responsive design with automatic hiding on small screens
- Smooth scroll navigation
- Active section highlighting
- Fast loading TOC
- Memory efficient with caching
- Responsive design (hidden on screens β€1300px)
- Keyboard navigation and ARIA attributes
- IntersectionObserver for active section tracking
// Core TOC item structure
export type TOCItem = {
id: string
title: string
level: number
children?: TOCItem[]
}
// Version with DOM caching
export type TOCItemWithCache = TOCItem & {
element?: HTMLElement // DOM element reference
offsetTop?: number // Cached scroll position
}The TOC system is automatically integrated into blog posts. It will:
- Show when there are 3+ headings in the content
- Hide automatically on mobile/tablet devices
- Provide smooth scroll navigation
- Highlight the currently active section
The system includes a logging utility (src/libs/utils/logger.ts) that:
- Disables console output in production
- Provides debugging information in development
- Supports different log levels (error, warn, info, debug)
- Can be reused across other components
Click to see FAQ
Q1: If you finish making avatar.svg, How to make favicon.ico and apple-touch-icon.png?A1: check out https://www.favicon-generator.org/
Q2: Is it necessary to set up a sitemap file?
A2: The system will dynamically create a sitemap.xml, so there is no need for manual setup.
Q3: Why donβt Notion posts update automatically?
A3: Please set the revalidateTime in site.config.js and observe how long it takes to update.
Q4: What should be entered for NEXT_PUBLIC_GOOGLE_MEASUREMENT_ID and NEXT_PUBLIC_GOOGLE_SITE_VERIFICATION in site.config.js? A4: You can check morethanmin#203. Please note that updates may take some time to take effect after setting.
If you encounter any other issues, please feel free to add them to the GitHub README to assist future users. We look forward to your contributions!
Check out the Contributing Guide.
morethan-log is an MIT-licensed open source project. It can grow thanks to the sponsors and support from the amazing backers.
The MIT License.
