mirror of
https://github.com/hxwguang/obsidian-live-preview.git
synced 2026-07-22 06:59:06 +00:00
fix: rename plugin from 'Live Preview' to 'HTML Preview' to comply with Obsidian directory policy
The name 'Live Preview' conflicts with Obsidian's built-in editor mode, causing the plugin to be hidden from the community directory. Renamed to 'HTML Preview' across all source files, docs, and build output. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
4e653234b1
commit
8e71733adb
6 changed files with 17 additions and 17 deletions
10
README.md
10
README.md
|
|
@ -1,4 +1,4 @@
|
|||
# Obsidian Live Preview
|
||||
# Obsidian HTML Preview
|
||||
|
||||
[English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
||||
|
|
@ -17,14 +17,14 @@ A live HTML preview plugin for [Obsidian](https://obsidian.md), inspired by VSCo
|
|||
|
||||
### Obsidian Community Plugins
|
||||
|
||||
Search "Live Preview" in **Settings → Community plugins → Browse**, then install and enable.
|
||||
Search "HTML Preview" in **Settings → Community plugins → Browse**, then install and enable.
|
||||
|
||||
### Manual
|
||||
|
||||
1. Download `main.js`, `manifest.json`, and `styles.css` from the [latest release](https://github.com/HxWGuang/obsidian-live-preview/releases/latest).
|
||||
2. Place the files into `<vault>/.obsidian/plugins/live-preview/`.
|
||||
3. Reload Obsidian (`Cmd/Ctrl + R`).
|
||||
4. Go to **Settings → Community plugins → Installed plugins** and enable **Live Preview**.
|
||||
4. Go to **Settings → Community plugins → Installed plugins** and enable **HTML Preview**.
|
||||
|
||||
### BRAT
|
||||
|
||||
|
|
@ -37,8 +37,8 @@ Search "Live Preview" in **Settings → Community plugins → Browse**, then ins
|
|||
1. Open any `.html` or `.htm` file in your vault — the preview starts automatically in the right sidebar.
|
||||
2. Edit the file. The preview refreshes automatically.
|
||||
3. Use the command palette (`Cmd/Ctrl + P`):
|
||||
- **Start Live Preview** — Manually start the preview for the active HTML file.
|
||||
- **Stop Live Preview** — Shut down the local server.
|
||||
- **Start HTML Preview** — Manually start the preview for the active HTML file.
|
||||
- **Stop HTML Preview** — Shut down the local server.
|
||||
- **Open Preview in Browser** — Open the current preview page in your system browser.
|
||||
|
||||
## Settings
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
# Obsidian Live Preview
|
||||
# Obsidian HTML Preview
|
||||
|
||||
[English](README.md) | [简体中文](README.zh-CN.md)
|
||||
|
||||
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
### Obsidian 社区插件市场
|
||||
|
||||
在 **设置 → 第三方插件 → 浏览** 中搜索 "Live Preview",安装并启用。
|
||||
在 **设置 → 第三方插件 → 浏览** 中搜索 "HTML Preview",安装并启用。
|
||||
|
||||
### 手动安装
|
||||
|
||||
1. 从 [最新 Release](https://github.com/HxWGuang/obsidian-live-preview/releases/latest) 下载 `main.js`、`manifest.json`、`styles.css`。
|
||||
2. 放入 `<笔记仓库>/.obsidian/plugins/live-preview/`。
|
||||
3. 重新加载 Obsidian(`Cmd/Ctrl + R`)。
|
||||
4. 在 **设置 → 第三方插件 → 已安装插件** 中启用 **Live Preview**。
|
||||
4. 在 **设置 → 第三方插件 → 已安装插件** 中启用 **HTML Preview**。
|
||||
|
||||
### 通过 BRAT 安装
|
||||
|
||||
|
|
@ -37,8 +37,8 @@
|
|||
1. 在文件列表中打开任意 `.html` 或 `.htm` 文件,预览自动在右侧面板启动。
|
||||
2. 编辑文件内容,预览自动刷新。
|
||||
3. 使用命令面板(`Cmd/Ctrl + P`):
|
||||
- **Start Live Preview** — 为当前 HTML 文件手动启动预览。
|
||||
- **Stop Live Preview** — 关闭本地服务器。
|
||||
- **Start HTML Preview** — 为当前 HTML 文件手动启动预览。
|
||||
- **Stop HTML Preview** — 关闭本地服务器。
|
||||
- **Open Preview in Browser** — 在系统浏览器中打开当前预览页面。
|
||||
|
||||
## 设置
|
||||
|
|
|
|||
4
main.js
4
main.js
|
|
@ -3989,7 +3989,7 @@ var PreviewView = class extends import_obsidian.FileView {
|
|||
}
|
||||
getDisplayText() {
|
||||
var _a, _b;
|
||||
return (_b = (_a = this.file) == null ? void 0 : _a.name) != null ? _b : "Live Preview";
|
||||
return (_b = (_a = this.file) == null ? void 0 : _a.name) != null ? _b : "HTML Preview";
|
||||
}
|
||||
getIcon() {
|
||||
return "globe";
|
||||
|
|
@ -4136,7 +4136,7 @@ var LivePreviewPlugin = class extends import_obsidian3.Plugin {
|
|||
try {
|
||||
await this.liveServer.start(rootDir);
|
||||
} catch (err) {
|
||||
new import_obsidian3.Notice(`Live Preview: Failed to start server \u2014 ${String(err)}`);
|
||||
new import_obsidian3.Notice(`HTML Preview: Failed to start server \u2014 ${String(err)}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"id": "live-preview",
|
||||
"name": "Live Preview",
|
||||
"version": "1.0.1",
|
||||
"name": "HTML Preview",
|
||||
"version": "1.0.2",
|
||||
"minAppVersion": "0.16.0",
|
||||
"description": "Live HTML preview with local HTTP server and auto-reload, like VSCode Live Preview.",
|
||||
"author": "HxGuang",
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ export class PreviewView extends FileView {
|
|||
}
|
||||
|
||||
getDisplayText(): string {
|
||||
return this.file?.name ?? "Live Preview";
|
||||
return this.file?.name ?? "HTML Preview";
|
||||
}
|
||||
|
||||
getIcon(): string {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ export default class LivePreviewPlugin extends Plugin implements PreviewControll
|
|||
try {
|
||||
await this.liveServer.start(rootDir);
|
||||
} catch (err) {
|
||||
new Notice(`Live Preview: Failed to start server — ${String(err)}`);
|
||||
new Notice(`HTML Preview: Failed to start server — ${String(err)}`);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
@ -137,4 +137,4 @@ export default class LivePreviewPlugin extends Plugin implements PreviewControll
|
|||
async saveSettings(): Promise<void> {
|
||||
await this.saveData(this.settings);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue