Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/humbornjo/nobloger
a start template for notion.so, with the support of static pages generation provided by noblog.
https://github.com/humbornjo/nobloger
astro blog notion
Last synced: 3 months ago
JSON representation
a start template for notion.so, with the support of static pages generation provided by noblog.
- Host: GitHub
- URL: https://github.com/humbornjo/nobloger
- Owner: humbornjo
- License: mit
- Created: 2024-08-03T16:59:31.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-28T05:15:30.000Z (3 months ago)
- Last Synced: 2024-09-29T19:01:55.795Z (3 months ago)
- Topics: astro, blog, notion
- Language: Astro
- Homepage: https://humbornjo.github.io/nobloger
- Size: 5.85 MB
- Stars: 9
- Watchers: 1
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# nobloger
A astro start template for [noblog](https://github.com/humbornjo/noblog)
Demo deployed at [humbornjo.github.io/nobloger](https://humbornjo.github.io/nobloger)
nobloger is
* simple, llight-weight and elegant
* using full static pages (deal with nested notion pages)
* with easy deployment![screenshot.png](./asset/preview_1.png)
![screenshot.png](./asset/preview_2.png)
![screenshot.png](./asset/preview_3.png)# usage
## github page deploy
1. Duplicate [this notion database](https://www.notion.so/humbornjo/fa0faae85c504934a4a86cfa70302850?v=2abd1079ae134fbd8df2604765baa1df) 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: ""
---
```3. Fork this project, modify the file `selfie.md` under `public` folder as your self introduction, modify `astro.config.mjs` as following.
```
site: 'https://.github.io',
base: '/',
```4. 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.5. Goto "Settings -> Pages" and enable pages by set branch as "main", and source as "Github Actions".
![enable_page](./asset/enable_page.png)6. Goto "Actions -> Deploy to GitHub Pages", press "Run workflow", and press the poped up green "Run workflow".
7. Wait a few minutes, and visit https://\.github.io/\
Enjoy.
# todo
- [x] fix markdown display matter
- [x] add "search" in blog page
- [x] add "sort by time" in blog page
- [ ] ~~add "paginator" for blog page~~ (is it necessary to use paginator while having nested page?)
- [ ] better tag selection page, filtering w/ multi-select# help
- notion api: [https://developers.notion.com](https://developers.notion.com)
- notion database id:
``` bash
# suppose your notion databsae url is "https://www.notion.so/humbornjo/fa0faae85c504934a4a86cfa70302850?v=2abd1079ae134fbd8df2604765baa1df"
# then your database id is "fa0faae85c504934a4a86cfa70302850"
```
- notion host file and image on aws s3, and **all such files has a expire time**, it appears that the only way is modifying the workflow to deploy page every 2 hours.
```bash
name: Deploy to GitHub Pageson:
# Schedule the workflow to run every 2 hours
schedule:
- cron: '0 */2 * * *'
```
- If you want to use \[SPACE\] in between math delimiter like "$" and "$$", don't use "~", use "\ " instead.
- [enable github pages](https://tomcam.github.io/least-github-pages/enable-github-pages.html), don't forget to click "save".# reference
- Font:
* [Hack Dejavu](https://github.com/pawroman/zola-theme-terminimal/)
- Style:
* [Terminimal](https://github.com/pawroman/zola-theme-terminimal/)
* [astro-nano](https://github.com/markhorn-dev/astro-nano)
- TexMath Renderer:
* [MathJax](https://docs.mathjax.org/en/latest/web/configuration.html)