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

@blacklight-cms/core

v0.8.7

Published

Blacklight CMS, core page rendering and service module

Downloads

7

Readme

The Blacklight CMS

The Blacklight CMS is a Node.js Express plugin which generates websites. It does so by requesting components from a Sling data source and rendering those components into HTML. Blacklight currently provides no facility for editing data in a Sling repository, however that may change in future.

Blacklight developers primarily customize how sites look and behave by using the following mechanisms:

  • Creation of data model processing directives which change/augment incoming Sling data
  • Creation of template scripts to render that data into HTML
  • Configuration of Express routes to redirect incoming requests
  • Creation of rewrite rules to post-process HTML generated by the templates

The basic building block of a Blacklight website is a component. Every page is a component, and most pages are themselves made up of multiple sub-components, which in some cases can be nested several levels down. Behind each component is a data model and a template. A component's data model and template can both be customized by Blacklight developers. The scripts to customize each component's behavior are stored on disk as part of a registry of component types. Each data component coming from Sling is tagged with a resource type property, a name which Blacklight uses to find the scripts which describe how to turn the raw Sling data into a data model and how to render it.

See the examples folder for more details on how the system works.

Roadmap

Planned future development for the render portion of Blacklight includes the following:

  • Support for selectors, both in model processors and in template scripts (for example, a Blacklight-level configuration to associate selectors with data properties, eg. auto-set _meta.isMobile: true if .mobile selector is present)
  • Thorough test coverage of the Blacklight CMS codebase, as well as a testing model for any component code which is written for specific sites
  • More template helpers, including an iterator that skips meta-data fields, a raw data display helper, a relative-path script inclusion mechanism
  • Templates to have always-available "virtual" model members, such as model._page, model._meta.isMobile
  • More model processor uilities: link rewriting, image optimization/sizing
  • Improved error handling for templates, model processors, and unexpected configurations
  • Error, Info and Debug logging
  • Built-in watcher for changed component files, with auto-reload of affected preview pages (via WebSocket)
  • Component inheritence mechanism
  • Re-implementation of foundation component types
  • Mechanism for efficiently including JS and CSS that is associated with a given component
  • Model caching capability via memcache?
  • HTML caching: Nginx? Node.js + filesystem + memcache?
  • Cache invalidation mechanism
  • Dependency tracking of data and image usage (i.e. any data taken from outside of component's page), to help with cache invalidation and (future) correct selection of data nodes to push out when publishing
  • Protocol for sharing template and model code with other Sling-based CMS's, such as AEM

Beyond render, other areas of functionality for future development may include:

  • App-server functionality for transactional pages. HTML rendered on server or on client.
  • Edit functionality, for associating input data types and edit forms with component models
  • Multilingual translation workflow support
  • Workflow (general-purpose) support
  • Publish functionality, to send approved data to one or more publicly-accessible sites
  • Publish-target functionality, to allow Blacklight to receive published data from a master instance