Ever needed to publish Notion notes to GitHub without broken links, ugly filenames, or manual commits? Automatically sync your Notion-exported HTML (and .md) pages to a GitHub repository — cleaned, fixed, committed, and pushed with one click.just go through the installation and how to use steps and u will be okay.
- 🔍 Detects the latest Notion export
.zip
from your Downloads folder(dont rename the file 😅) - 📦 Extracts it to a temp folder
- ✂️ Cleans folder and file names by removing UUIDs
- 🧠 Fixes internal HTML links and emoji/encoding issues
- 🔄 Mirrors changes into a local GitHub repo
- 📝 Auto-commits and pushes changes to GitHub
- 🌐 Opens your GitHub repo in the browser
- 🧹 Cleans up the ZIP and temp folder after use
Tool | Usage |
---|---|
🪟 Windows | Batch and PowerShell based |
🐍 Python 3.7+ | Required to fix HTML encoding and links |
📦 Python packages | ftfy , beautifulsoup4 , chardet |
🔧 Git | Used for auto add , commit , and push |
💻 PowerShell | Used for safe folder renaming and link cleanup |
-
Install Git
https://git-scm.com/downloads -
Install Python 3.x
https://www.python.org/downloads/ -
Install required Python packages:
pip install ftfy beautifulsoup4 chardet
-
Clone this repository or Download as ZIP
-
Edit this line inside
notion-sync.bat
to match your local GitHub folder (line 49):set "GITHUB_DIR=C:\GitHub\Your-Repo-Name"
-
.gitignore is auto-generated by the script:
The script will automatically create a.gitignore
file for you (if it doesn't exist), so you usually don't need to prepare one manually. You can add extra files to ignore later if needed.The script auto-creates a.gitignore
forlast-robocopy.log
. -
Exclude specific files:
To always skip certain files (like constants), add them tonotion-sync.bat
(see line 53). Some common files are already excluded.
-
Export your Notion workspace (as in this case) HTML and place the
.zip
file in your Downloads folder. -
Run
notion-sync.bat
(double-click or run from terminal). -
Done! It will:
- Extract & clean the export
- Fix internal links and encoding
- Push the updates to GitHub
- Open your repo in browser
- delete the original notion zip file and the temp files.
notion-html-sync/
├── notion-sync.bat # Master script
├── cleanup-notion.ps1 # PowerShell rename utility
├── process_notion_html.py # Python cleanup for HTML encoding/links
├── .gitignore # Ignores logs and temp files
└── README.md # You're reading this
Created by Mathew Jobey
If you'd prefer a version that runs without needing Python, Git, or setup:
👉 Join the discussion here
React with a 👍 or leave a comment — if enough people ask, an .exe
will be published in Releases!