npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

vuepress-plugin-reveal-js

v0.0.5

Published

A plugin for adding reveal.js to VuePress.

Downloads

22

Readme

vuepress-plugin-reveal-js

支持在vuepress中使用reveal.js

demo

安装

使用npm安装插件:

npm i vuepress-plugin-reveal-js

或者使用yarn安装插件:

yarn add vuepress-plugin-reveal-js

快速使用

在VuePress配置文件中启用插件:

//.vuepress/config.js
module.exports = {
    plugins: [["reveal-js"]]
  }

现在已经开始使用啦!

在markdown文件中使用reveal.js:

:::reveal
<section>
  <h2>vuepress theme qbook</h2>
</section>
<section>
  <p>a blog theme by open17</p>
</section>
:::

## 更多配置
### 全局配置
在插件中传入的配置为全局配置,对所有markdown中的reveal容器都起作用
```js
//.vuepress/config.js
module.exports = {
    plugins: [
      [
        "pad-markdown",
        {
          theme: "dracula", //主题,见 https://revealjs.com/themes/
          plugins: [Markdown.default, RevealHighlight.default, RevealMath.KaTeX], //插件,目前仅支持官方插件
          //... 同样支持reveal原生配置,详见 https://revealjs.com/config/
        }
      ]
    ],
  }

局部配置

在markdown文件中使用局部配置,对当前markdown文件中的某个reveal容器起作用 局部配置通过frontmatter传入,传入的配置会覆盖全局配置

---
your_config_name:
    theme: "night"  
    width: 1200
    autoSlide: 5000
    loop: true

---
:::reveal your_config_name
<section>
  <h2>vuepress theme qbook</h2>
</section>
<section>
  <p>a blog theme by open17</p>
</section>
:::

你可以在一个页面多个reveal容器中使用不同的局部配置,只需传入对应的名字即可

---
config_a:
    theme: "night"  

config_b:
    theme: "dark"  
---
:::reveal config_a
<section>
  <h2>vuepress theme qbook</h2>
</section>
<section>
  <p>a blog theme by open17</p>
</section>
:::

:::reveal config_b
<section>
  <h2>vuepress theme qbook</h2>
</section>
<section>
  <p>a blog theme by open17</p>
</section>
:::

配置优先级

当你不传入配置时,默认配置为:

let config = {
  plugins: [Markdown.default, RevealHighlight.default, RevealMath.KaTeX],
  width: 960,
  height: 700,
  margin: 0.04,
  minScale: 0.2,
  maxScale: 2.0,
  embedded: true,
  theme: "dracula",
};

当配置中有重复的项将会按照优先级覆盖:

局部配置>全局配置>默认配置

:::reveal your_config_name


## License

[MIT](LICENSE)