
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
md-notion-sync
Advanced tools
A TypeScript/Node.js package to sync markdown files to Notion pages with proper formatting support.
npm install md-notion-sync
For global CLI usage:
npm install -g md-notion-sync
md-notion-sync init
.env
file with your Notion token:NOTION_TOKEN=your_notion_integration_token_here
md-notion-sync sync -f README.md -p your_notion_page_id
import { syncMarkdownToNotion } from 'md-notion-sync';
await syncMarkdownToNotion({
notionToken: 'your_notion_token',
pageId: 'your_page_id',
filePath: './README.md',
clearExisting: true // optional, defaults to true
});
import { NotionSync, MarkdownToNotion } from 'md-notion-sync';
// Create converter and sync instances
const converter = new MarkdownToNotion();
const sync = new NotionSync('your_token');
// Convert markdown to Notion blocks
const blocks = converter.convert(markdownContent);
// Add to Notion page
await sync.addBlocksToPage('page_id', blocks);
Create .github/workflows/sync-readme.yml
:
name: Sync README to Notion
on:
push:
paths: ['README.md']
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install package
run: npm install -g md-notion-sync
- name: Sync to Notion
run: md-notion-sync sync -f README.md -p ${{ secrets.NOTION_PAGE_ID }}
env:
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }}
NOTION_TOKEN
: Your Notion integration token (required)NOTION_PAGE_ID
: Default page ID to sync to (optional)md-notion-sync sync [options]
Options:
-f, --file <path> Path to markdown file (required)
-p, --page-id <id> Notion page ID (required)
-t, --token <token> Notion API token (or use NOTION_TOKEN env var)
--no-clear Don't clear existing content before syncing
-h, --help Display help for command
Feature | Support | Notes |
---|---|---|
Headers (H1-H3) | ✅ | Converted to Notion heading blocks |
Bold text | ✅ | Rich text formatting |
Italic text | ✅ | Rich text formatting |
Inline code | ✅ | Rich text formatting |
Code blocks | ✅ | With language syntax highlighting |
Lists (ordered/unordered) | ✅ | Nested lists supported |
Tables | ✅ | With headers and formatting |
> Blockquotes | ✅ | Converted to quote blocks |
Links | ✅ | External links only |
Images | ❌ | Filtered out (not supported by Notion API) |
Horizontal rules | ✅ | Converted to divider blocks |
The page ID is the string of characters after your workspace name and before any query parameters:
https://www.notion.so/workspace/Page-Title-HERE_IS_THE_PAGE_ID
syncMarkdownToNotion(options)
Main sync function.
Parameters:
options.notionToken
(string): Notion API tokenoptions.pageId
(string): Target Notion page IDoptions.filePath
(string): Path to markdown fileoptions.clearExisting
(boolean, optional): Clear existing content first (default: true)MarkdownToNotion
Converter class for transforming markdown to Notion blocks.
Methods:
convert(markdown: string): NotionBlock[]
- Convert markdown string to Notion blocksNotionSync
Notion API wrapper class.
Methods:
clearPageContent(pageId: string): Promise<void>
- Clear all blocks from a pageaddBlocksToPage(pageId: string, blocks: NotionBlock[]): Promise<void>
- Add blocks to a pagesyncMarkdownToNotion(options: SyncOptions): Promise<void>
- Full sync operationThe package includes comprehensive error handling for:
FAQs
Sync markdown files to Notion pages.
The npm package md-notion-sync receives a total of 1 weekly downloads. As such, md-notion-sync popularity was classified as not popular.
We found that md-notion-sync demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.