Socket
Book a DemoInstallSign in
Socket

hender

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hender

A tiny, Handy static site generator

1.0.0-d
latest
Source
npmnpm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

Hender

A tiny, handy static site generator.

API

require(prefix)

A function to create a render function. prefix is used for the syntax style. Default is .[.

In frontend, The main function is called as hender() with same arguments.

Return function of render.

render(string, joinStr)

A function to render a string into a HTML string. A joinStr is used for the joined result.

Examples

Basic

index.hr

.[h1 Hello World!
.[p How's everyone doing? Hope you guys are doing fine.
I had a lot of work that should be done!

index.js

const render = require("hender")();
const fs = require("fs");

let rendered = render(fs.readFileSync("index.hr", "utf8"));
console.log(rendered);

Will result:

<h1>Hello World!</h1><p>How's everyone doing? Hope you guys are doing fine.<br>I had a lot of work that should be done!</p>

Custom Prefix

index.hr

.<h1 Hello World!
.<p How's everyone doing? Hope you guys are doing fine.
I had a lot of work that should be done!

index.js

const render = require("hender")(".<");
const fs = require("fs");

let rendered = render(fs.readFileSync("index.hr", "utf8"));
console.log(rendered);

Will result:

<h1>Hello World!</h1><p>How's everyone doing? Hope you guys are doing fine.<br>I had a lot of work that should be done!</p>

Community

  • Telegram Group
  • IRC: #yonle on libera.chat

Keywords

static-site

FAQs

Package last updated on 13 Feb 2022

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.