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

jener

v1.0.1

Published

Bare simple static site generator ever.

Downloads

3

Readme

Jener Build Status

Bare simple static site generator ever.

See https://eguneys.github.io/ for example using Jener.

  1. Define a mix-in:
<!-- #mixin mymixin -->
<head>
</head>
  1. Define a layout and use the mixin:
<!-- #layout main -->
<html>
<!-- #include mymixin -->
<body>
  <!-- #content article -->
</body>
</html>
  1. Define a page using the layout:
<!-- #page main article -->
<div>
  Text
</div>
  1. Run jener in-directory out-directory and, it generates the output file for the page:
<html>
  <head>
  </head>
  <body>
    <div>
     Text
    </div>
  </body>
</html>

It has only 2 features, mix-in and layout, to generate pages.

I asked this question on Stackoverflow which ended up deleted.

Usage

Instal jener globally using yarn global jener.

In a folder, put all your layout, mix-in and page definitions, in separate html files.

Then run jener in-directory out-directory. This will generate all your page definitions inside in-directory into the out-directory.

Details

mix-in named mymixin is defined with #mixin command inside an html comment:

<!-- #mixin mymixin -->

mix-ins cannot include other mix-ins.

layout named main is defined the same:

<!-- #layout main -->

mix-in's are included with a #include command:

<!-- #include head -->

A layout defines area (named article) to replace with content with #content command:

<!-- #content article -->

A page is defined with a #page command. Pages might not have a layout and can use mix-ins:

<!-- #page -->

Pages don't have a name. All pages are exported with the same name as their definition file.

A page with a main layout, is defined as:

<!-- #page main -->

page with a layout must specify which area to replace from the layout.

<!-- #page main -->
<!-- #content article -->

That, replaces #article area.

There is a shorthand for above two commands:

<!-- #page main article -->

A layout can define multiple area's to be replaced and page can specify multiple areas to replace from the layout.

All page definitions export into a separate html file. Output filename is the same as the filename of the page definition.

Contribute

Install dependencies: yarn install. Run the tests: yarn test. Run the examples: yarn example.

Questions about parsing:

  • https://stackoverflow.com/questions/63876748/how-to-parse-a-string-of-commands-that-appear-multiple-times-into-an-array
  • https://stackoverflow.com/questions/63880636/how-to-get-matched-index-of-a-regex-for-all-occurences

Become patreon

Happy blogging 💙