GithubHelp home page GithubHelp logo

bfehub / vmi Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 6.0 2.22 MB

用于组件开发场景的 VuePress 的插件和主题。

Home Page: https://bfehub.github.io/vmi/zh/guide/

License: MIT License

JavaScript 0.69% Shell 0.08% TypeScript 48.21% Vue 29.68% SCSS 20.78% HTML 0.56%
vmi vuepress vuepress-theme

vmi's Introduction

vmi

文档及演示

当前依赖 VuePress v2.0.0-beta.60 版本

Vmi 是一个用于组件开发场景的 VuePress 的插件集合。尽量通过插件能有相似 Dumi 的 Demo 体验,又能保持 VuePress 强大的文档编写能力。

特性

  • 强大的 demo 演示能力,支持多种展示模式。

  • 支持页面路径映射,自定义组织组件文档。

  • 支持翻译缺失,自动生成缺失语言的页面。

  • 主题样式布局同步(待完善)。

示例

亮色模式

light

暗黑模式

dark

Issue

If you have a better suggestion, please create an issue

License

The code is released under the MIT license

vmi's People

Contributors

github-actions[bot] avatar haiweilian avatar hawtim avatar

Stargazers

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

Watchers

 avatar

vmi's Issues

请教一下Vue2 + Vuepress 1的实现思路(2)

之前的方法在 md 文件中写死的情况下确实是可行的,但是在实时分析 标签并渲染组件的情况下不太可行。

逻辑大致是这样:在 html_inline 函数中解析 并渲染 demo 和 demo 源码,同时往 store 里存 demo 的组件名称和路径;然后在 render 中添加 <script setup> 注册 demo 组件。

但问题在于 render 函数是先于 html_inline 函数执行的,因此并不能正确的拿到 store 的组件名称和路径。

我想了很多方法始终解决不了这个问题,麻烦解答一下,万分感谢!!!

请教一下Vue2 + Vuepress 1的实现思路

vmi
我看了一下源码,大致整理了一下渲染 demo 的逻辑,想要在 Vuepress 1中实现一下,但是发现 Vuepress 1 中 extendPageData 传过来的 page 对象没有 sfcBlocks 属性,没法将 demo 注册为页面可以使用的组件;我想了各种办法去实现,最后都行不通;我第一次写 Vuepress 插件还不太熟悉,想请教一下 Vuepress 1的实现思路,万分感谢!

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.