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-archive

v1.1.3

Published

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

Downloads

7

Readme

vuepress-plugin-archive

::: tip

这是vuepress2的一个文章归档时间轴的一个插件

:::

image-20211122003904803

安装

npm i vuepress-plugin-archive
//docs/.vuepress/config.js

const { path } = require("@vuepress/utils");

module.exports = {
    //在这里配置插件
    plugins: [
        [
            'archive',
            {
                //需要排除的页面url,在该数组里面的路径,都不会被统计
                excludes: ['/footer.html','/404.html','/about/','/mood/','/link/','/tag/','/photo/'],
                //当某篇文章没有标题时,将使用下面值进行替换
                noTitle: '暂时没有标题配置'
            }
        ],
}

当你配置好之后,该插件会注册一个全局组件<AuroraArchive></AuroraArchive>,你可以在任何地方使用该组件,从而在你网站中,开启文章归档功能,同时该插件会默认注册一个路由,你可以直接在浏览器中,打开该路由,查看归档页面/aurora-archive

如果你使用的不是vuepress-theme-aurora主题,那么你可以像下面这样为你网站添加归档功能

  1. 创建archive.md文件,在docs目录下,创建一个archive.md文件

  2. 在该md文件中,加入下面内容就可以了

    ---
    layout: AuroraArchive
    ---
  3. 打开浏览器,输入localhost:[8080]/archive.html,你就可以看到该归档页面了

配置

noTitle

  • String

暂时没有标题配置

excludes

  • Array

需要排除的页面url,在该数组里面的路径,都不会被统计

excludes: ['/footer.html','message.html','/v1.3.0/']

image-20211122004613835

css样式

你可以在docs/.vuepress/styles/index.css文件中,设置下面样式变量

::: tip

如果你使用的不是vuepress-theme-aurora主题,那么请先看vuepress官方关于palette的介绍,官方默认使用的就是SASS ,对应的你需要在docs/.vuepress/styles/index.sass中,覆盖下面的样式变量

:::

:root {
    /* 时间线颜色 */
    --archive-timeline: rgba(144, 241, 239, 0.35);

    /* 鼠标移动到某个标题上,时间线上的圆点颜色 */
    --archive-timeline-active: pink;

    /* 鼠标移动到某个标题上,标题颜色 */
    --archive-timeline-active-title: pink;

    /* 归档页面的宽度 */
    --archive-box-width: 80%;
}

如果你想设置背景颜色,请自行f12查看对应类名,然后在docs/.vuepress/styles/index.css文件中,设置对应类名的css样式