a start template for notion.so, with the support of static pages generation provided by noblog.
MIT License
A astro start template for noblog
Demo deployed at humbornjo.github.io/nobloger
nobloger is
Duplicate this notion database and migrate all your posts into it. If you are not a notion player, just simply put your blog under "./src/pages/posts/"
# dont forget to add frontmatter if you are not a notion player
---
layout: ../../layouts/MarkdownPostLayout.astro
title: "golang @any%"
tags: ["lang"]
pubDate: 2024-01-24
archived: false
description: ""
---
Fork this project, modify the file selfie.md
under public
folder as your self introduction, modify astro.config.mjs
as following.
site: 'https://<YOUR_USER_NAME>.github.io',
base: '/<REPO_NAME>',
Goto "Settings -> Secrets and variables -> actions", add following two secrets to "Repository secrets":
NOBLOG_DATABASE_ID
: your notion database id.NOTION_API_SECRET
: your notion api secret.Goto "Settings -> Pages" and enable pages by set branch as "main", and source as "Github Actions".
Goto "Actions -> Deploy to GitHub Pages", press "Run workflow", and press the poped up green "Run workflow".
Wait a few minutes, and visit https://\<YOUR_USER_NAME>.github.io/<REPO_NAME>
Enjoy.
# suppose your notion databsae url is "https://www.notion.so/humbornjo/fa0faae85c504934a4a86cfa70302850?v=2abd1079ae134fbd8df2604765baa1df"
# then your database id is "fa0faae85c504934a4a86cfa70302850"
name: Deploy to GitHub Pages
on:
# Schedule the workflow to run every 2 hours
schedule:
- cron: '0 */2 * * *'