Skip to content

Latest commit

 

History

History
93 lines (60 loc) · 2.1 KB

README.md

File metadata and controls

93 lines (60 loc) · 2.1 KB

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

📦 Dependencies

This project requires the following dependencies:

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:

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 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:
git clone <repository-url>
cd notion_blog
  1. Set up the required configuration variables in config/config.exs.

  2. Install dependencies:

mix deps.get
  1. Start the application:
iex -S mix
  1. Open your browser and visit:
http://localhost:4040

🧪 Running Tests

To run the test suite, execute the following command:

mix test

📝 License

This project is licensed under the MIT License. See the LICENSE file for more details.