GithubHelp home page GithubHelp logo

siyuan-plugin-system's Introduction

Siyuan Plugin System

中文版本

A plugin system based on 'Code Snippet' function in Siyuan, which a local note system like 'Notion'.

Stargazers over time

Install

Add the load.js content to JS snippets in setting and enable it. Reload the Siyuan to finish auto install.

Plugins

zuoez02/siyuan-plugins

Here are some plugins maybe you can use. :)

Roadmap

Project Siyuan Plugin System

Preview

Plugin system entry Pic1

Plugin system setting Pic2

Plugin system plugin list Pic3

siyuan-plugin-system's People

Contributors

frostime avatar zuoez02 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

siyuan-plugin-system's Issues

为什么 lsNotebooks API 需要一个 sql 参数?

当前的 lsnotebooks api接受一个 sql 参数。

export async function lsNotebooks(sql) {
    let sqldata = { stmt: sql };
    let url = '/api/notebook/lsNotebooks';
    return parseBody(request(url, sqldata));
}

但是我翻了一下思源的 api档案 并没有这个要求。
image

虽然在使用的时候直接传入 "" 也不影响操作,但我还是好奇这个 sql 参数是干什么用的。

关于serverApi.listDocsByPath的参数

目前listDocsByPath提供的参数可能不太够用,对于展开文档树这个操作,实际传入的参数还有notebook和sort。因此希望大佬能支持这两个参数。
源代码:

export async function listDocsByPath(path) {

image

为了兼容现在的参数,一种可能的修改:

export async function listDocsByPath(path, notebook = undefined, sort = undefined) {
    let data = {
        path: path
    };
    if (notebook) data["notebook"] = notebook;
    if (sort) data["sort"] = sort;
    let url = '/api/filetree/listDocsByPath';
    return parseBody(request(url, data));
    //文档hepath与Markdown 内容
}

「功能请求」ServerAPI 实现 renderSprig 功能

思源笔记提供了 renderSprig 接口但是似乎插件 API 里面没有提供。

image

实现代码

export async function renderSprig(template: string) {
    let url = '/api/template/renderSprig';
    return parseBody(request(url, template));
}

「UI改进」插件商店退出插件详情页面后,停留在页面开始的位置

目前在商店页面里,点进去查看插件的详细介绍,后在按「返回」后退回上一个页面时,会直接回到滚动条的开始。
image

目前插件数量尚少还不觉有问题,但是等后面插件数量变多之后,这个行为就会变得很烦人。建议「返回」页面的时候还是回到进入时候的位置。

能否直接在插件管理中,直接看到代码片段

能否直接在插件管理中,直接看到代码片段,然后进行修改代码呢?然后类型转为个人特殊代码(不对外公开)。

这样可能易用性更高一些(想对于查找“代码片段”),也能够直接参考别人的代码,学习之后更容易去写一些简单易用的代码片段。

说实话,我也是接触了这个插件,才察觉到“代码片段”的好处,但是本身不会写JS,十分想参考学习,同时有些功能自己也想做调整。

插件商店为空

使用的是挂件版的插件系统
点开插件商店,里面刷新不出来插件列表
1680744582583

fetch gitee 文件时报错

这段代码返回的sc是 html,

        console.log('local plugin system not found, load online');
        return fetch('https://gitee.com/zuoez02/siyuan-plugin-system/raw/main/main.js', { cache: 'no-cache' }).then((res) => res.text()).then((sc) => {
            window.siyuanPluginScript = sc;
            eval(sc);
        });

插件版本与思源版本的兼容性问题

比如这个issue: https://ld246.com/article/1679136356613/comment/1680145906195#comments
闪卡插件0.0.4在思源2.8.2-dev2上不兼容,那么未来闪卡插件0.0.5针对新版思源更新后,必然有一部分追求稳定的用户不愿意升级新版的思源,那么就可能出现闪卡插件0.0.5和旧版思源不兼容。为了解决这一问题建议引入兼容机制,让插件版本和思源版本匹配,比如闪卡插件0.0.5要求思源版本>=2.8.2.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.