New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hikaru-coffee

Package Overview
Dependencies
Maintainers
1
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hikaru-coffee

A static site generator that generates routes based on directories naturally.

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
25
decreased by-67.53%
Maintainers
1
Weekly downloads
 
Created
Source

Hikaru

A static site generator that generates routes based on directories naturally.

  • "This world won't need one more static site generator!"

  • "But I need."

Install

# npm i -g hikaru-coffee

Code Structure

Router:

- Load each post then compile template and cache and render then call generator then save.
- Load each asset then render then save.
- Load each page then compile template and cache and render then call generator then save.
- Make custom site variables before pages and posts are generated.

Renderer: Register srcExt, docExt and fn, render data and return a promise of data.

Generator: Receive page(data), posts and ctx then return a promise of data.

TODO List

  • Dir based router.
  • Marked Markdown renderer.
  • Stylus CSS renderer.
  • Nunjucks template renderer.
  • Highlight.js code highlight.
  • Async loading, rendering and saving file.
  • Pagination for index, archives, categories (different category pages) and tags (different tag pages).
  • Archives info for templating.
  • Categories info for templating.
  • Tags info for templating.
  • Cheerio-based toc generating.
  • Cheerio-based path converting (relative to absolute).
  • Date operations in templates.
  • sprintf-js based multi-languages support.
  • Local search JSON gengrating.
  • RSS feed generating.
  • Porting theme ARIA.
  • File watch and live reload server. (No idea and hard to implement, may not add).

Dir Structure

hikura-site/
    |- src/ # source dir for user files
    |   |- images/
    |   |- css/
    |   |- js/
    |   |- index.md
    |   |- about/
    |   |   |- index.md
    |   |- tags/
    |   |   |- index.md
    |- doc/ # source will be render to here
    |   |- images/
    |   |   |- logo.png
    |   |- css/
    |   |   |- index.css
    |   |- js/
    |   |   |- index.js
    |   |- index.html
    |   |- 2.html # page 2 of index
    |   |- 3.html # page 3 of index
    |   |- about/
    |   |   |- index.html
    |   |- tags/
    |   |   |- index.html # layout: tags
    |   |   |- tag-1/
    |   |   |   |- index.html # automatically generated, layout: tag
    |   |   |   |- 2.html # page 2 of tag-1
    |- themes/
    |   |- aria/
    |   |   |- src/ # this will be render to doc/
    |   |   |   |- layout.njk # templates
    |   |   |   |- index.njk
    |   |   |   |- tags.njk
    |   |   |   |- tag.njk
    |   |   |   |- page.njk # if no layout specific, fallback to this
    |   |   |   |- css/
    |   |   |   |   |- index.styl
    |   |   |   |- js/
    |   |   |   |   |- index.js
    |   |   |   |- images/
    |   |   |   |   |- logo.png
    |   |- README.md

Keywords

FAQs

Package last updated on 05 Sep 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc