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

midwife

v0.0.3

Published

Static site generator

Downloads

3

Readme

Denim

Denim is a highly customisable static site builder (not intended for SPAs). Most of the work is done by plugins, and the framework provides a standardised interface for plugins to build up your site.

Plugins can read files to create entities, modify the list of entities, and render to different template formats.

The value Denim adds is in the flexibility of the entity structure, which allows arbitrary documents to be dynamically linked when passed to the renderer. This means you can connect any entities together by alias, including abstract entities created by plugins for structures like related articles.

The EntityList passed to the renderer is a proxy, so you can access properties recursively to your heart's content. To reference one entity from another, you use an alias. By default this is the file name relative to the data directory root, so if you had a staff profile in staff/john-smith.toml, you could reference it like so in another file manager="staff/john-smith.toml".

Upon accessing the property in your view logic, the referenced value will be returned instead. This has no problem with circular references, so you can do things like {{ branch.manager.branch.manager.branch.manager.branch.name }} if you wanted to. See the examples/liquid_test project for reference. The referenced value can be anything, meaning you can load content from markdown as a string for example (again, in the liquid_test example).

Creating entities is easy! All is takes is an id (usually the original file path) and the data you want the entitity to contain. Metadata is automatically extracted from the _meta attribute if available on the data. The data cannot be null / undefined / a function. It may behave unexpectedly if you pass in a class like a Date object, due to the internal workings of the proxy. More docs will come later regarding the _meta attribute.

Aliases must be unique! The builder will throw an error in the event of an alias clash.

Notes

This is a very basic initial Readme after completing the proof-of-concept with some example plugins. It will be made better.