
內容簡介
Distan 將 WordPress 轉換為靜態 HTML 發佈環境,讓使用者能夠在 WordPress 中編輯內容,然後導出乾淨的、自包含的 HTML 檔案,無需在生產伺服器上安裝 WordPress、PHP 或資料庫。
【主要功能】
• 導出靜態 HTML 檔案,無需伺服器支援
• 支援檢查更新,提供變更記錄
• 自動重寫內部連結為相對路徑
• 將主題檔案和上傳檔案整理至指定資料夾
• 支援 Markdown 格式導出以便於 AI 工作流程
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
Distan turns WordPress into a build environment for static HTML deliverables. You author in WordPress, then export clean, self-contained HTML that runs anywhere. No WordPress, no PHP, and no database are required on the production server.
Distan is designed for projects where the agency maintains the source and hands over HTML files: recruitment sites, campaign pages, or a section of an existing corporate site where another WordPress installation is not an option. Edit in WordPress, regenerate, review the changes, and deliver the files through your existing publishing process.
Built around the handoff
Keep updates reviewable. See added, changed and removed files, download a differential ZIP, and pass on a deletion list. Distan does not delete files on the production server.
Inspect what you actually deliver. Check generated links and development URLs, and review page-level JSON-LD diagnostics. Reports use the generation record, so changing settings later does not change the recorded findings for that build.
Respect existing structured data. Optional basic WebPage JSON-LD fills pages without existing JSON-LD. Theme, SEO-plugin and handwritten JSON-LD take precedence; diagnostics flag issues without repairing the data automatically.
Make the next person’s job easier. Export one page with its referenced assets and editing instructions, or export selected content as Markdown for an AI-assisted workflow.
Keep publishing under your control. Download files or connect your deployment process through hooks. Distan does not store deployment credentials or require a Node.js build toolchain.
What it does
Generates every published page, the posts archive with pagination, category archives with pagination, and a 404 page.
Rewrites internal links as document-relative paths, so the output can be opened directly and placed in any directory.
Flattens WordPress paths: theme files move to assets/, uploads move to media/. The wp-content directory disappears from the deliverable.
Cleans the HTML: removes the generator tag, REST API links, oEmbed, emoji scripts, speculative loading rules, and the development noindex.
Keeps cache-busting query strings on assets, so file names stay stable and can be overwritten over FTP.
Optional sitemap.xml and a minimal robots.txt, built from the pages actually generated, using the production URL.
Optional Markdown export (content.md) that combines every page’s main content into one file — handy for feeding a site into AI tools (Gemini Notebook / NotebookLM, and similar).
Exports a single page as a starting template for an outside coder: that page plus only the assets it references (following stylesheet url() and @import), laid out at their real paths, with a README of ground rules. In-page markers can drop the block-library CSS (distan:no-block-styles) or drop scripts and styles under a path prefix (distan:drop-assets).
Surfaces URLs that WordPress core’s sitemap lists but enumeration missed — a plugin’s thank-you page, a virtual route — and lets you include or ignore each. The choice is remembered across runs, so there is no filter to hand-write.
Reports a diff after each run — which files were added, changed, or need removing from production — and can hand you a ZIP of just the changed files, with a list of what to delete.
Audits internal links and reports any whose target was not generated, and compares against WordPress core’s sitemap to surface pages that enumeration may have missed.
Optionally bundle extra files or directories that nothing links to (distan_extra_assets) — for assets referenced only from inside a script, such as a JSON file fetched by JavaScript.
Downloads the result as a ZIP.
Requirements
Requires WordPress 6.0+, PHP 8.0+, writable uploads and working loopback HTTP (the site being able to request itself). ZIP downloads require ZipArchive. No direct SQL, no exec(), no external binaries, no external APIs. It runs on Local, MAMP, XAMPP, DDEV, Docker, or shared hosting, and works offline.
Not for every case
Distan is not suitable when the client updates the site themselves, or when forms, search, comments, or membership are required. If you need built-in deployment to many destinations, scheduled or change-based publishing, or managed static hosting, a larger tool such as Simply Static or Staatic will fit better.
Structured data: add only what is known, inspect what is delivered
Enable the schema.org option to add basic WebPage JSON-LD to exported pages without existing JSON-LD. Configure the production URL first. Directory and page exclusions use source paths relative to the WordPress home URL, one per line (for example /private/ and /contact/thanks/). Directory rules include descendants; page rules match only that path. Trailing slashes are ignored and query variants share the rule. Existing JSON-LD is retained even when excluded or disabled. Regenerate after changing settings.
Every generated page is also checked for basic JSON-LD syntax and URL consistency, even when automatic additions are off. See the generation screen and delivery report for per-page outcomes, block numbers and issues. Existing data is never automatically repaired. Limited or failed inspection is explicitly recorded. Use Schema.org Validator and Google Rich Results Test for additional validation; this local audit does not guarantee search appearance.
