将你的 Markdown 笔记转换为精美的卡片图片
Convert your Markdown notes into beautiful card images
Features • Installation • Usage • Styles • Documentation
|
|
MD2Card includes 5 professionally designed built-in styles:
MD2Card 内置 5 种专业设计的样式:
| Style 样式 |
Description 描述 |
Best For 适用场景 |
|---|---|---|
| Card Theme 卡片主题 |
Classic card design with clean layout 经典卡片设计,布局简洁清晰 |
General notes, study cards 通用笔记、学习卡片 |
| GitHub Style GitHub 风格 |
Developer-friendly code-focused theme 开发者友好的代码主题 |
Code snippets, technical documentation 代码片段、技术文档 |
| LaTeX Style LaTeX 风格 |
Academic paper aesthetic 学术论文美学风格 |
Academic notes, formulas, research 学术笔记、公式、研究 |
| PIE Style PIE 主题 |
Colorful and vibrant design 多彩活力设计 |
Creative content, social media 创意内容、社交媒体 |
| Vintage Newspaper 复古报纸 |
Classic newspaper layout 经典报纸排版风格 |
Articles, storytelling, blogs 文章、故事叙述、博客 |
You can create your own custom card styles using CSS! See CUSTOM_STYLE_GUIDE.md and EXAMPLE_CUSTOM_CSS.md for detailed instructions.
你可以使用 CSS 创建自己的自定义卡片样式!查看 CUSTOM_STYLE_GUIDE.md 和 EXAMPLE_CUSTOM_CSS.md 获取详细说明。
-
Download the latest release files:
main.js,manifest.json, andversions.json下载最新发布的文件:
main.js、manifest.json和versions.json -
Create a folder named
md2cardin your vault's.obsidian/plugins/directory在你的仓库的
.obsidian/plugins/目录中创建名为md2card的文件夹 -
Copy the downloaded files into the
md2cardfolder将下载的文件复制到
md2card文件夹中 -
Reload Obsidian
重新加载 Obsidian
-
Enable the MD2Card plugin in Settings → Community Plugins
在设置 → 第三方插件中启用 MD2Card 插件
# Clone the repository / 克隆仓库
git clone https://github.com/gevikhn/obsidian-md2card.git
cd obsidian-md2card
# Install dependencies / 安装依赖
npm install
# Build the plugin / 构建插件
npm run build:plugin
# Copy files to your Obsidian vault / 将文件复制到你的 Obsidian 仓库
# .obsidian/plugins/md2card/-
Select text in your note or open a document
在笔记中选择文本或打开文档
-
Open command palette (
Ctrl/Cmd + P)打开命令面板 (
Ctrl/Cmd + P) -
Run one of these commands / 运行以下命令之一:
MD2Card: Convert selection to card- Convert selected text / 转换选中内容MD2Card: Convert document to card- Convert entire document / 转换整个文档
-
Preview and export your card
预览并导出你的卡片
Access plugin settings via Settings → MD2Card:
通过设置 → MD2Card 访问插件设置:
- Card Width / 卡片宽度 - Set card width in pixels (default: 440px) / 设置卡片宽度(默认:440px)
- Card Height / 卡片高度 - Set card height in pixels (0 for auto) / 设置卡片高度(0 为自动)
- Custom CSS / 自定义 CSS - Add your custom styles / 添加你的自定义样式
|
📚 Study Notes |
💬 Quote Cards |
💻 Code Snippets |
|
📝 Meeting Notes |
📖 Articles |
📊 Data & Tables |
| Document | Description |
|---|---|
| PLUGIN_README.md | Full plugin documentation / 完整插件文档 |
| 快速开始.md | Chinese quick start guide / 中文快速入门指南 |
| CUSTOM_STYLE_GUIDE.md | Custom style guide / 自定义样式指南 |
| EXAMPLE_CUSTOM_CSS.md | Custom CSS examples / 自定义 CSS 示例 |
# Development mode with watch / 开发模式(监听文件变化)
npm run dev:plugin
# Production build / 生产构建
npm run build:plugin- TypeScript - Type-safe development / 类型安全的开发
- Obsidian API - Plugin integration / 插件集成
- html-to-image - Image generation / 图片生成
- esbuild - Fast bundling / 快速打包
obsidian-md2card/
├── main.ts # Plugin entry point / 插件入口
├── manifest.json # Plugin manifest / 插件清单
├── versions.json # Version compatibility / 版本兼容性
├── global.d.ts # TypeScript definitions / TypeScript 定义
├── esbuild.config.mjs # Build configuration / 构建配置
├── default_card_theme.css # Card theme style / 卡片主题样式
├── default_github_style.css # GitHub style / GitHub 风格
├── default_latex_style.css # LaTeX style / LaTeX 风格
├── default_pie_style.css # PIE theme / PIE 主题
└── default_vintage_newspaper_style.css # Vintage newspaper / 复古报纸
- ✅ Headers (h1-h6) / 标题
- ✅ Bold, Italic, Strikethrough / 粗体、斜体、删除线
- ✅ Lists (ordered & unordered) / 列表(有序和无序)
- ✅ Blockquotes / 引用
- ✅ Code blocks & inline code / 代码块和行内代码
- ✅ Tables / 表格
- ✅ Links / 链接
- ✅ Images / 图片
- ✅ Horizontal rules / 分隔线
Contributions are welcome! Feel free to:
欢迎贡献!你可以:
- 🐛 Report bugs / 报告 Bug
- 💡 Suggest features / 提出功能建议
- 📝 Improve documentation / 改进文档
- 🔧 Submit pull requests / 提交 Pull Request
This project is licensed under the MIT License.
本项目采用 MIT 许可证。
This plugin is based on the MD2Card web application, providing a convenient way to convert Markdown to beautiful card images directly within Obsidian.
本插件基于 MD2Card 网页应用开发,为 Obsidian 用户提供了便捷的 Markdown 转卡片图片功能。