New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

jener

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jener

Bare simple static site generator ever.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

Jener Build Status

Bare simple static site generator ever.

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

  • Define a mix-in:
<!-- #mixin mymixin -->
<head>
</head>
  • Define a layout and use the mixin:
<!-- #layout main -->
<html>
<!-- #include mymixin -->
<body>
  <!-- #content article -->
</body>
</html>
  • Define a page using the layout:
<!-- #page main article -->
<div>
  Text
</div>
  • 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:

Become patreon

Happy blogging 💙

Keywords

static

FAQs

Package last updated on 14 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts