NoteToMP

repository·main·Indexed 43 days ago

https://github.com/sunbooshi/note-to-mp

An Obsidian plugin (v2.4.0) that transforms Markdown notes into professionally styled articles for publishing platforms, primarily WeChat Official Accounts. It features 30+ themes, CSS/LESS customization, style widgets, and support for LaTeX, Mermaid, and Excalidraw. NoteToMP enables exporting to WeChat, Xiaohongshu, X, Zhihu, and Toutiao, and supports automation via n8n, Coze, and AI Agents.

Tokens
3.5K
Snippets
10
Records
20
Agent score
56%

What's inside NoteToMP

  1. Overview of NoteToMP capabilities

    main

    NoteToMP is a workflow tool designed to turn Obsidian Markdown notes into professionally formatted content for platforms like WeChat Official Accounts (微信公众号), Xiaohongshu, and more. It follows a workflow of: Writing (in Obsidian) → Design → Layout → Image Processing → Publishing → Automation.

    Key features include:

    • Obsidian Native Writing: Supports standard Markdown, Callouts, Tables, Code blocks, Mermaid diagrams, Excalidraw, and LaTeX/AsciiMath without requiring platform-specific syntax.
    • Layout Design: Access to 30+ themes or full CSS/LESS customization.
    • Style Widgets: Use specific IDs (e.g., #1008) to apply unique visual components to specific headings, paragraphs, or images.
    • Content Processing: Automatic image uploading, LaTeX to SVG conversion, and support for Obsidian file embeds.
    • Multi-platform Distribution: Export as WeChat articles, WeChat images, Xiaohongshu images, X (Twitter) long-form articles, Zhihu, and Toutiao.
  2. Securely obtain WeChat Official Account AccessToken

    main
    When using automated workflows to call WeChat Official Account APIs, exposing your AppSecret directly in the workflow poses security risks. NoteToMP provides a dedicated interface to retrieve the AccessToken. This method is more secure and easier to use for automation as it does not require exposing the AppSecret or maintaining a fixed server IP. (Note: This is a premium/member feature).
  3. Publish an article to WeChat Official Account

    main
    1. Open the Obsidian Command Palette (Ctrl/Cmd + P).
    2. Search for and select Copy to WeChat Official Account (复制到公众号).
    3. In the preview interface, select your preferred theme (you can set a default theme in the plugin settings).
    4. Select Copy (复制) to copy the formatted content or Send Draft (发草稿) to publish it directly.
  4. Publish to WeChat Official Accounts

    main

    There are two primary ways to publish after layout is complete:

    1. Copy (复制): Copies the formatted content to your clipboard to be pasted directly into the WeChat editor.
    2. Send to Drafts (发草稿): Automatically uploads images and sends the article directly to your WeChat Official Account drafts box for final review.

    Multi-Account Support: You can configure multiple accounts in NoteToMP and select the target account during publishing. You can also save publishing configurations (like cover images, authors, and styles) directly in the note's frontmatter.

    ---
    标题:
    作者:
    封面:
    摘要:
    封面素材ID:
    封面裁剪: false
    原文地址:
    打开评论: true
    仅粉丝可评论: false
    公众号:
    样式:
    自定义样式笔记:
    禁用图片背景: false
    ---
  5. Install theme resources

    main

    If themes are not appearing correctly after installation, you can download them via Settings → Community Plugins → NoteToMP → Get more themes.

    Alternatively, if installing via GitHub Releases, download assets.zip and extract it to .obsidian/plugins/note-to-mp/assets. The directory structure must be:

    note-to-mp/
    ├── assets/
    │   ├── themes.json
    │   ├── highlights.json
    │   ├── themes/
    │   └── highlights/
    ├── main.js
    ├── manifest.json
    └── styles.css
  6. Integrate NoteToMP with automation workflows

    main

    NoteToMP can be integrated with workflow platforms like n8n or Coze to automate the article publishing process.

    Key capabilities include:

    • AI-driven content optimization (titles, summaries, content checks).
    • Pre-publication and post-publication workflow execution.
    • Manual workflow triggering.
    • Dynamic parameter parsing from note properties, other notes, and images.

    To define a workflow, use a configuration block specifying the URL, trigger timing, and HTTP method. You can pass dynamic parameters using the $ prefix for properties or the ![[]] syntax for note content and images.

    url: https://example.com/workflow
    runAt: start
    method: POST
    parameters:
      author: $author
      content: ![[prompt.md]]
      image: ![[cover.jpg]]
  7. Use Style Widgets for local design

    main

    Style Widgets allow you to apply unique visual components to specific parts of your document (headings, paragraphs, images, etc.) using unique IDs.

    How to use:

    1. Open the Command Palette (Ctrl/Cmd + P).
    2. Search for "Insert Style Widget" (插入样式小部件).
    3. Select the desired component. NoteToMP will insert the required syntax.

    Manual Syntax Examples:

    • Simple heading/numbering widget:
    > [#1008] 01
    • Complex article recommendation component:
    > [#4001] 文章推荐
    > > ### 2026-09-06
    > > [文章标题](https://example.com)
    > > ![[文章封面.jpg]]
  8. Customize article styles with CSS or LESS

    main

    NoteToMP allows for complete visual control via custom CSS or LESS. By enabling the "Custom" (自定义) theme, you can override default styles. This is recommended for users who want to treat NoteToMP as a highly customizable Markdown → WeChat HTML renderer.

    .note-to-mp {
      font-family: Optima, "Microsoft YaHei", PingFangSC-Regular, serif;
    }
    
    .note-to-mp h2 {
      color: #5ab983;
    }
  9. Convert notes to images

    main
    Using the feature introduced in version 2.3.0, you can convert Obsidian notes directly into images. This is useful for creating social media content (e.g., Xiaohongshu), knowledge cards, or tutorial long-form images. You can configure image dimensions, fonts, margins, and backgrounds before exporting.
  10. Handle images and math formulas

    main

    Image Processing

    NoteToMP handles local images, GIFs, and SVGs. It supports Obsidian's native image resizing syntax:

    ![[image.jpg|480]]        # Specify width, height scales proportionally
    ![[image.jpg|480x360]]    # Specify both width and height

    You can also use the command Ctrl/Cmd + P → Image Background Settings (图片背景设置) to add gradients, borders, shadows, or watermarks.

    Math Formulas

    NoteToMP converts LaTeX and AsciiMath into SVGs compatible with WeChat. You can use inline/block syntax or explicit code blocks:

    $c=\pm\sqrt{a^2+b^2}$
    
    $$
    c=\pm\sqrt{a^2+b^2}
    $$

    Or via code blocks:

    ```latex
    c=\pm\sqrt{a^2+b^2}
    c=+-sqrt(a^2+b^2)