Skip to main content

GSheet Notion Migration Log

This report documents the migration of the Google Sheets Notion export into Docusaurus and records the exact backup, transformation, and validation steps.

1. Objective

  • Migrate Notion-exported Google Sheets knowledge pages into docs/google/google-sheet.
  • Keep all source pages, including duplicate titles (Sumif, Untitled) as requested.
  • Convert all migrated docs from .md to .mdx.
  • Preserve media by backing up and copying all referenced images.

2. Source and Destination

ItemPath
Notion source root/home/rezriz/notion-export -to-docusaurus/gsheet
Source knowledgebase/home/rezriz/notion-export -to-docusaurus/gsheet/Google Sheets/Google Sheet Knowledgebase
Docusaurus target root/opt/docker-data/apps/docusaurus/site/docs/google/google-sheet
Migration guidance/opt/docker-data/apps/docusaurus/site/docs/knowledge/docusaurus/11. Migration

3. Backup Performed (Including Images)

Backups were created before rebuilding target content.

Backup TypePath
Target docs backup/opt/docker-data/apps/docusaurus/site/docs/google/_backup/google-sheet-20260213-120757
Source knowledgebase backup/home/rezriz/notion-export -to-docusaurus/gsheet/_backup/google-sheet-kb-20260213-120757

Both backups include nested folders and image assets.

4. Migration Strategy Executed

4.1 Category-first organization

Source pages were grouped into deterministic folders:

  • 01-functions-and-formulas
  • 02-filter-sort-and-format
  • 03-seo-use-cases
  • 04-comparison
  • 05-performance-and-limits
  • 99-uncategorized

Each folder received _category_.json with:

{
"label": "...",
"position": 1,
"link": { "type": "doc", "id": "index" }
}

4.2 MD to MDX conversion

  • All source .md pages were transformed into .mdx files in target.
  • Root index.md was replaced by index.mdx.
  • Frontmatter generated per document (title, description, sidebar_position).

4.3 Duplicate title handling

Duplicates were preserved with deterministic filename disambiguation:

  • sumif.mdx and sumif-1b905f1a.mdx
  • untitled.mdx and untitled-1b905f1a.mdx

4.4 Media migration

  • Local images referenced in markdown were copied to:
    • docs/google/google-sheet/assets/<doc-slug>/...
  • In-doc image links were rewritten to the new relative paths.

4.5 MDX safety cleanup

  • Escaped risky constructs outside code fences (including brace safety pass).
  • Normalized generated frontmatter quoting to avoid YAML parser failures.

5. Output Metrics

MetricValue
Source .md pages migrated38
Generated .mdx files (including indexes)45
Category folders created6
_category_.json files created6
Images copied and remapped14

6. Validation

Content checks

  • Confirmed no .md files remain in target migration subtree.
  • Verified local image references in migrated .mdx resolve correctly.

Service checks

  • Docusaurus build eventually completed successfully in container.
  • Container served build directory at port 3000.

7. Notes for Future Agents

  1. Always backup both target and source before migration.
  2. Keep a separate pass for MDX parser safety (<, {, } outside code blocks).
  3. Do not skip media rewrite validation; broken image links often surface post-build.
  4. If restart triggers temporary 502, inspect live build logs before assuming tunnel failure.