An open API service indexing awesome lists of open source software.

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.

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.