https://github.com/dreamingechoes/notion_blog
A small Elixir proof of concept for building a simple blog that manages articles stored in a Notion database.
https://github.com/dreamingechoes/notion_blog
blog-engine elixir elixir-lang notion-api
Last synced: 9 months ago
JSON representation
A small Elixir proof of concept for building a simple blog that manages articles stored in a Notion database.
- Host: GitHub
- URL: https://github.com/dreamingechoes/notion_blog
- Owner: dreamingechoes
- License: mit
- Created: 2025-02-16T09:30:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-16T09:31:03.000Z (over 1 year ago)
- Last Synced: 2025-09-30T17:58:12.527Z (9 months ago)
- Topics: blog-engine, elixir, elixir-lang, notion-api
- Language: Elixir
- Homepage: https://dreamingecho.es/blog/building-a-minimal-blog-in-pure-elixir-with-notion-as-a-cms
- Size: 13.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Notion Blog
This is a small Elixir proof of concept for building a simple blog that manages articles stored in a Notion database. The app fetches data from a configured Notion database and serves it via a basic web interface.
For further improvements, consider adding authentication, pagination, or an enhanced frontend. Happy coding! ๐
## ๐ฅ Demo
[Watch the demo video](https://www.awesomescreenshot.com/video/36653857?key=55cdc56e1f2432b0e2acd1e559771fd8)
## ๐ฆ Dependencies
This project requires the following dependencies:
```elixir
defp deps do
[
{:httpoison, "~> 2.0"},
{:jason, "~> 1.4"},
{:plug_cowboy, "~> 2.0"}
]
end
```
Ensure these dependencies are installed before running the application.
## โ๏ธ Configuration
Before starting the app, you need to set up the required configuration values. These are managed in `config/config.exs`:
```elixir
import Config
config :notion_blog,
notion_api_url: "NOTION_API_URL",
notion_api_token: "NOTION_API_TOKEN",
notion_api_version: "NOTION_API_VERSION",
notion_articles_database_id: "NOTION_ARTICLES_DATABASE_ID"
```
### Notion API Setup
To retrieve and manage articles, you need a Notion API integration. Follow the official [Notion API documentation](https://developers.notion.com/) to:
- Create a Notion integration and get an API token
- Share the database with your integration
- Obtain the database ID for your articles
Once you have these values, replace the placeholders in `config/config.exs` with your actual credentials.
## ๐ Getting Started
Follow these steps to set up and run the application:
1. Clone the repository:
```sh
git clone
cd notion_blog
```
2. Set up the required configuration variables in `config/config.exs`.
3. Install dependencies:
```sh
mix deps.get
```
4. Start the application:
```sh
iex -S mix
```
5. Open your browser and visit:
```plaintext
http://localhost:4040
```
## ๐งช Running Tests
To run the test suite, execute the following command:
```sh
mix test
```
## ๐ License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for more details.