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

@happyvertical/smrt-template-site-static-json

v0.36.0

Published

Static community site template with JSON data storage and SMRT framework

Downloads

2,497

Readme

@happyvertical/smrt-template-site-static-json

Template for static community news sites with JSON-based data storage. Generates a SvelteKit static site with weather integration (Caelus) and council meeting scraping (Praeco).

What This Template Provides

  • SvelteKit with adapter-static for static site generation
  • JSON file-based data storage in data/
  • Config-driven site identity, navigation, categories, and theming via smrt.config.js
  • Weather forecasts via Caelus (Environment Canada)
  • Council meeting scraping and article generation via Praeco
  • Typed site config helper (initSiteConfig()/getSite())
  • Pre-built routes: home, about, contact
  • Markdown utility for content rendering

Prerequisites

  • Node.js 18+
  • pnpm (recommended)
  • Gemini API key (for Praeco article generation)

Usage

smrt gnode create my-town-site --template site-static-json \
  --location "My Town, AB" \
  --lat 53.5 --lon -113.5

cd my-town-site
pnpm install
cp .env.example .env      # Add your GEMINI_API_KEY
pnpm run init-data        # Initialize data directory
pnpm dev                  # Start dev server

Environment Variables

Defined in .env.example:

| Variable | Required | Description | |----------|----------|-------------| | GEMINI_API_KEY | Yes | Google Gemini API key for Praeco article generation | | PUBLIC_GTM_ID | No | Google Tag Manager container ID | | CUSTOM_DOMAIN | No | Custom domain for deployment |

Configuration

Edit smrt.config.js to customize. Key sections:

  • site -- name, description, location, navigation links, theme colors
  • categories -- content categories for routing (e.g., politics/local)
  • modules.praeco -- council meeting sources and report configurations
  • modules.caelus -- weather location (set automatically from --lat/--lon flags)

Available Scripts

| Script | Description | |--------|-------------| | pnpm dev | Start development server | | pnpm build | Build static site to ./build | | pnpm preview | Preview the built site | | pnpm run init-data | Initialize JSON data files | | pnpm run workflow:caelus | Fetch weather data | | pnpm run workflow:praeco | Scrape council meetings | | pnpm run validate:json | Validate JSON data files | | pnpm run validate:slugs | Validate content slugs |

Template Structure

template/
├── .env.example              # Environment variables
├── .gitignore
├── package.json              # Scripts and dependency placeholders
├── smrt.config.js            # Site identity, modules, theme
├── svelte.config.js          # SvelteKit with adapter-static
├── tsconfig.json
├── vite.config.ts
├── data/                     # JSON data storage directory
├── scripts/
│   └── init-data.ts          # Data initialization script
└── src/
    ├── app.css               # Global styles
    ├── app.d.ts              # SvelteKit type declarations
    ├── app.html              # HTML shell
    ├── site.config.ts        # Typed config helper (initSiteConfig/getSite)
    ├── lib/
    │   └── utils/
    │       └── markdown.ts   # Markdown rendering utility
    └── routes/
        ├── +layout.server.ts # Loads site config for all routes
        ├── +layout.svelte    # Root layout
        ├── +page.server.ts   # Home page data
        ├── +page.svelte      # Home page
        ├── about/            # About page
        └── contact/          # Contact page

Placeholder Substitution

During smrt gnode create, placeholders like {{SITE_NAME}}, {{LOCATION_NAME}}, {{LATITUDE}}, {{LONGITUDE}}, and {{TIMEZONE}} are replaced from CLI flags. See template.config.js for the full mapping.

Deployment

This template uses SvelteKit's static adapter. Build and deploy to any static host:

pnpm build
# Deploy ./build to S3, Netlify, Vercel, Cloudflare Pages, etc.

Related