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

easy-github-pages

v1.2.0

Published

[![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg)](https://opensource.org/licenses/mit-license.php) [![npm](https://img.shields.io/npm/v/easy-github-pages.svg)](https://www.npmjs.com/package/easy-github-pages) [![size](https://img.shields.io/bun

Downloads

25

Readme

easy-github-pages | 一分钟搭建 GitHub Pages 的 Vue 组件

MIT Licence npm size download

介绍

一个 Vue 组件, 用于小项目快速搭建 GitHub Pages 和 单页博客, 页面的样式布局和代码高亮已经都封装好了, 开箱即用

效果演示

效果图

创作原因

因为最近一直在写 Vue 相关的 GitHub 开源项目, 每个项目都需要有说明文档, 所以这里就直接开源出来一个快速搭建 GitHub Pages 的 Vue 组件。

示例

安装

npm install easy-github-pages --save-dev

使用

// 局部引入
import EasyGithubPages from 'easy-github-pages'
export default {
  components: {
    EasyGithubPages
  }
}
// 全局引入
import EasyGithubPages from 'easy-github-pages'
Vue.component(EasyGithubPages.name, EasyGithubPages)

模板

  • 代码部分, 标签必须转为字符实体, 例如 < 必须转为 &lt; , 可以使用转码网站
  • 默认支持 html、css、js 的语法高亮, 如果需要其他语言的高亮, 请去prismjs 官网下载相应的语言包, 并引入即可
  • 如果需要 prismjs 的插件功能, 直接引入相应的插件即可, 无需再引入 prismjs
<easy-github-pages
  :menus="[
    {
      title: '介绍',
      href: 'intro'
    },
    {
      title: '安装',
      href: 'install'
    },
    {
      title: '使用',
      href: 'usage'
    }
  ]"
  author="zhangchaojie"
  homepage="https://github.com/dream2023"
  githubUrl="https://github.com/dream2023/easy-github-pages"
  title="easy-github-pages | 快速搭建 GitHub Pages 的 Vue 组件"
>
  <section id="intro">
    <h2>介绍</h2>
    <p>xxx</p>
  </section>
  <section id="install">
    <h2>安装</h2>
    <p>
      <blockquote>npm install xxx</blockquote>
    </p>
  </section>
  <section id="usage">
    <h2>使用</h2>
    <p>
      <blockquote>
        <pre class="language-html">
          <code  class="language-html">
&lt;easy-github-pages&gt;  内容xxx(注意标签必须转换为字符实体, 例如 < 必须转为 &lt;, 可以使用网站转码 https://www.sojson.com/rehtml )  &lt;/easy-github-pages&gt;
          </code>
        </pre>
      </blockquote>
    </p>
  </section>
</easy-github-pages>

Props 参数

props: {
  // 文章标题
  title: String,
  // 文章对应的GitHub项目
  githubUrl: String,
  // 作者名称
  author: String,
  // 作者的个人主页或者GitHub主页(这里如果不填的话, 则使用githubUrl)
  homepage: String,
  // menu 导航菜单
  menus: {
    type: Array,
    default () {
      return []
    }
  }
}

相关技术

  • 整体风格参照了阮一峰老师的博客
  • 代码高亮使用了 prismjs