Socket
Socket
Sign inDemoInstall

vuepress-plugin-coze

Package Overview
Dependencies
126
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    vuepress-plugin-coze

为Vuepress静态站点提供在线发布,编辑说说功能,支持图片上传,点赞,评论,用户登录,注册等功能 Provide online publishing, editing and talking functions for Vuepress static sites, support image upload, like, comment, user login, registration and other functions


Version published
Weekly downloads
2
decreased by-97.06%
Maintainers
1
Install size
80.9 MB
Created
Weekly downloads
 

Readme

Source

Vuepress-plugin-coze

introduce

这是Vuepress2的一个插件,该插件提供在线发布,修改说说功能,支持文件上传,登录注册,点赞,评论等功能,使用简单,只需在leancloud中获取到正确的appId,appKey便可以在任何地方使用

安装

因为该插件是基于Vuepress2的,所以在使用该插件之前,请确保你使用的版本为Vuepress2

npm install vuepress-plugin-coze
//docs/.vuepress/config.js
module.exports = {
    plugins: [
        [
            'vuepress-plugin-coze',
            {
                appId: 'leanCloud中得到的appId',
                appKey: 'leanCloud中得到的appKey',
                masterKey: 'leanCloud中得到的masterKey',
                //下面这些是可选的
                avatarPath: 'https://ooszy.cco.vin/img/blog-note/avatar-aurora.png',//说说头像url
                registerPath: '/aurora-register', //自定义插件默认提供的注册页面路由,请在前面加上/
                onlyAdministrator: false //是否运行其他注册的用户发布说说,true表示只有管理员可以发布

            }
        ]

    ],
};

运行你的vuepress应用,待启动完成之后,分别访问/aurora-register/aurora-coze进行用户注册和说说展示,上面的appId配置

截图

  • 说说展示(此效果在我主题中)

image-20211108190928615

  • 发布说说界面

image-20211108191227820

  • 提供的注册界面

    此界面是该插件自动提供的,并且插件也提供了一个没有任何样式的全局组件,你可以自己进行css编写

image-20211108191311008

  • 点赞,评论,编写

    因为时间问题,目前说说评论暂未实现

image-20211108191613515

如果你在使用该插件及Aurora主题的过程中,有任何的问题,都可以通过以下方式联系我

QQ主题交流群微信
image-20211024233827133image-20211024233735110

用户注册

秘钥获取

该插件数据存储于leancloud,进入leanCloud国际版(一定要使用国际版,国内版域名为console.leancloud.cn我没测试过),你如果没有leanCloud账户的话,需要先创建一个有效账户

image-20211108192136530

image-20211108192241757

image-20211108192330231

image-20211108192405575

image-20211108192519797

image-20211108192639202

注册

路由描述
/aurora-register注册用户,登出操作
/aurora-coze说说默认展示页面

/aurora-register是默认注册用户,登出操作页面的路由,如果你在插件配置中设置了registerPath值,那么注册,登出的路由将是registerPath对应值

现在访问/aurora-register路由,注册用户(第一个注册的用户,默认为管理员),你将看到下面页面

image-20211108193700352

输入正确信息点击注册

image-20211108193812105

现在访问/aurora-coze页面

image-20211108193856216

恭喜你,设置成功

主题中展示说说

如果你设置成功,那么便可以将CozeMood组件放在你主题中的任何位置,这是插件注册的全局组件

<div>
	<CozeMood @coze-success="cozeSuccess">
</div>

插件配置信息

插件配置信息

Keywords

FAQs

Last updated on 24 Feb 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc