Overview
Notion-Hugo allows users to leverage Notion as a content management system (CMS) and deploy their pages as a static website using Hugo. By combining the flexibility of Notion for creating content with the capabilities of Hugo themes, users can efficiently manage and publish their web content.
Features
- Notion Integration: Seamlessly connect your Notion account to sync content.
- GitHub Repository: Easily set up a new GitHub repository using the provided template.
- GitHub Actions: Configure secrets for GitHub Actions to automate deployment.
- Hugo Configuration: Customize your Hugo site by updating the configuration files.
- Static Website Deployment: Render Notion content into static webpages for deployment.
- Open Source: Licensed under GNU GPL v3 for open-source projects.
Installation
Create a GitHub Repository:
- Clone the Notion-Hugo template repository.
- Select “public” visibility for the repository.
Setup Notion Integration:
- Create a new internal integration on Notion with permissions for reading content and user information.
Configure GitHub Secrets:
- Copy the Internal Integration Token.
- Add a new secret named NOTION_TOKEN in the GitHub repository settings under Secrets.
Duplicate Notion Template:
- Duplicate the provided Notion Template to your workspace.
- Add the integration connection to the duplicated Notion page.
Configure Hugo Site:
- Copy the link to the shared Notion page.
- Update the page_url in the notion-hugo.config.ts file in your GitHub repository.
Enable GitHub Pages:
- Update the baseURL in the config/_default/config.toml file with your website URL.
- Commit the changes and wait for deployment.
Visit Your Website:
- Access your website to see the Notion content rendered as static webpages.
Summary
Notion-Hugo simplifies the process of using Notion as a content creation tool and Hugo for website deployment. With features like seamless integration, GitHub automation, and customizable configuration, users can efficiently manage their web content. The open-source nature of the project also allows for flexibility in licensing based on project requirements.