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

hexo-sil-assets

v0.1.1

Published

Versioned asset manifests and R2 maintenance for Hexo

Readme

hexo-sil-assets

Versioned asset manifests for Hexo, with optional Cloudflare R2 maintenance commands. Other hexo-sil-* packages can read the shared capability when this package is installed and explicitly enabled; if it is absent they retain their legacy local-file behavior.

Install and enable

npm install hexo-sil-assets
assets:
  manifest: source/_data/assets.json

The Hexo plugin exposes hexo.sil.assets. The default manifest path is shown above. A manifest records stable object keys, byte sizes, SHA-256 digests, MIME types, and optional audio duration/title metadata. Its state is either legacy or r2.

Maintenance configuration

Create hexo-sil-assets.config.js in the project root:

'use strict';

module.exports = {
  manifest: 'source/_data/assets.json',
  managed: [
    { prefix: 'files', source: 'source/files', ignore: 'source/files/**' },
    { prefix: 'downloads/manual.zip', source: 'source/downloads/manual.zip', ignore: 'source/downloads/manual.zip' }
  ],
  workspace: '.assets-workspace.json',
  publish: {
    checks: [
      { command: 'npx', args: ['hexo', 'generate', '--bail'] }
    ],
    git: false
  }
};

Each managed entry maps an R2 object prefix to either a local directory or a single local file. ignore is appended to .gitignore only when an R2 migration is finalized. Git staging, committing, and pushing are disabled by default. To opt in, replace git: false with a mapping such as:

git: { remote: 'origin', branch: 'main', stage: true, commit: true, push: true }

Commands

npx hexo-sil-assets seed
npx hexo-sil-assets verify
npx hexo-sil-assets publish --dry-run
npx hexo-sil-assets pull --prefix files/library
npx hexo-sil-assets migrate --finalize
npx hexo-sil-assets delete --key files/library/old.zip
npx hexo-sil-assets mode

Use --root /path/to/site and --config relative/or/absolute.js when running outside the site root. pull records restored prefixes in .assets-workspace.json; subsequent publish operations only infer deletions inside those restored prefixes.

R2 operations require these environment variables:

R2_ACCOUNT_ID
R2_ACCESS_KEY_ID
R2_SECRET_ACCESS_KEY
R2_BUCKET

R2_ENDPOINT is optional. Credentials are never read from the Hexo config or written to the manifest.

migrate --finalize verifies every configured source against R2 before switching the manifest to state: r2. It then offers to add configured ignore rules and stop Git tracking the verified local files while leaving them on disk. Run it only from a complete, hydrated checkout.

Optional legacy rclone bridge

Projects that still mirror Git/LFS assets through rclone can configure the separate compatibility command:

legacySync: {
  source: 'source/files',
  remote: 'remote-name:bucket/path',
  implementationInputs: ['package.json', '.github/workflows/deploy.yml']
}
npx hexo-sil-assets-legacy-sync --detect
npx hexo-sil-assets-legacy-sync --sync --mode incremental

Without legacySync, this command exits safely without choosing a site-specific source or remote.