PHPackages                             nikrolls/ss-hashpath-manifest - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. nikrolls/ss-hashpath-manifest

ActiveSilverstripe-vendormodule

nikrolls/ss-hashpath-manifest
=============================

03.7kPHP

Since Oct 29Pushed 5y ago1 watchersCompare

[ Source](https://github.com/nikrolls/ss-hashpath-manifest)[ Packagist](https://packagist.org/packages/nikrolls/ss-hashpath-manifest)[ RSS](/packages/nikrolls-ss-hashpath-manifest/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

SS Hashpath Manifest
====================

[](#ss-hashpath-manifest)

Inspired by [heyday/silverstripe-hashpath](https://github.com/heyday/silverstripe-hashpath), this module is designed for statically published sites that don't have an active server component to rewwrite the hash paths on the fly. It's designed to work with the manifest files generated by tools such as [gulp-hash](https://www.npmjs.com/package/gulp-hash) which hash the filenames at build time and generate a JSON manifest of path resolutions.

Installation
------------

[](#installation)

Using composer:

```
$ composer require nikrolls/ss-hashpath-manifest
```

Usage
-----

[](#usage)

### Prerequisites

[](#prerequisites)

This module makes a few assumptions:

1. That the JSON manifest file is in the same folder as the hashed files, or any ancestor folder
2. That all paths in the manifest file are relative to the location of the manifest file
3. That the manifest file is in charge of all hashed files in its folder and any child folders

### Configuration

[](#configuration)

Create a yaml config file like below:

```
NikRolls\SSHashPathManifest\HashPath:
  manifests:
    themes/default: manifest.json
# Add more root paths and relative manifest paths as required, eg:
#   themes/alternate/build: output/manifest.json
#   themes/alternate: source/manifest.json
# More specific paths should be first as the first matching one found is used.
```

`themes/default/manifest.json`:

```
{
  "js/main.js": "js/main.abcd1234.js",
  "css/main.css": "css/main.4321dcba.css"
}
```

### Implementation

[](#implementation)

You can translate the paths either in a `Requirements` call, or in a template:

```
use NikRolls\SSHashPathManifest\HashPath;

Requirements::javascript(HashPath::singleton()->for('themes/default/js/main.js'));
```

```

```

The module does little more than translate paths according to the manifest file, so if you have resource prefixes in your statically published environment, simply prepend them to your paths.

If there is no manifest found for your path, or a manifest was found but doesn't contain the file you're requesting, the path will be returned unchanged. This allows you to use HashPath for every file within a build folder but control the path resolution (or not) with your build process, for example.

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/98495942?v=4)[Nik Rolls](/maintainers/nikrolls)[@nikrolls](https://github.com/nikrolls)

---

Top Contributors

[![nicole-ashley](https://avatars.githubusercontent.com/u/2626677?v=4)](https://github.com/nicole-ashley "nicole-ashley (1 commits)")

### Embed Badge

![Health badge](/badges/nikrolls-ss-hashpath-manifest/health.svg)

```
[![Health](https://phpackages.com/badges/nikrolls-ss-hashpath-manifest/health.svg)](https://phpackages.com/packages/nikrolls-ss-hashpath-manifest)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
