Viy1204130 downloadsConvert Obsidian notes to Xiaohongshu (RED) style images
Smart RED is an Obsidian plugin that turns your Markdown notes into Xiaohongshu (RED) style image cards at 1080×1440px (3:4 ratio). It packs a measurement driven pagination engine, 19 card templates, image and table rendering, and one click PNG or ZIP export.
中文说明见 README.zh.md。
Write on the left, preview cards on the right. Flip pages, lock the preview, switch templates, and export PNG or ZIP with one click.
Editorial — premium editorial paper texture for tech commentary and deep long readsMonochrome — black-and-white research report style for dense informationNeo Grid — design grid with bold highlights for structured opinionsWarm Zine — warm handmade zine for personal writingNoir Magazine — dark magazine style for night and emotionally strong contentIvory Essay / Red Ledger / Slate Journal / Pearl Magazine / Ink Report — magazine, report and journal backgrounds tuned for Chinese long readsClaude — warm cream paper + serif headings + coral accentMiniMax — pure white near-black + corner multi-color gradientsxAI — near-black canvas + sunset gradient + monospaced all-caps headerLovable — warm parchment + rounded humanist fonts + warm gradients and rounded cornersNotion — tri-color pastel title blocks + gray callouts + colorful tagsFigma — black-and-white editor + neon highlight headings + soft color blocksApple — oversized tight-tracking heading + generous whitespace + Action BlueThe Verge — near-black + acid mint/ultra-violet + extra bold all-caps headingWired — black-and-white magazine + tall serif masthead + drop capmain.js, manifest.json and styles.css from Releases.obsidian/plugins/smart-red/ foldergit clone https://github.com/Viy1204/smart-red-public
cd smart-red-public
bun install
bun run build
Then copy main.js, manifest.json and styles.css to the plugin folder.
Smart RED: Open preview.If the panel is empty, make sure a .md note is active and contains body text.
From left to right:
| Button | Action |
|---|---|
Lock |
Lock the preview so editing no longer refreshes it. Click again to unlock. |
‹ / › |
Previous / next page. |
1/8 |
Current page / total pages. |
| Template dropdown | Switch card template. Auto-saved. |
A- / A+ |
Decrease / increase body font size. |
H- / H+ |
Decrease / increase chrome font size (header, footer, page number). |
| Font dropdown | Quick switch between default, system sans, Source Han, LXGW WenKai, HarmonyOS, Alibaba PuHuiTi, serif/fangsong or monospace fonts. |
Copy |
Copy current page PNG to clipboard. |
PNG |
Download current page PNG. |
ZIP |
Download all pages as a ZIP. |
Typical workflow: write on the left, preview on the right, then Copy the current page or ZIP the whole note.
Smart RED paginates automatically. The first # H1 becomes the article title in the top-right chrome; if there is no H1, the Markdown file name is used.
# Main title for this set of cards
## Page 1 title
Body text with **bold**, *italic*, `inline code`, and [links](https://example.com).
- Bullet one
- Bullet two
- [ ] A task item
---
This starts a new card.
## Second section
> Blockquotes are rendered as magazine pull quotes.
| Item | Description |
|------|-------------|
| A | Tables get styled too |

Smart RED tries to fill every card:
#, ##, ...) are structural; only the first H1 also fills the top-right title slot.--- forces a new card. The horizontal rule itself is not rendered.In Obsidian Settings → Community plugins → Smart RED, configure:
Avatar — URL or vault path to an avatar image.Nickname — creator name shown in the card header.Subtitle — certification, role or short description.Footer — bottom-left text such as a public account or series name. Defaults to Smart RED.Show header / Show footer — toggle chrome visibility.Round avatar — circular crop.If no avatar or nickname is set, templates fall back to a default magazine header.
Built-in 19 templates cover editorial, magazine, zine and brand styles. See the Templates section below for a quick guide.
The Custom Theme section in settings lets you override:
Font family — custom CSS font stack.Text color — body and heading color.Background color — card background color.Accent color — link, rule and emphasis color.Paragraph spacing — paragraph gap in px.The toolbar also provides shortcuts for body font size, chrome font size and common fonts. Start from a template, then tweak one or two variables. Changing too many colors can break the template's original feel.
Copy — fastest way to share the current page.PNG — save the current page.ZIP — export the whole note.2x (2160×2880), good for RED posting. Change to 1x in settings for smaller files.Exported image is black or blank?
Reload the plugin and use the latest build. Current versions render with a real light DOM for export and reject obviously blank images.
Copy does nothing?
Some systems or Obsidian environments restrict clipboard image writes. Use PNG instead.
Why don't links show raw Markdown?
[text](link), bare URLs and [[wikilink|alias]] are rendered as readable link text, not raw Markdown.
Image not showing?
Use reachable network images or local paths Obsidian can read. Relative paths are resolved from the current Markdown file. Broken images are skipped.
Too much text on one page?
The plugin waits for fonts and measures real DOM height, prioritizing no clipped text while filling the card. Use --- to force a new card.
| Syntax | Supported | Notes |
|---|---|---|
# H1 ~ ###### H6 |
✅ | Headings do not split across pages |
**bold** / *italic* |
✅ | |
- list / 1. list |
✅ | |
> quote |
✅ | |
`code` |
✅ | |
``` code block |
✅ | Continuation marker ⤻ added when split |
 image |
✅ | Layout uses real dimensions; broken images skipped |
| table | |
✅ | Tables do not split; overflow noted as "continued" |
[[wikilink]] |
✅ | Rendered as link text |
--- page break |
✅ | Not rendered as a line |
| Consecutive blank lines | ✅ | 2+ blank lines add extra spacing |
~~strikethrough~~ |
✅ | |
- [ ] task list |
✅ | |
| Callouts / Embeds | ❌ | Stripped |
| Mermaid / Math | ❌ | Stripped |
| Frontmatter | ❌ | Stripped |
Default template. Warm paper, serif headings, fine grid and magazine page numbers. Good for tech commentary, workplace observations and deep long reads.
Ivory paper black-and-white layout with strong borders and research-report feel. Good for dense, serious, long-paragraph content.
Blue grid, neon highlights, bold headings. Good for punchy statements, structured opinions and more designed expressions.
Yellow paper, craft texture, warm accents. Good for personal writing, essays and content that should not feel corporate.
Dark magazine style with pink highlights and night-editorial mood. Good for strong emotions, night reading and commentary.
Clean ivory paper, thin borders and understated emphasis. Good for readable Chinese long reads.
Light red background with vertical ledger lines. Good for reviews, checklists, opinions and series.
Calm gray-green journal style. Good for workplace, organization and research content.
Soft magazine feel, light decoration, low noise. Good for more refined narrative content.
Restrained black-and-white report style with clear borders. Good for dense information and serious expression.
Warm cream paper, serif headings, coral accent and black ray dots. Humanist editorial feel for tech commentary and warm long reads.
Pure white canvas, near-black headings, corner multi-color gradient spheres. Clean AI infrastructure feel for product launches and structured opinions.
Near-black canvas, bottom sunset/twilight gradient, monospaced all-caps header. Engineering-cool and futuristic. Good for punchy short takes (long dark reads can feel heavy).
Warm parchment, rounded humanist fonts, warm gradients and rounded corners everywhere. Friendly handmade feel for personal writing and product stories.
Tri-color rotating pastel title blocks, gray callouts, colorful tag pills. Product workspace feel for tutorials, checklists and knowledge organization.
Black-and-white editor skeleton, neon lemon highlight headings, soft color blocks. Technical yet playful. Good for design opinions and structured expression.
Oversized tight-tracking heading, generous whitespace, single Action Blue and image shadows. Launch poster feel for minimalist statements and product narratives.
Near-black background, acid mint/ultra-violet accents, extra bold all-caps heading and mint quote blocks. Tech tabloid nightclub feel for strong-opinion content (Chinese headings are not uppercased).
Black-and-white magazine, tall serif masthead, drop cap and black thick divider bars. Print magazine feel for in-depth reports and long reads.
# Install
bun install
# Dev mode (watch)
bun run dev
# Production build
bun run build # outputs main.js
# Test
bun test
# Test (watch)
bun test --watch
src/
├── main.ts # plugin entry + registration
├── view.ts # RedView (Obsidian ItemView)
├── settings.ts # settings tab
├── types.ts # core types (BlockType, SemanticBlock)
├── cjk-line-breaker.ts # CJK line breaking + Kinsoku rules
├── clipboard.ts # copy current page PNG to clipboard
├── markdown-parser.ts # Markdown → semantic block tree
├── pagination-engine.ts # overflow-fill pagination engine
├── section-splitter.ts # continuous pagination + legacy section tool compat
├── template-renderer.ts # Shadow DOM template renderer
├── export-pipeline.ts # PNG/ZIP export pipeline
├── templates/
│ ├── types.ts # template interfaces
│ ├── gallery.ts # 19 templates
│ └── utils.ts # Markdown inline rendering and template utilities
└── __tests__/ # test files
MIT