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

hexo-easy-tags-plugin

v1.1.0

Published

A Hexo plugin that automatically corrects tag names.

Downloads

211

Readme

hexo-easy-tags-plugin

NPM Version LICENSE Build Status dependencies Status devDependencies Status

A Hexo plugin that automatically corrects tag names.

Why Use This?

We can't remember the case of each tag name used previously. Foo? foo? or FOO?

If you use both Foo and foo, you will have problems.

  • Issue 1: Since the case-insensitive file system can't create both /Foo/ and /foo/ directories, one of them will not accessible.
  • Issue 2: If set filename_case: 1 option on the _config.yml, both have slugs as /foo/, but Foo and foo are different tags so only one is created under /foo/.

Solution of This Plugin

This plugin detects before used name and automatically corrects others.

For example:

post-A.md

tags:
  - Java
  - foo-bar

post-B.md

tags:
  - java
  - foo_bar

post-C.md

tags:
  - JAVA
  - foo bar

All of the above will be automatically change to

tags:
  - Java
  - foo-bar

slugs: /Java/, /foo-bar/

NOTE: Depending on the order of processing posts, the tag name can be java, Java or JAVA.

❌ Tags (before)

JAVA(1), Java(1), foo-bar(1), foo_bar(1), foo bar(1), java(1)

✅ Tags (after)

Java(3), foo-bar(3)

Installation

npm install hexo-easy-tags-plugin

Usages

Just install ths plugin, and run hexo clean && hexo g.

Options

You can add options to the _config.yml file.

# _config.yml

easy_tags_plugin:
  enable: true
  tag_name_case: 1
  sort_ignore_case: true
  • enable (default: true) - enable this plugin, or disable it.
  • tag_name_case (default: 0) - option to transform all tags name to lowercase of uppercase. 0 no transform, 1 lowercase, 2 uppercase.
  • sort_ignore_case (default: true) - if set to false, the order of the tags is case sensitive. Affects list_tags(), tagcloud() helpers.
  • action (default: correct) - if set to report, print conflicted tags and exit.

Release Notes

1.1.0

  • Add sort_ignore_case option to enable case-insensitive sort tags.

1.0.2

  • Add action option to enable reporting conflicts instead of automatic corrections (#3)
  • Handle tag_map configuration.

TODO

  • Transform tag slugs to lowercase by default. Suggest set filename_case: 1 in _config.yml.
  • Transform tag slugs using transliteration module.

License

Copyright (c) 2019 dailyrandomphoto. Licensed under the MIT license.