Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f2866fa
feat: implement Notion CMS blog with dynamic routing
horacio3m Oct 12, 2025
6405a9f
fix: handle Status property type mismatch in Notion database
horacio3m Oct 12, 2025
8e78ed1
feat: add debug logs and support for status property type
horacio3m Oct 12, 2025
0f48dd4
debug: add comprehensive logging and show all posts
horacio3m Oct 12, 2025
cb57992
fix: correct property names and clean up debug logs
horacio3m Oct 12, 2025
38ca9f7
perf: optimize performance and fix created_time error
horacio3m Oct 12, 2025
691f220
hotfix: improve back to blog button
horacio3m Oct 12, 2025
406c7e7
fix: make back button clickable and update status filter
horacio3m Oct 12, 2025
b8e4675
feat: add Author and Cover properties support
horacio3m Oct 12, 2025
422dd58
debug: add temporary logs to check Author property extraction
horacio3m Oct 12, 2025
a45293c
fix: add support for people property type
horacio3m Oct 12, 2025
e3bb767
hotfix: add author avatar support
horacio3m Oct 12, 2025
7b6f504
docs: add blog documentation and clean code
horacio3m Oct 12, 2025
78d8d1b
update: change status values to new workflow
horacio3m Oct 12, 2025
0e2904d
docs: add detailed token generation instructions
horacio3m Oct 12, 2025
ba136aa
chore: add .env.local to gitignore
horacio3m Oct 12, 2025
8381572
hotfix: fix linting errors and improve build
horacio3m Oct 12, 2025
16e4ae6
fix: configure Next.js images for Notion domains
horacio3m Oct 12, 2025
c1453f0
fix: add Google domains to image configuration
horacio3m Oct 12, 2025
0eaedea
hotfix: image lint error
horacio3m Oct 12, 2025
98f47bc
fix: resolve remaining TypeScript linting errors
horacio3m Oct 12, 2025
19a852f
fix: resolve final TypeScript linting error
horacio3m Oct 12, 2025
2754e3e
fix: Remove blog import, nver used
horacio3m Oct 12, 2025
236f87b
fix: resolve TypeScript build errors and clean console logs
horacio3m Oct 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ yarn-error.log*

# Sistema
.DS_Store
.env.local
34 changes: 34 additions & 0 deletions README-BLOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Blog CMS

Blog dinâmico usando Notion como CMS.

## Configuração

1. Crie uma integração no [Notion](https://www.notion.so/my-integrations)
2. Copie o arquivo `.env.blog.example` para `.env.local`
3. Configure suas credenciais do Notion
4. Execute `npm run dev`

## Estrutura do Database

Propriedades necessárias no Notion:

- **Title** (Title) - Título do artigo
- **slug** (Rich text) - URL slug único
- **Author** (People) - Autor do artigo
- **Cover** (Files) - Imagem de capa
- **Date** (Date) - Data de publicação
- **Tags** (Multi-select) - Tags do artigo
- **Status** (Status) - Status: "Publicado" para publicar

## Status Disponíveis

- **Rascunho** - Artigo em desenvolvimento
- **Revisando** - Artigo em revisão
- **Publicado** - Artigo publicado no blog

## Rotas

- `/blog` - Listagem de artigos
- `/blog/[slug]` - Artigo individual
- `/test-notion` - Teste de conexão
23 changes: 23 additions & 0 deletions env.blog.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Configuração do Blog CMS com Notion
#
# COMO GERAR O TOKEN:
# 1. Acesse: https://www.notion.so/my-integrations
# 2. Clique em "New integration"
# 3. Dê um nome (ex: "Meu Blog CMS")
# 4. Selecione o workspace
# 5. Clique em "Submit"
# 6. Copie o "Internal Integration Token" (começa com ntn_)
# 7. Cole abaixo substituindo os xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# COMO PEGAR O DATABASE ID:
# 1. Abra seu database no Notion
# 2. Copie a URL: https://notion.so/workspace/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx?v=...
# 3. O ID é a parte entre "notion.so/workspace/" e "?v="
# 4. Cole abaixo substituindo os xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#
# IMPORTANTE: Compartilhe o database com sua integração!
# - No database, clique em "Share" no canto superior direito
# - Adicione sua integração (nome que você deu no passo 3)

NOTION_TOKEN=ntn_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
NOTION_DATABASE_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
31 changes: 30 additions & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,33 @@
/** @type {import('next').NextConfig} */
const nextConfig = {}
const nextConfig = {
images: {
remotePatterns: [
{
protocol: 'https',
hostname: '**.notion.so',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '**.amazonaws.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '**.s3.amazonaws.com',
port: '',
pathname: '/**',
},
{
protocol: 'https',
hostname: '**.googleusercontent.com',
port: '',
pathname: '/**',
},
],
},
}

export default nextConfig
Loading