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 🙏

© 2026 – Pkg Stats / Ryan Hefner

hicons

v1.0.4

Published

Hugo Icons plugin for easy-to-use SVG icons from open-source vendors Lucide and Feather — no bloated layouts

Readme

♾️ Hicons for Hugo SVG icons Support

Hugo Icons plugin for easy-to-use SVG icons from open-source vendors Lucide and Feather — no bloated layouts

hicons scans your Hugo layouts for icon usage and automatically generates or updates your icons.html partial with SVGs from Lucide.

🔥 New Workflow: Hicons now has a dedicated website for Hugo layout-ready code: https://hicons.pages.dev


🚀 Features

  • ⚡ Auto-detect icons used across Hugo layouts.
  • 🧠 Automatically add minified SVGs to your Hugo partials.
  • 🧩 Merge icons into your layouts/partials/icons.html or _partials/icons.html.
  • 🛡 Keeps existing icons safe (no overwrites).
  • 🎨 Supports $class for Tailwind or custom CSS classes.
  • 👀 New: npx hicons --watch & hugo server -D can be added to dev scripts for live updates.
  • 🌐 Dedicated icon website: search, click, and copy layout-ready code instantly.

🌐 Dedicated Hicons Icon Layout Website

Forget manually browsing Lucide for SVG icon code. Copying raw SVGs bloats your layouts and may hurt Core Web Vitals. Hicons does it all for you — minified and production-ready.

Steps:

  1. Visit https://hicons.pages.dev
  2. Search the icon you want (e.g., mail, sparkles)
  3. Click the icon or the 📋 Copy button
  4. Paste the ready-to-use Hugo layout code directly into your layout template
  5. Run npx hicons (or --watch mode) — your Hugo icons partial updates automatically

Example Copied Code:

{{ partial "icons.html" (dict "name" "sparkles" "class" "w-6 h-6 text-pink-500") }}

✅ No manual SVG copy. No bloated if-else blocks. Just clean, Hugo-ready code.


💻 Installation

Global install:

npm install -g hicons

Or run instantly with npx:

npx hicons

⚙️ How It Works

  1. Scans all Hugo layout files:

    layouts/**/*.html
  2. Finds icon partial calls:

    {{ partial "icons.html" (dict "name" "mail" "class" "w-6 h-6") }}
  3. Extracts icon names (e.g., mail, heart, sparkles).

  4. Fetches SVGs from the Lucide library.

  5. Updates your Hugo partial (icons.html), merging new icons while keeping old ones intact.


🏃 Commands

▶️ One-Time Run

npx hicons

Generates/updates icons.html once.


👀 Watch/Dev Mode

npx hicons --watch

Or with Hugo dev server:

npx hicons --watch & hugo server -D

hicons will:

  • Watch all layouts/**/*.html files
  • Rebuild the partial whenever icons are added or modified
  • Merge new icons safely
  • Skip duplicates automatically

Perfect for development with hugo server.


🧩 Example Combined Workflow

Add this to your package.json:

{
  "scripts": {
    "dev": "npx hicons --watch & hugo server -D",
    "build": "npx hicons && hugo --minify"
  }
}

Run:

npm run dev
  • Icons auto-refresh instantly while editing layouts
  • Hugo live server reloads automatically

🪄 Icon Styling

All icons default to:

  • 24×24 size
  • stroke="currentColor"

You can fully customize with Tailwind or custom classes:

{{ partial "icons.html" (dict "name" "heart" "class" "w-8 h-8 text-red-500") }}

📁 Partial File Location

hicons supports:

  1. layouts/partials/icons.html
  2. layouts/_partials/icons.html

If neither exists, hicons will automatically create _partials/icons.html.


🧠 Internals

  • Uses Lucide’s official SVG set
  • Keeps your existing partial intact
  • Merges icons safely
  • Prevents duplicates
  • Logs new and missing icons clearly

🧪 Optional / Planned Flags

| Flag | Description | | --------------------- | --------------------------------------------------- | | --watch | Watch mode: auto-regenerate icons on layout changes | | --quiet (planned) | Suppress logs except for errors | | --clean (planned) | Remove icons no longer used in layouts | | --stats (planned) | Show how many icons were added or removed |


🪪 License

MIT © OLIMIAH