Skip to content

Conversation

luandro
Copy link
Contributor

@luandro luandro commented Oct 11, 2025

Summary

  • emit for empty Notion paragraphs so intentional spacers survive export
  • trim leading/trailing spacer tokens and wire up DocSpacer MDX component
  • cover the transformer with unit tests for empty, nested, and populated paragraphs

Testing

  • bunx eslint scripts/notionClient.ts scripts/notionClient.test.ts src/components/DocSpacer/index.tsx src/theme/MDXComponents/index.tsx --fix
  • bunx eslint scripts/notion-fetch/generateBlocks.ts --fix
  • bunx vitest run scripts/notionClient.test.ts

Fixes #49

@digidem digidem deleted a comment from github-actions bot Oct 11, 2025
@luandro
Copy link
Contributor Author

luandro commented Oct 11, 2025

Summary

  • map empty Notion paragraphs to <DocSpacer /> so intentional spacers survive the export
  • trim spacer tokens off the top/bottom of generated markdown and add an MDX-wired DocSpacer component
  • cover the transformer with unit tests alongside existing Notion client specs

Expected behavior

  • Deliberate blank lines in Notion now render as controlled spacing in MDX/docs pages
  • No stray spacer components appear at the start or end of generated markdown files

QA instructions

  1. Run your usual Notion export pipeline (e.g., bun run notion:fetch) so new content is regenerated.
  2. Inspect a page that previously used intentional blank lines—confirm the generated MDX now contains <DocSpacer /> entries instead of dropped spacing.
  3. Start the docs locally with bun run dev, navigate to that page, and verify the vertical gaps render without extra spacers at the top or bottom.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

empty blocks use to add space between content are being ignored

1 participant