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

rikka

v1.1.1

Published

A CLI tool to create new content for static site inspired by hugo new

Downloads

2

Readme

rikka

A CLI tool to create new content for static site inspired by hugo new

Rikka Takarada

Install

$ npm install rikka -g

Usage

rikka is currently has only the new command.

Create new content

$ rikka new log/example.md

Generate new file to contents/log/example.md.

Chenge archetypes directory or contents directory or both

With this option you can change archetypes diretory or contents directory or both.

$ rikka new about/example.md --archetypeDir customArchetypes --contentsDir customContents

Generate new file to customContents/about/example.md.

Archetypes

Archetypes are templates used when creating new content.

Use case

If this command is executed, rikka looks for archetypes/log.md.

$ rikka new log/example.md

Then, it generates contents/log/example.md based on archetypes/log.md.

If archetypes/log.md can not be found, rikka looks for archetypes/default.md. If it exists, rikka creates contents/log/example.md based on archetypes/default.md.

If archetypes/log.md and archetypes/default.md can not be found, rikka generates empty file in contents/log/example.md.

Priority order of the templates

When rikka new log/example.md is executed, the priority order of the templates is as follows.

  1. archetypes/log.md
  2. archetypes/default.md
  3. Create empty file

Template variables

Template variables can be used in a archetype file or the CLI.

All template variables

| Varialbe | Example | Description | |:---|:---|:---| | {{ date }} | 2018-10-31T23:33:30+09:00 | Return date | | {{ unixtime }} | 1540996410 | Return unixtime | | {{ generator }} | rikka | Return generator | | {{ generatorVersion }} | 1.0.0 | Return generator version |

Used in archetype file

Make such a file in archetypes directory.

---
title: log
published_at: {{ date }}
generator_info: {{ generator }} v{{ generatorVersion }}
---

Execute rikka new log/example.md assigns some template variables and output.

---
title: log
published_at: 2018-10-31T23:33:30+09:00
generator_info: rikka v1.0.0
---

Used in the CLI

Template variables can also be used in the CLI.
For example, when such a command is executed.

$ rikka new "log/{{ unixtime }}.md"

Then, a file like contents/log/1540996410.md is generated.

Help

$ rikka -h
$ rikka new -h

Author

@p-chan

License

MIT