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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mini-ssg-zen

v0.9.3

Published

Simple static site generator, to prevent you write DRY HTML files.

Readme

Mini SSG Zen

Perbedaannya dengan Mini SSG

  1. Hasil build, minified HTML
  2. Sudah include dengan Windi CSS
  3. Bisa main Markdown
  4. Auto generate sitemap
  5. Bisa nested/deep partial HTML

Instalasi

Install dengan:

npm i mini-ssg-zen

Lalu, pada package.json, tambahkan kode berikut:

"scripts": {
  "dev": "ssg --watch",
  "build": "ssg"
}

Terus, kalau ingin menjalankan mode dev, tinggal jalankan npm run dev. Untuk build, jalankan aja npm run build.

Struktur Folder

.
├── dev
│   ├── components
│   ├── imports
│   ├── layouts
│   ├── pages
│   └── static
└── public

File-file utama terletak di folder pages.

Contoh:

  • pages/index.html menjadi index.html
  • pages/about.html menjadi about.html
  • pages/kelas/satu.html menjadi kelas/satu.html

Folder layouts berfungsi untuk meletakkan layout-layout yang akan kita gunakan. Bentuknya adalah HTML.

Folder components dan imports berfungsi untuk meletakkan partial HTML. Bentuknya juga HTML.

Folder static berisi dengan file-file selain file HTML. Jadi, nanti langsung disalin ke folder public, nggak diolah.

Folder public adalah hasilnya.

Partial HTML

Memanggil Component

Isi dari dev/components/sidebar.html:

<div>
  @attach(isi)
</div>

Isi dari dev/pages/index.html:

@component(sidebar)
  @slot(isi)
    <img src="hello.jpg" alt="">
  @endslot
@endcomponent

Memanggil Import

Isi dari dev/imports/head.html:

<script src="adsense.js"></script>

Isi dari dev/pages/about.html:

<html>
  <head>
    @import(head)
  </head>
  <body>
    <p>Halo</p>
  </body>
</html>

Memanggil Layout

Isi dari dev/layouts/blog.html:

<h1>@attach(judul)</h1>
@attach(isi)

Isi dari dev/pages/baca.html:

@layout(blog)

@section(judul)
  Ini adalah Judul
@endsection

@section(isi)
  <p>Hello World...</p>
  <p>Bagaimana kabarnya?</p>
@endsection

Menggunakan Markdown (plus Shiki)

@markdown
  # Judul

  Ini adalah isi. _Tulisan miring_ **tebal**
@endmarkdown

Menggunakan Windi

Panggil dulu dengan:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <link rel="stylesheet" href="windi.css">
</head>
<body>
	
</body>
</html>

Inline

<p class="bg-green-500 text-violet-800">Hai...</p>

Apply

<p class="judulnya">Ini adalah Judul</p>

<style lang="windi">
  .judulnya {
    @apply px-5 py-1 bg-red-300
  }
</style>

Buat class yang unik karena dia cuma generate satu biji file windi.css

Generate Sitemap

Buat dulu file mini.json yang isinya seperti ini:

{
  "situs": "https://kucing.com"
}

Lalu, build dengan npm run build.

Snippet dengan Emmet

{
  "config": {
    "markup": {
      "snippets": {
        "attach": "{@attach()}",
        "import": "{@import()}",
        "layout": "{@layout()\n\n@section()\n\t\n@endsection}",
        "section": "{@section()\n\t\n@endsection}",
        "markdown": "{@markdown\n\t\n@endmarkdown}",
        "component": "{@component()\n\t@slot()\n\t\t\n\t@endslot\n@endcomponent}",
        "slot": "{@slot()\n\t\n@endslot}",
        "windi": "style[lang=windi]",
        "petite": "script>{PetiteVue.createApp({}).mount()\n}"
      }
    }
  }
}