Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9c954c1
hotfix: foodter logo imp que impedia o build em prod
horacio3m Oct 11, 2025
522c860
feat: change to real buttons
EriqueRocha Oct 11, 2025
f455500
feat(ci): add GitHub Actions workflow for Render deployments (product…
horacio3m Oct 12, 2025
64d103d
fix(ci): correct deployment-id key for GitHub deployment status
horacio3m Oct 12, 2025
d5f2310
fix(ci): correct YAML indentation and enable Render deployment workflow
horacio3m Oct 12, 2025
2f840d8
feat(ci): add GitHub Actions workflow for Render deployments (product…
horacio3m Oct 12, 2025
016b193
Update GitHub Action to deploy to Render on develop and production
horacio3m Oct 12, 2025
1e78ad6
Merge pull request #40 from EriqueRocha/change-in-top-menu-buttons
horacio3m Oct 12, 2025
2160771
Add Lighthouse CI workflow for develop and production branches
horacio3m Oct 12, 2025
dcd963f
Update Lighthouse CI to use local URL for develop branch
horacio3m Oct 12, 2025
e589b28
Update Lighthouse CI to run without failing on assertion errors
horacio3m Oct 12, 2025
9434a77
chore(workflow): add Prettier GitHub Action for develop and main
horacio3m Oct 12, 2025
36137b0
fix(workflow): correct Prettier GitHub Action configuration
horacio3m Oct 12, 2025
f7c7f99
chore: add format script for Prettier
horacio3m Oct 12, 2025
9d82e73
chore(workflow): switch Prettier workflow to use PAT for PRs
horacio3m Oct 12, 2025
778fb00
chore(prettier): 🤖 ✨
horacio3m Oct 12, 2025
0b03790
Merge pull request #41 from Diaum/actions/prettier-if-needed
horacio3m Oct 12, 2025
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
95a200a
Merge pull request #44 from Diaum/feature/blog-cms
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
11 changes: 9 additions & 2 deletions .github/workflows/deploy-render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- production
- develop

jobs:
deploy:
Expand All @@ -14,9 +15,15 @@ jobs:

- name: Trigger Render deploy
run: |
if [ "${GITHUB_REF##*/}" = "production" ]; then
SERVICE_ID="${{ secrets.RENDER_SERVICE_ID_PROD }}"
else
SERVICE_ID="${{ secrets.RENDER_SERVICE_ID_DEV }}"
fi

curl -X POST \
-H "Accept: application/json" \
-H "Authorization: Bearer ${{ secrets.RENDER_API_KEY }}" \
-H "Content-Type: application/json" \
-d '{"serviceId": "${{ secrets.RENDER_SERVICE_ID }}"}' \
https://api.render.com/v1/services/${{ secrets.RENDER_SERVICE_ID }}/deploys
-d "{\"serviceId\": \"$SERVICE_ID\"}" \
https://api.render.com/v1/services/$SERVICE_ID/deploys
33 changes: 33 additions & 0 deletions .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Lighthouse
on:
push:
branches:
- develop
- production
pull_request:
branches:
- develop
- production

jobs:
lhci:
name: Lighthouse
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install dependencies and build
run: |
npm install
npm run build
- name: Run Lighthouse CI
run: |
npm install -g @lhci/cli@0.15.x
npm run start &
npx wait-on http://localhost:3000
lhci autorun --collect.url=http://localhost:3000 --upload.target=temporary-public-storage
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
42 changes: 42 additions & 0 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Prettier

on:
push:
branches:
- main
- develop
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

permissions:
contents: write

jobs:
run:
name: Check if the code is prettier 🤔
runs-on: ubuntu-latest
if: ${{ github.ref_name == 'main' || github.ref_name == 'develop' }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: lts/*
- run: npm ci --ignore-scripts
- uses: actions/cache@v4
with:
path: node_modules/.cache/prettier/.prettier-cache
key: prettier-${{ hashFiles('package-lock.json') }}-${{ hashFiles('.gitignore') }}
- run: npm run format
- run: git restore .github/workflows
- uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e
with:
body: 'Ran `npm run format` 🤖'
branch: actions/prettier-if-needed
commit-message: 'chore(prettier): 🤖 ✨'
labels: '🤖 bot'
sign-commits: true
title: 'chore(prettier): 🤖 ✨'
token: ${{ secrets.PAT_TOKEN }}
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
29 changes: 14 additions & 15 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
{
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[javascriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescriptreact]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
}
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
9 changes: 7 additions & 2 deletions README-CONTRIBUIDOR.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# README para Primeiros Colaboradores - Diaum

> **Bem-vindo ao projeto Diaum!** 🎉
Expand Down Expand Up @@ -82,6 +81,7 @@ O site Diaum possui as seguintes seções:
- Clone seu fork localmente

2. **Crie uma Nova Branch**

```bash
git checkout -b feature/nova-secao
# ou
Expand All @@ -94,12 +94,14 @@ O site Diaum possui as seguintes seções:
- Certifique-se de que não quebrou funcionalidades existentes

4. **Commit suas Mudanças**

```bash
git add .
git commit -m "feat: adiciona nova seção de componentes"
```

5. **Push para seu Fork**

```bash
git push origin feature/nova-secao
```
Expand Down Expand Up @@ -129,7 +131,7 @@ O site Diaum possui as seguintes seções:

## 🚀 Deploy

A forma mais rápida de fazer deploy do Diaum é no [Vercel](https://vercel.com/).
A forma mais rápida de fazer deploy do Diaum é no [Vercel](https://vercel.com/).

Consulte a [documentação de deploy do Next.js](https://vercel.com/docs/deployments/deployment-methods) para outras opções de deployment.

Expand All @@ -155,18 +157,21 @@ Consulte a [documentação de deploy do Next.js](https://vercel.com/docs/deploym
## ❓ Dúvidas Frequentes

### Como faço para rodar os testes?

```bash
npm test
```

### Como faço o build de produção?

```bash
npm run build
```

### Como reporto um bug?

Abra uma issue no GitHub com:

- Descrição clara do problema
- Passos para reproduzir
- Comportamento esperado vs. atual
Expand Down
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