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

@its2easy/vuepress2-theme

v2.0.0

Published

Vuepress theme for internal projects

Downloads

4

Readme

Vuepress 2 theme

Extends @vuepress/theme-default from vuepress 2 (2.0.0-rc.9 currently)

Install

npm install @its2easy/vuepress2-theme --save

import vuepress2Theme from '@its2easy/vuepress2-theme';
import {defineUserConfig} from 'vuepress';
export default defineUserConfig({
    theme: vuepress2Theme({
        DefaultThemeOptions, // https://ecosystem.vuejs.press/themes/default/config.html
        ThemeData<Vuepress2ThemeLocaleData>,
    }),
});

Prerequisites

Node v18 for project build, maybe node v20.

Development

npm run dev to serve the documentation site in the local server (theme and local docs)

npm run build to build production version (of the docs)

npm run preview run local server with the build project

Images

Relative to docs/.vuepress/public/:

![Image alt](/images/heli/image.jpg 'Image caption')

Relative to the current markdown file:

![An image](./image.png 'Image caption')

The first part ([Image alt]) becomes an image alt attribute, the last part ("Image caption") becomes an image title attribute and the content of <figcaption> below the image.


Markdown image with path alias is not allowed in the v2 of vuepress, but it's still working with img tag inserted manually:

<figure>
    <img src="@images/image.jpg" title="Title" />
    <figcaption>Title</figcaption>
</figure>

Styles

Theme works with @vuepress/plugin-palette (with default settings set in @vuepress/theme-default). @vuepress/plugin-palette uses .vuepress/styles/palette.scss and .vuepress/styles/index.scss (in theme consumer project). These styles have lower priority than theme styles and can be used to override @vuepress/theme-default styles.

The theme styles are in theme/styles/*

To override the theme styles, consumer project can use its own styles (with filename other than .vuepress/styles/index.scss), imported in clientConfigFile file:

// .vuepress/config.ts
export default defineUserConfig({
    clientConfigFile: path.resolve(__dirname, './clientEnhance.js'),
});
// .vuepress/clientEnhance.js
import './styles/main.scss';

Styles priority:

  • .vuepress/styles/palette (app)
  • @vuepress/theme-default styles (theme-default)
  • .vuepress/styles/index.scss (app)
  • theme/styles/index.scss (theme)
  • project styles like .vuepress/styles/main.scss (app)

Additional notes

The theme is in the theme/ folder, docs/ contains demo content.

Project uses eslint, stylelint, and prettier (automatically on git commit hook). Some IDE/editors require to enable integration with linters to be able to check and fix open files.

Changelog

1.1.7

  • move table caption position above the tables

2.0.0

  • update design to the company design
  • update to be compatible with [email protected] and @vuepress/[email protected]
  • @images/ alias is not supported in markdown file
  • generate <caption> for the images automatically from image title
  • move most of the theme-default config options to this theme config from consumer app config
  • move favicons and logos to this theme
  • full typescript source code, add types
  • add eslint, stylelint, prettier, lint-staged
  • add tsc-watch and error sound to dev build