diff --git a/README.md b/README.md index cdb6133..4b82928 100644 --- a/README.md +++ b/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 `/.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 diff --git a/README.zh-CN.md b/README.zh-CN.md index f627e77..e2739d6 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -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** — 在系统浏览器中打开当前预览页面。 ## 设置 diff --git a/main.js b/main.js index 8d36dcc..8e37aac 100644 --- a/main.js +++ b/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; } } diff --git a/manifest.json b/manifest.json index c8b9067..6c20280 100644 --- a/manifest.json +++ b/manifest.json @@ -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", diff --git a/src/PreviewView.ts b/src/PreviewView.ts index 2299c8e..ced8722 100644 --- a/src/PreviewView.ts +++ b/src/PreviewView.ts @@ -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 { diff --git a/src/main.ts b/src/main.ts index 2f6bd0c..b0dc082 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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 { await this.saveData(this.settings); } -} +} \ No newline at end of file