MA
MarkShawn2020/lovpen-obsidian
Format once, publish everywhere — Obsidian plugin for multi-platform content distribution (WeChat, Zhihu, XiaoHongShu, Twitter)
LovPen
Format once, publish everywhere
WeChat · Zhihu · XiaoHongShu · Twitter
LovPen transforms your Obsidian markdown notes into professionally formatted content for multi-platform distribution.
Features
Real-Time Rendering
- Zero-Delay Sync: Instant editor-to-preview updates
- Single Rendering Path: No double-rendering or visual jumps
- Smart Caching: Intelligent plugin result caching
Content Formatting
- 35+ Themes: Minimalist, academic, and creative styles
- Code Highlighting: 20+ syntax themes with line numbers
- Smart Layout: Auto-numbering H2 headings, intelligent spacing
- Adaptive Links: Platform-specific conversion (footnotes for WeChat)
Multi-Platform
- One-Click Publishing: Simultaneous distribution
- Live Preview: Real-time formatting updates
- Draft Management: Save and manage drafts
Customization
- Handlebars Templates: Full template system
- CSS Variables: Dynamic theme customization
- Plugin Architecture: Extensible processing pipeline
Installation
Manual Installation
curl -L https://github.com/markshawn2020/lovpen-obsidian/releases/latest/download/obsidian-lovpen.zip -o obsidian-lovpen.zip
unzip obsidian-lovpen.zip -d /path/to/vault/.obsidian/plugins/Development
git clone https://github.com/markshawn2020/lovpen
cd lovpen-obsidian
pnpm install
pnpm buildUsage
- Open Preview:
Cmd/Ctrl+P→ "LovPen: Preview" - Customize: Select theme, adjust settings
- Distribute: Copy or auto-publish to platforms
Platform Setup
WeChat Official Account
- Get credentials from WeChat MP Platform
- Configure AppID, AppSecret, Verification Token in settings
Zhihu
- Login to Zhihu in browser
- Copy cookie from DevTools → Settings
XiaoHongShu
- Login to XiaoHongShu web
- Extract cookie with
web_sessiontoken
Twitter/X
- Create app at Twitter Developer Portal
- Generate all tokens and add to settings
Configuration
| Setting | Description | Default |
|---|---|---|
| Code Line Numbers | Show in code blocks | ✅ |
| H2 Auto-Numbering | Add "01.", "02." prefixes | ✅ |
| Link Conversion | Convert to footnotes | Non-WeChat |
| CSS Inline | Inline styles for compatibility | ✅ |
Custom Themes
Add to .obsidian/plugins/lovpen/themes/:
/* my-theme.css - must scope under .lovpen-renderer */
.lovpen-renderer {
--primary-color: #2c3e50;
--font-body: 'Inter', sans-serif;
}Architecture
lovpen-obsidian/
├── packages/
│ ├── obsidian/ # Core plugin (TypeScript, Obsidian API)
│ ├── frontend/ # UI (React 19, TailwindCSS 4, Jotai)
│ └── shared/ # Common utilities
└── assets/
├── themes/ # 35+ built-in themes
└── highlights/ # 20+ code styles
Tech Stack
- Core: TypeScript, Obsidian Plugin API
- UI: React 19, Jotai, Radix UI, TailwindCSS 4
- Processing: Marked, Highlight.js, Handlebars
- Build: Turbo, ESBuild, Vite
Development
pnpm install # Install dependencies
pnpm download-highlights # Fetch theme assets
pnpm dev # Start dev mode
pnpm check # Type checkingRoadmap
- Real-time editor-renderer sync
- Official Obsidian Community Plugin listing
- Medium, Dev.to integration
- AI-powered content optimization
- Scheduled publishing
Support
License
MIT © Mark Shawn
On this page
Contributors
MIT License
Created July 16, 2025
Updated February 25, 2026

