Deploy your own Heptabase-powered website in minutes with Next.js and Vercel.
This is a simple website that displays your Heptabase notes in a beautiful way. notes.younglele.cc
And this is the original whiteboard
It uses Heptabase as a CMS, the interface comes from draJiang
- Display the notes content of Heptabase
- Update Heptabase notes using ISR
- Basically consistent with the official style of Heptabase
- Support dark mode
- Support mobile
- Support show links to the original notes
- The whiteboard must contain a card named 'About', which will be displayed as the homepage.
- Images and videos uploaded directly to Heptabase cannot be loaded properly.
- You can use image hosting services.
- YouTube and Bilibili videos can be loaded properly.
- The card linked in the card needs to be added to the whiteboard.
All config is defined in site.config.ts
This project requires a recent version of Node.js (recommend >= 16).
- Fork this repo
- Change a few values in site.config.ts
- Must add a card named 'About' to the whiteboard, which will be displayed as the homepage.
- npm install
- npm run dev to test locally
- Deploy to Vercel
I tried to make configuration as easy as possible — All you really need to do to get started is edit whiteboardId
.
- Open your Heptabase whiteboard
- Click the share button
- Copy the whiteboard id
app.heptabase.com/w/641ea3e118cf2f1d33cda32e8580f77efa59094fc805b326c9fc8c6dd16489ee, 641ea3e118cf2f1d33cda32e8580f77efa59094fc805b326c9fc8c6dd16489ee is whiteboardId
After change your whiteboardId
and commit your changes, you can deploy to Vercel.
- create a new proeject in vercel
- select your forked repo and click
import
button - click
deploy
button
- Open your Heptabase whiteboard
- Click the share button
- Click the Publish Changes Button
- Refresh your website
The Project uses ISR to update the notes, so you don't need to redeploy to update the notes.
ISR is a feature of Next.js that allows you to update your website without rebuilding the entire site. It works by generating a static version of your site at build time, and then updating the static version when new content is published.
There is a revalidate
in page.tsx. When the value is 3600, it means one hour. It indicates that after the successful deployment, the webpage was opened for the first time, and the heptabase notes were updated within an hour. The interface will not display the latest content. You need to check the webpage again after an hour. At this time, the backend will rebuild, and after the rebuild is completed (usually within one or two minutes), refreshing the page will display the latest content.
You can set it according to your needs.
If you want to update the project, you can do the following:
- Update via the GitHub website
- Enter the repository you forked.
- Click the
Sync fork
button - Click "Update branch" to proceed.
- Redeploy Project
The project's inspiration and the interfaces used are from draJiang.