NotePress
unlistedby Wu-Wh0
在 Obsidian 中预览并发布文章到 WordPress。
NotePress
English | 简体中文
Write in Obsidian, preview the local note and the saved WordPress work draft, and publish to the original article after confirmation.
Stable paired release 0.3.5 uses one Obsidian desktop plugin and one WordPress plugin. Import and link a Markdown work draft, paste screenshots in Obsidian, then review and hand back your changes. Both plugins can preview the saved draft before you confirm publication.
Follow Install both plugins and Write and publish. GitHub may require sign-in to download release assets.
Legacy one-way publishing and migration
Version 0.2.0 used the Obsidian desktop plugin and WordPress's native HTTPS REST API for one-way publishing. Its setup and publication steps below apply to that version. To move an existing installation forward, see Upgrading from 0.1.0 or the 0.2.0 upgrade notes under Install both plugins.
What it does
- A local blog-style preview, with formulas, tables, code, and referenced images.
- Explicit publishing and same-post updates, with remote readback before reporting success.
- Conflict detection and conservative recovery when a write result is uncertain.
- Explicit association recovery after a published note is renamed or moved.
- Simplified Chinese and English interface options, plus optional local preview CSS.
Release 0.2.0 is not a two-way sync tool. Your Obsidian note remains the source of the article, and the preview does not reproduce every WordPress theme pixel for pixel. It cannot overwrite articles protected by a site's Markdown workbench.
Requirements
- Obsidian desktop 1.11.4 or later; mobile is not supported.
- A WordPress site reachable over HTTPS, with REST API and application passwords enabled.
- A WordPress author account with permissions to publish posts and upload files.
The plugin is not currently listed in the Obsidian community marketplace.
Installation
Manual installation
- Sign in with an authorized GitHub account and download
notepress.zipfrom the NotePress release, or downloadmain.js,manifest.json, andstyles.cssseparately. - Put those three files directly in
<vault>/.obsidian/plugins/notepress/. Do not leave an extra nested directory after extracting the ZIP. If you use a custom Obsidian configuration directory, replace.obsidianwith that directory. - Restart Obsidian and enable NotePress in Settings → Community plugins.
Optional BRAT installation for the released plugin
If you already use BRAT, the repository is Wu-Wh0/NotePress. Private repository access also applies to BRAT downloads; use manual installation if that access is unavailable. Never put a GitHub token in NotePress settings. BRAT is optional and is not a requirement for the paired product. Review release notes before upgrading, and migrate 0.1.0 first rather than enabling both copies.
First publish
- Open NotePress settings. Choose 简体中文 or English; the default is Chinese.
- Enter your WordPress HTTPS root URL and author username.
- Select an application password through Obsidian's secure storage, then click Test connection.
- Open a Markdown article and run Open blog preview. Resolve any warnings shown in the preview.
- Click Publish article. After the result is verified, use View article to open the post on your blog.
Later edits stay local until you click Update article. NotePress uses the recorded post ID rather than creating another article. Changing the interface language does not translate your article or change connection settings.
WordPress application password
An application password lets this plugin act as your WordPress author through the API: upload referenced images, publish and update articles. It is not your website login password, and you can revoke it separately. It uses the account's existing permissions, not a plugin-specific restricted permission set.
- In your site's WordPress dashboard, open Users → Profile → Application Passwords and create an entry for Obsidian. WordPress shows the generated password only once.
- In the plugin's Application password selector, add that password to Obsidian's secret storage, save it and select it. The secret name is only a local label: choose any name you recognize. Adding a local secret does not generate a WordPress application password. Plugin settings save only the reference, not the password.
- Enter the matching HTTPS site and WordPress username, then use Test connection. Do not paste credentials into notes, chat, URLs or logs.
- To revoke access, remove this entry under the same WordPress Application Passwords section. Deleting an Obsidian secret alone does not revoke server access. If the WordPress section is missing, check that your version supports application passwords, the site uses HTTPS and the site administrator has not disabled them.
The settings page also provides this help in a short expandable section.
Upgrading from 0.1.0
Version 0.1.0 is named 博客发布 and uses the ID wordpress-publisher. NotePress 0.2.0 uses notepress. This ID change needs a one-time local migration; BRAT installation alone does not move the old plugin's data.
Preserve the entire old plugin directory, including data.json and journal/. They contain connection references and publication associations. Losing the journal can make an existing article look unpublished.
Before migration, finish or resolve any pending publication and close Obsidian. Keep a recovery copy of the old plugin directory and community-plugins.json outside the active plugin directory. Rename plugins/wordpress-publisher/ to plugins/notepress/, replace only the three installation files with the new release, and replace the enabled ID wordpress-publisher with notepress in community-plugins.json. Preserve all other enabled plugin IDs and existing data files.
If both directories already exist, stop and resolve the conflict; do not merge their journals or enable both copies. After restarting, check the connection settings and the association of a previously published article before clicking Publish or Update. You can then register the repository in BRAT for future updates.
Supported content
| Content | Behavior |
|---|---|
| Markdown paragraphs, headings, lists, tables, code | Supported |
| Inline and block formulas | Local KaTeX preview; native MathML in published content |
| Obsidian image embeds and Markdown images | Uploads only referenced, resolved local images |
| Wikilinks | Converts to visibly marked display text; does not export linked notes or vault paths |
| Note properties | Excluded from publication content |
| Non-image note embeds, dynamic plugin queries, raw HTML, hidden Obsidian comments | Blocks publication; literal comment delimiters in code stay literal |
| Remote or ambiguous images | Does not download or guess; asks you to fix the reference |
For old-site image URLs or root-relative /images/ paths, deliberately move the image into your vault and update the reference. NotePress does not migrate or download these images automatically.
Local preview title position
In Settings → NotePress → Local preview title position, choose Article header or Article footer to place the title in its own section inside the local preview article. Choose Default to restore the original layout. Vault CSS can style article > header, article > footer and .article-body in either optional layout. The setting affects only the local preview.
Local preview CSS
Create styles/blog.css in the Vault and paste in this example. In Settings → NotePress → Local preview CSS, enter styles/blog.css. Run Open blog preview to see the lavender background and article border. Clear the setting to restore the built-in style. Saved file changes refresh locally, and invalid or missing files fall back with a warning.
body {
background: #f4e5f5;
color: #3d2045;
}
article {
max-width: 36rem;
border-inline-start: 4px solid #8a4b93;
padding-inline-start: 1rem;
}
Vault CSS applies only to the Obsidian local preview, including edits awaiting handback. Site preview, work drafts and published content are independent of the file. See the single-post template example for WordPress layout and styles.
Files must be non-hidden, non-linked CSS files inside the vault and at most 128 KiB. External resource references (@import, url(), image-set()), CSS escapes, and < are unsupported. Bundled offline formula fonts remain available.
Recovery and publishing limits
Renamed or moved notes
Use Restore published article association and confirm the former Vault-relative path. The former path must no longer exist. Recovery requires a completed local receipt on the same site and for the same author; NotePress checks the exact remote post before restoring the local association.
Recovery itself never publishes, uploads, edits your Markdown, or creates another post. Review the preview, then click Update article separately. After an external move or a cold start, restore the association before publishing: NotePress cannot prove identity from an article's title or content and does not search your vault to guess it.
Uncertain results or remote changes
If a write result is uncertain, use Check result when available. Do not delete the publishing journal or repeatedly click Publish to force a retry. A remote article change blocks overwrite rather than silently replacing it.
Known-ID drafts and final post writes can be verified by exact readback. New-article creation uses a temporary correlation slug to support read-only checking; a client-generated ID is not a WordPress idempotency guarantee. Older unanchored create records and uncertain image uploads remain blocked for manual checking.
WordPress native REST has no atomic transaction or compare-and-swap guarantee. A remote edit can race after a baseline read, and uploaded media can become publicly reachable before the article is published. Substantive filtering or mismatching content blocks completion rather than being reported as success.
Technical recovery boundaries
- Only a unique, strictly verified create-anchor candidate can be adopted; lookup never writes remotely or retries creation. Observed ambiguity or an interrupted durable lookup stays blocked. The temporary anchor is cleared before final publication and must not remain in the final slug or link.
- Known-ID draft continuation requires exact owner, status, title, content, and plan readback. A separate publish click rechecks the baseline and continues that ID without repeating creation or acknowledged uploads.
- Pending operations cannot be moved to another note association. Retired paths cannot reuse the old receipt. Association records store path hashes and stable IDs, not readable paths or note contents.
- If local storage cannot save a rename guard, the current session blocks publishing but cannot promise that a new guard survives restart.
- The durable journal contains hashes, IDs, and safe URLs, not article bodies or credentials. Preview title, wrapper, and CSS are separate from published content.
Paired plugins
Install both plugins
The paired plugins require Obsidian desktop 1.11.4 or later, WordPress 7.1.4 or later, and PHP 8.3 or later. The WordPress site needs HTTPS, REST API access, and application passwords.
- Get
notepress.zipandnotepress-wordpress.zipfrom the same paired version. Upload and activatenotepress-wordpress.zipfrom the WordPress Plugins screen. - Extract
notepress.zipinto<vault>/.obsidian/plugins/notepress/and enable NotePress in Settings → Community plugins. - In NotePress settings, enter the site's HTTPS root URL and your author username, then select that account's application password.
To upgrade from 0.2.0 to the paired version, retain the NotePress data in your
Vault and install the matching WordPress plugin. Resolve any uncertain legacy
publication before upgrading. Use Select article and check to select the
active Markdown draft and link your existing note. Legacy publication records
do not create paired associations automatically.
Write and publish
In the WordPress dashboard, open 文章 → NotePress 写作 (Posts → NotePress writing) to create a draft, or choose NotePress 写作 from one of your own posts. Enter the Markdown body and click 保存工作稿 (Save work draft) before importing it in Obsidian.
In Obsidian, run Select article and check. The first page loads automatically, and selecting a post checks its current work draft. An active work draft whose base matches current WordPress state can be imported. Preview a new note in an existing folder, choose an existing note from the Vault, or enter its Vault-relative path. Review the title and body, then confirm. For an existing note, you can keep the local body, adopt the work draft or edit a merged body. The note keeps its filename and frontmatter. The association records the exact WordPress title. If either side changes during confirmation, review the refreshed comparison and confirm again.
Adopting or merging the body during import saves verified WordPress images beside the note. If an image is unavailable, the import preserves the reference and lists it in the result. If the note was written but the association failed to save, select that note once it appears in the Vault and confirm again. Associations use Vault-relative paths.
Open the associated note and run Check current note article association to check both sides automatically. Review a one-sided change before adopting the WordPress body or handing back the local body. If both sides changed, the dialog preserves both and blocks handback and publication. Handback keeps the work draft's title, excerpt and terms. After verifying the handback, the dialog loads the preview for that revision. You can also request a preview when both sides already match. Review it and confirm publication to the article ID shown. If a write's outcome is uncertain, use Check the original operation result before continuing.
Paste PNG or JPEG screenshots into the associated note as usual. The check lists the files to upload. Confirm upload and hand back work draft uploads them to the linked article and saves the draft. Repeated references share one WordPress attachment, and the note keeps its local links. The check flags remote images. If an upload result is uncertain, check the original operation and confirm handback again. The confirmed attachments are reused.
For an associated screenshot draft, paste the image, run Check current note article association, review the uploads and confirm handback. Then open Active theme preview and verify the saved revision and images. Use Refresh site preview to read the saved revision and theme again. Publication requires its own confirmation. The preview explains why an unsupported theme or block triggers built-in fallback.
Local preview uses image files in the Vault. A raw notepress-media: reference copied from the WordPress draft is unsupported in local preview. Normal screenshot handback keeps the original local links, and import rewrites references for images it successfully retrieves.
An article-list check is an observation based on two separate reads. Local import, associated-note checks, handback and publication have their own confirmations and version checks.
The product direction is one NotePress plugin on WordPress and one on desktop Obsidian, maintained in this repository and distributed as separate install packages. The intended workflow uses explicit draft handoff, conflict detection and author publishing while preserving the same post ID. Ordinary authors will not need another community plugin, a custom theme, CLI/SSH, Composer, Node/Astro, Python, WSL or a persistent bridge.
See the architecture and protocol for the implemented contracts.
Development commands, dependency pins and verification by change are maintained in CONTRIBUTING. The WordPress guide describes its independent install package and guarded integration checks.
Draft release workflow
The release workflow prepares a GitHub Draft with both paired install packages, checksums and byte-for-byte download verification. A maintainer publishes separately. Version and tag requirements and the release checklist live in CONTRIBUTING.
Modules and evidence
- Architecture: both plugin entries, dependencies and data ownership.
- Protocol: implemented interfaces and consistency limits.
- Contributing: commands, risk-based checks and PR/release workflow.
Local tests, native UI and actual WordPress HTTPS are separate evidence layers. Report security issues using SECURITY, not public issues.
License
The development source in this repository is licensed under the GNU General Public License, version 3 or (at your option) any later version (GPL-3.0-or-later), without warranty. See LICENSE for the full terms. This addition does not update historical release assets. Third-party components retain their own licenses and copyright notices; the product license does not replace them. See THIRD_PARTY_NOTICES.md for the current direct dependencies.
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.