mirror of
https://github.com/darkings/Obsidian-MonokaiSyntax.git
synced 2026-07-22 04:40:26 +00:00
整理项目文档与构建脚本
- 合并 AGENTS.md 到 AGENTS.md,统一项目规范文件 - CHANGELOG.md 中文化 - README.md 添加双语切换、GitHub 链接、宣传图、下一版本规划 - 新增 README.en.md 英文版本 - build:vault 支持自定义 Vault 路径参数 - docs/ 迁移到 Obsidian 项目目录,仓库仅保留临时整理区
This commit is contained in:
parent
a3daf058d3
commit
660cb2b0ba
7 changed files with 103 additions and 20 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -2,5 +2,4 @@ node_modules/
|
|||
.claude/settings.local.json
|
||||
.claude/statusline-command.sh
|
||||
docs/
|
||||
AGENTS.md
|
||||
CLAUDE.md
|
||||
|
|
|
|||
21
CHANGELOG.md
21
CHANGELOG.md
|
|
@ -1,12 +1,13 @@
|
|||
# Changelog
|
||||
# 更新日志
|
||||
|
||||
## 1.0.0 (unreleased)
|
||||
## 1.0.0(未发布)
|
||||
|
||||
- Initial release of Monokai Syntax
|
||||
- Monokai Pro dark and light color palettes
|
||||
- SCSS modular architecture with Vite build toolchain
|
||||
- CodeMirror 6 syntax highlighting token colors
|
||||
- Custom file tree icons (monokai-pro-icons font)
|
||||
- Style Settings integration (5 filter themes, compact mode, monochrome icons, accent overrides)
|
||||
- Graph view and Canvas plugin styles
|
||||
- WCAG contrast ratio compliance
|
||||
- Monokai Syntax 初始版本
|
||||
- Monokai Pro 深色与浅色调色板
|
||||
- SCSS 模块化架构 + Vite 构建工具链
|
||||
- CodeMirror 6 语法高亮 token 配色
|
||||
- 自定义文件树图标(monokai-pro-icons 字体)
|
||||
- Style Settings 集成(5 种滤镜主题、紧凑模式、单色图标、强调色覆盖)
|
||||
- 关系图谱与 Canvas 插件样式
|
||||
- WCAG 对比度合规
|
||||
- Callout 与块引用 Monokai Pro 风格重设计(语义色左竖线、代码符号图标)
|
||||
|
|
|
|||
BIN
MonokaiSyntax.png
Normal file
BIN
MonokaiSyntax.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 MiB |
70
README.en.md
Normal file
70
README.en.md
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# Monokai Syntax
|
||||
|
||||
[中文](./README.md) | [GitHub](https://github.com/Darkings/Obsidian-MonokaiSyntax)
|
||||
|
||||
Monokai Syntax is a community theme for Obsidian that aims to reproduce the Monokai Pro dark and light visual language in knowledge management contexts.
|
||||
|
||||

|
||||
|
||||
## Next Version Plan
|
||||
|
||||
- Polish project icons
|
||||
- Refine project details
|
||||
- Improve Style Settings plugin integration
|
||||
|
||||
## Project Status
|
||||
|
||||
Currently in early development stage. The foundational engineering scaffolding, Vite build pipeline, Stylelint checks, and test vault sync workflow are complete.
|
||||
|
||||
## Install Dependencies
|
||||
|
||||
```powershell
|
||||
npm install
|
||||
```
|
||||
|
||||
## Common Commands
|
||||
|
||||
Lint SCSS:
|
||||
|
||||
```powershell
|
||||
npm run lint:css
|
||||
```
|
||||
|
||||
Build the theme:
|
||||
|
||||
```powershell
|
||||
npm run build
|
||||
```
|
||||
|
||||
Build and sync to test vault:
|
||||
|
||||
```powershell
|
||||
npm run build:vault # Default vault
|
||||
npm run build:vault -- D:/your/Obsidian/Vault # Custom vault
|
||||
```
|
||||
|
||||
## Local Testing
|
||||
|
||||
Default test vault path:
|
||||
|
||||
```text
|
||||
C:\Users\Jie\iCloudDrive\iCloud~md~obsidian\SecondBrain
|
||||
```
|
||||
|
||||
To use your own vault, append the path to the command:
|
||||
|
||||
```powershell
|
||||
npm run build:vault -- D:/your/Obsidian/Vault
|
||||
```
|
||||
|
||||
The theme files will be synced to `.obsidian\themes\Monokai Syntax` under the target vault.
|
||||
|
||||
You can then enable `Monokai Syntax` in Obsidian's Appearance settings.
|
||||
|
||||
## Remote Resource Constraints
|
||||
|
||||
The theme CSS must not load remote resources at runtime. Remote `@import`, remote font URLs, or remote image URLs are prohibited in the final theme CSS. Any fonts, icons, or image assets must be localized and their licenses verified.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License. See [LICENSE.md](./LICENSE.md) for details.
|
||||
23
README.md
23
README.md
|
|
@ -1,7 +1,17 @@
|
|||
# Monokai Syntax
|
||||
|
||||
[English](./README.en.md) | [GitHub](https://github.com/Darkings/Obsidian-MonokaiSyntax)
|
||||
|
||||
Monokai Syntax 是一个面向 Obsidian 的社区主题,目标是在知识管理场景中复现 Monokai Pro 的深色与浅色视觉语言。
|
||||
|
||||

|
||||
|
||||
## 下一版本规划
|
||||
|
||||
- 完善项目图标
|
||||
- 完善项目细节
|
||||
- 完善与 Style Settings 插件的联动
|
||||
|
||||
## 项目状态
|
||||
|
||||
当前项目处于早期开发阶段,已经完成基础工程化脚手架、Vite 构建、Stylelint 检查和测试 Vault 同步流程。
|
||||
|
|
@ -29,23 +39,26 @@ npm run build
|
|||
构建并同步到测试 Vault:
|
||||
|
||||
```powershell
|
||||
npm run build:vault
|
||||
npm run build:vault # 默认 Vault
|
||||
npm run build:vault -- D:/你的/Obsidian/Vault # 自定义 Vault
|
||||
```
|
||||
|
||||
## 本地测试
|
||||
|
||||
本项目当前使用以下 Obsidian Vault 作为测试环境:
|
||||
默认测试 Vault 路径:
|
||||
|
||||
```text
|
||||
C:\Users\Jie\iCloudDrive\iCloud~md~obsidian\SecondBrain
|
||||
```
|
||||
|
||||
运行 `npm run build:vault` 后,主题文件会同步到:
|
||||
如需使用自己的 Vault,在命令后追加路径即可:
|
||||
|
||||
```text
|
||||
C:\Users\Jie\iCloudDrive\iCloud~md~obsidian\SecondBrain\.obsidian\themes\Monokai Syntax
|
||||
```powershell
|
||||
npm run build:vault -- D:/你的/Obsidian/Vault
|
||||
```
|
||||
|
||||
运行后,主题文件会同步到对应 Vault 的 `.obsidian\themes\Monokai Syntax` 目录下。
|
||||
|
||||
之后可在 Obsidian 的外观设置中启用 `Monokai Syntax`。
|
||||
|
||||
## 远程资源约束
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
"qa:verify": "node scripts/verify-qa.js",
|
||||
"build:dev": "vite build --mode development",
|
||||
"sync:vault": "node scripts/sync-vault-theme.js",
|
||||
"build:vault": "npm run build && npm run sync:vault",
|
||||
"build:vault": "npm run build && node scripts/sync-vault-theme.js",
|
||||
"release:pack": "npm run verify:pip-editor && npm run verify:icons && npm run verify:graph && npm run verify:active-visual && npm run lint:css && npm run check:contrast && npm run build && npm run audit:css"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ import { copyFileSync, mkdirSync } from "node:fs";
|
|||
import { resolve } from "node:path";
|
||||
|
||||
const rootDir = resolve(import.meta.dirname, "..");
|
||||
const vaultThemeDir = resolve(
|
||||
"C:/Users/Jie/iCloudDrive/iCloud~md~obsidian/SecondBrain/.obsidian/themes/Monokai Syntax",
|
||||
);
|
||||
const defaultVaultRoot = "C:/Users/Jie/iCloudDrive/iCloud~md~obsidian/SecondBrain";
|
||||
const vaultRoot = process.argv[2] ?? defaultVaultRoot;
|
||||
const vaultThemeDir = resolve(vaultRoot, ".obsidian/themes/Monokai Syntax");
|
||||
|
||||
mkdirSync(vaultThemeDir, { recursive: true });
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue