Skip to content

Commit 6131bc0

Browse files
Merge branch 'current' into ajhlee-databricks-iceberg-revision
2 parents be6a050 + eec605c commit 6131bc0

File tree

81 files changed

+1155
-432
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+1155
-432
lines changed
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
---
2+
name: converting-notion-to-docusaurus-blog
3+
description: Use when converting a Notion markdown export to a Docusaurus blog post for the dbt docs site, or when given a path to a Notion export folder/file.
4+
---
5+
6+
# Converting Notion Exports to Docusaurus Blog Posts
7+
8+
## Overview
9+
10+
Automates conversion of Notion markdown exports into properly formatted Docusaurus blog posts for docs.getdbt.com. Handles frontmatter generation, image processing, content cleanup, and file organization.
11+
12+
## When to Use
13+
14+
- User provides a path to a Notion markdown export
15+
- User mentions converting Notion content to a blog post
16+
- User has exported content from Notion for the dbt developer blog
17+
18+
## Workflow
19+
20+
### 1. Read Notion Export
21+
22+
Parse the markdown file and locate the accompanying image folder (same name as the .md file, without the hash suffix).
23+
24+
### 2. Extract Metadata
25+
26+
From the Notion export, extract:
27+
- **Title**: The H1 heading
28+
- **Owner**: Maps to author lookup
29+
- Remove the metadata block (Status, Owner, Created time) from output
30+
31+
### 3. Look Up Author
32+
33+
Search `website/blog/authors.yml` for a matching name from the Owner field.
34+
35+
**If not found**, prompt user:
36+
```
37+
Author "[Name]" not found in authors.yml.
38+
39+
How would you like to proceed?
40+
1. Enter details now (name, title, photo URL, LinkedIn)
41+
2. Scaffold empty entry to fill in manually later
42+
```
43+
44+
Option 2 creates:
45+
```yaml
46+
firstname_lastname:
47+
name: Full Name
48+
title: "" # TODO
49+
image_url: /img/blog/authors/firstname-lastname.png # TODO
50+
socials:
51+
linkedin: "" # TODO
52+
page: true
53+
```
54+
55+
### 4. Prompt for Confirmations
56+
57+
- **Date**: Default to today + 2 days (YYYY-MM-DD)
58+
- **Slug**: Suggest SEO-optimized version (short, keywords only, drop filler words)
59+
- **Description**: Find a compelling sentence from within the article that captures the key value or insight - not just the opening line
60+
- **Tag**: Select the most appropriate tag based on content (see Tag Selection below)
61+
- **End of content**: Confirm where the publishable content ends (remove trailing internal notes)
62+
63+
**Slug guidelines**: Keep 2-4 words, include primary keywords, drop "introducing", "a", "the", "how to".
64+
- "Introducing dbt agent skills" → `dbt-agent-skills`
65+
- "Getting Started with git Branching Strategies" → `git-branching-strategies-dbt`
66+
67+
**Tag selection**: Check `website/blog/categories.yml` for available tags and their descriptions. Select the most appropriate tag based on the post content. Fall back to `analytics craft` only if no other tag fits.
68+
69+
### 5. Process Images
70+
71+
For each image in the Notion export folder:
72+
1. Analyze the image to generate a semantic filename (e.g., `skills-mcp-diagram.png` not `74cb2aed-fe53-481b-89d0-eefd0054e0c2.png`)
73+
2. Generate alt text for accessibility
74+
3. Copy to `website/static/img/blog/YYYY-MM-DD-slug/`
75+
76+
### 6. Copy Original File
77+
78+
Copy the Notion markdown file to `website/blog/YYYY-MM-DD-slug.md` first. This establishes the baseline for git diffs.
79+
80+
### 7. Apply Transformations as Edits
81+
82+
Apply transformation rules (see below) as individual edits to the copied file. This makes changes visible in git diff, allowing review of exactly what was modified.
83+
84+
### 8. Spellcheck Pass
85+
86+
Run a spellcheck on the content and fix any typos or spelling errors. Be careful to preserve technical terms, product names (dbt, MetricFlow, BigQuery), and intentional stylistic choices.
87+
88+
### 9. Report Results
89+
90+
Summarize: files created, images processed, spelling corrections made, any TODO items (e.g., incomplete author entry).
91+
92+
## Transformation Rules
93+
94+
### Frontmatter
95+
96+
Generate YAML frontmatter:
97+
```yaml
98+
---
99+
title: "Title from H1"
100+
description: "A compelling sentence from the article that captures the key value or insight"
101+
slug: seo-optimized-slug
102+
103+
authors: [author_slug]
104+
105+
tags: [appropriate-tag]
106+
hide_table_of_contents: false
107+
108+
date: YYYY-MM-DD
109+
is_featured: true
110+
---
111+
```
112+
113+
### Images
114+
115+
| Notion | Docusaurus |
116+
|--------|------------|
117+
| `![alt](Folder/image.png)` | `<Lightbox src="/img/blog/YYYY-MM-DD-slug/semantic-name.png" width="85%" alt="generated alt text" />` |
118+
| Image with caption on next line | Merge caption into `title` attribute |
119+
120+
### Content Cleanup
121+
122+
| Pattern | Action |
123+
|---------|--------|
124+
| H1 title | Remove (comes from frontmatter) |
125+
| Status/Owner/Created time block | Remove |
126+
| Trailing sections after conclusion | Remove (internal notes) |
127+
| Code blocks with language `markdown` | Change to `bash` if shell commands |
128+
| Notion callouts (`> **Note**`) | Convert to `:::note` admonitions |
129+
| URL-encoded paths (`%20`) | Decode |
130+
| asterisks for emphasis (`*emphasised* content`) | Replace with underscores (`_emphasised_ content`) |
131+
| Internal Notion links (`notion.so`, `notion.site`) | Flag for review - replace with public resource links |
132+
| Absolute docs site links (`https://docs.getdbt.com/...`) | Convert to relative paths (`/docs/...`, `/reference/...`) |
133+
134+
### Truncate Marker
135+
136+
Insert `<!-- truncate -->` after the introduction (1-3 paragraphs, ~150-300 words) and before the first `##` heading.
137+
138+
## Quick Reference
139+
140+
```
141+
Notion Export:
142+
my-post abc123.md
143+
my-post abc123/
144+
image.png
145+
image 1.png
146+
147+
Step 1 - Copy original:
148+
website/blog/YYYY-MM-DD-slug.md (raw Notion content)
149+
150+
Step 2 - Apply edits (diffable):
151+
website/blog/YYYY-MM-DD-slug.md (transformed)
152+
website/static/img/blog/YYYY-MM-DD-slug/
153+
semantic-name.png
154+
another-semantic-name.png
155+
```

