Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rxrw/notion-blog
https://github.com/rxrw/notion-blog
blog convert go golang hugo markdown notion
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/rxrw/notion-blog
- Owner: rxrw
- License: gpl-3.0
- Fork: true (xzebra/notion-blog)
- Created: 2022-09-06T09:00:25.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T13:22:47.000Z (8 months ago)
- Last Synced: 2024-09-25T07:17:05.044Z (3 months ago)
- Topics: blog, convert, go, golang, hugo, markdown, notion
- Language: Go
- Homepage:
- Size: 82 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# notion-blog
`notion-blog` allows you to use Notion as a CMS for pages built with hugo. You can use it as a cli or even automate your blog repo to update itself with the Github Action.
## Requisites
- Notion database for your articles.
- Notion API secret token.
- Hugo powered blog.## Usage
### CLI
The cli shows the executable flags when using flag `—help`.
```bash
$> notion-blog —help
```### Binary
The binary looks for a config file called `notionblog.config.json` in the directory where it is executed. You can see the example config in [notionblog.config.json](notionblog.config.json).
### Github Action
To use it as a Github Action, you can follow the example of the repository in [.github/worflows/notion.yml](.github/workflows/notion.yml).
## Compilation
This is only required if you are not going to use the repo as a Github Action. The compilation is simple as Golang installs everything for you.
```bash
go build -o ./bin/main cmd/main/main.go
```You can compile any form of the app (cli or binary) by compiling the main file in any of the packages in `cmd/`.