Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

文档设置默认的主题和插件 【feature request】 #60

Closed
tthaha110 opened this issue May 16, 2024 · 2 comments
Closed

文档设置默认的主题和插件 【feature request】 #60

tthaha110 opened this issue May 16, 2024 · 2 comments

Comments

@tthaha110
Copy link

首先感谢提供这个工具,很符合我的心意,比起思源笔记定制化更高更随意。简单试用了下,发现切换md文档,使用的是全局设置。如果所有的文件想要的效果一致道还好,如果希望每个文件的风格不一样,每次都需要单独设置,不是很方便。

设想

在文档头部添加meta信息,可以设置主题,渲染方式。打开文档默认就能使用这些信息进行渲染,如果没有设置就使用全局的设置。

扩展

全局可以设置插件【固定目录】--主题插件、react组件、jsx组件之类的,也可以在meta中制定使用到的组件。如果是全局组件就直接导入渲染,大大增加了内容的表现力。

@maqi1520
Copy link
Owner

很棒的创意,一起参与建设吗?

@maqi1520
Copy link
Owner

maqi1520 commented May 28, 2024

请尝试 v0.9.0 版本
使用在项目目录中新建 plugins/themes/ 目录, 在该目录建立 css 和 js 文件,就可以在 md 文档头部添加 frontmatter 属性theme,theme 值与 css 和 js 文件名一致,若无法读取 js 和 css 文件,则使用全局样式文件。

20240527204317

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants