obsidian-shiki-plugin icon indicating copy to clipboard operation
obsidian-shiki-plugin copied to clipboard

[FR] Release a min version (new repo)

Open LincZero opened this issue 5 months ago • 1 comments

It is hoped to create an organization for this purpose! @mProjectsCode

  • Can include an obsidian-codeblock-enhance-min, the new repository can help people download the min version via brat. (Just like one of my plugins: https://github.com/any-block/obsidian-any-block-min)
  • #51 PR may be not be merged? It feels too different from the initial plugin architecture. Most of the old code has not been used (This was something I didn't think of at the beginning). It can be used as a new plugin?
  • In the new architecture, there are some things involved in modifying the content of the editor. A new warehouse might be needed to declare and avoid risks, avoid introducing risks.

Improvement of min version

  • Load Time: 714ms -> 19ms The improvement in loading time only represents the environment of my computer. The degree of optimization varies among different devices Image
  • Size: 9.4MB -> 5.0KB
  • Function: Most dependencies and functions have been removed. Only retain the characteristics:
    • The real-time mode uses the same code renderer as the reading mode (Obsidian's built-in PrismJS). This makes them look more unified.
    • Real-time editing

raw version feat

In addition, new options have been added to the non-Min version:

  • Feat: Select the rendering engine: Shiki / PrismJS By the way, when I saw a lot of PrismJS elements in the code, I felt that this plugin used prismjs before and only changed to shiki later?
  • Docs: Explain the differences among different renderers, and their additional functions.

about link

  • #51 PR and close this
  • #41

LincZero avatar May 21 '25 02:05 LincZero