.github/workflows/codeowners-check.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ jobs:
1111
if: github.actor != 'dependabot[bot]'
1212
runs-on: depot-ubuntu-24.04
1313
steps:
14-
- uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # actions/checkout@v4
15-
- uses: mszostok/codeowners-validator@f555ba682ec613249e7e478a4e0bff3ba35dc79f # mszostok/[email protected]
14+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # actions/checkout@v6
15+
- uses: mszostok/codeowners-validator@7f3f5e28c6d7b8dfae5731e54ce2272ca384592f #v0.7.4
16+
env:
17+
INPUT_GITHUB_APP_PRIVATE_KEY: "${{ secrets.SECENG_CICD_CHECKS_PRIVATE_KEY }}"
18+
INPUT_GITHUB_APP_INSTALLATION_ID: "${{ secrets.SECENG_CICD_CHECKS_INSTALLATIONID }}"
19+
INPUT_GITHUB_APP_ID: "${{ secrets.SECENG_CICD_CHECKS_APPID }}"
1620
with:
17-
github_access_token: "${{ secrets.OWNERS_VALIDATOR_GITHUB_SECRET }}"
1821
checks: "owners,duppatterns"
1922
experimental_checks: "notowned"

.github/workflows/cypress_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: install node
1818
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # actions/setup-node@v3
1919
with:
20-
node-version: '16.13.1'
20+
node-version: '20'
2121

2222
- name: npm install
2323
run: cd website && npm ci

.github/workflows/lint.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,29 @@ on: push
44
jobs:
55
eslint-check:
66
runs-on: ubuntu-latest
7+
permissions:
8+
contents: read
9+
packages: read
710
steps:
811
- name: Checkout
912
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # actions/checkout@v3
1013

1114
- name: Install Node
1215
uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # actions/setup-node@v3
1316
with:
14-
node-version: '18.12.0'
17+
node-version: '20'
1518

1619
- name: Cache Node Modules
1720
uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # actions/cache@v3
1821
id: cache-node-mods
1922
with:
2023
path: website/node_modules
21-
key: node-modules-cache-v3-${{ hashFiles('**/package.json', '**/package-lock.json') }}
24+
key: node-modules-cache-v4-${{ hashFiles('**/package.json', '**/package-lock.json') }}
2225

2326
- name: Install Packages
2427
if: steps.cache-node-mods.outputs.cache-hit != 'true'
28+
env:
29+
NPM_TOKEN: ${{ secrets.NPM_TOKEN || secrets.GITHUB_TOKEN }}
2530
run: cd website && npm ci
2631

2732
- name: Run ESLint

website/blog/2025-08-26-building-the-remote-dbt-mcp-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: "Learn about the new remote dbt MCP server, how it was built, and h
44
slug: building-the-remote-dbt-mcp-server
55
authors: [devon_fulcher]
66

7-
tags: [ai, data ecosystem, mcp]
7+
tags: [ai, data ecosystem]
88
hide_table_of_contents: false
99

1010
date: 2025-08-26

0 commit comments

Comments
 (0)