smirky 1.0.0 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,203 +1,179 @@
1
- Below is a clean, professional, publication‑ready **README.md** for Smirky.
2
- No emojis. No fluff. Just a clear, well‑structured document that positions Smirky as a serious static site generator with a Tailwind‑based default theme and Fabform integration.
1
+ # Smirky Minimalist Static Website Generator
3
2
 
4
- You can drop this directly into your repository.
3
+ Smirky is a minimalist static website generator for people who just want to write Markdown and get a website — no ceremony, no plugins, no magic.
4
+
5
+ It is perfect for building blogs, landing pages, or any static site quickly.
5
6
 
6
7
  ---
7
8
 
8
- # Smirky
9
- A lightweight, theme‑friendly static website generator powered by Markdown and Node.js. Smirky focuses on clarity, simplicity, and extensibility, making it an ideal choice for blogs, documentation sites, and small business websites.
9
+ ## Why Smirky?
10
10
 
11
- Smirky ships with a default Tailwind CSS theme that includes a fully functional contact form powered by the Fabform backend service. You can use the included theme as‑is or create your own custom themes with complete control over layout, styling, and structure.
11
+ * Write Markdown and get a website
12
+ * Supports tags in Markdown posts
13
+ * Minimal templates with header, navbar, footer, and content
14
+ * Blog posts and tag pages generated automatically
15
+ * Assets copied automatically
16
+ * No complex configuration
17
+ * Works with [Fabform.io](https://fabform.io) for contact forms
12
18
 
13
19
  ---
14
20
 
15
21
  ## Features
16
22
 
17
- - Markdown‑based content and pages
18
- - Clean, minimal templating system
19
- - Theme‑driven architecture
20
- - Built‑in blog system with tags
21
- - Tailwind CSS default theme
22
- - Fabform‑powered contact form integration
23
- - Zero configuration required
24
- - Fast builds and simple folder structure
23
+ * Simple Markdown pages (`pages/`)
24
+ * Blog posts (`content/`) with tags
25
+ * Tag pages (`/tags/`) and blog index (`/blog/`)
26
+ * Clean templates and partials (`theme/`)
27
+ * Static assets copied automatically (`theme/assets/`)
28
+ * Contact forms via [Fabform.io](https://fabform.io)
29
+ * Generates everything in `dist/` for deployment
25
30
 
26
31
  ---
27
32
 
28
- ## Folder Structure
29
-
30
- A typical Smirky project looks like this:
33
+ ## Getting Started
31
34
 
32
- ```
33
- project/
34
- smirky/
35
- smirky.js
36
- content/
37
- pages/
38
- theme/
39
- layout.html
40
- index.html
41
- page.html
42
- post.html
43
- blog.html
44
- tags.html
45
- partials/
46
- head.html
47
- navbar.html
48
- footer.html
49
- blog_post_card.html
50
- tag_pill.html
51
- assets/
52
- site.json
53
- dist/
54
- ```
35
+ 1. Install Smirky globally or as a dev dependency:
55
36
 
56
- ---
37
+ ```bash
38
+ # global installation
39
+ npm install -g smirky
57
40
 
58
- ## Installation
41
+ # or as a dev dependency in your project
42
+ npm install --save-dev smirky
43
+ ```
59
44
 
60
- Smirky can be installed locally within your project:
45
+ 2. Create your project structure:
61
46
 
62
47
  ```
63
- npm install smirky
48
+ my-site/
49
+ ├── pages/ # Static pages in Markdown
50
+ ├── content/ # Blog posts in Markdown
51
+ ├── theme/ # Optional: custom templates, partials, assets
52
+ └── package.json
64
53
  ```
65
54
 
66
- Or used directly via npx:
55
+ 3. Add your pages to `pages/` and your blog posts to `content/`:
67
56
 
68
- ```
69
- npx smirky
70
- ```
57
+ **Example page**: `pages/about.md`
71
58
 
59
+ ```md
60
+ ---
61
+ title: About
62
+ slug: about
72
63
  ---
73
64
 
74
- ## Usage
65
+ ## About Smirky
75
66
 
76
- Smirky is designed to be simple and predictable. Once your content, pages, and theme are in place, you can build your site with a single command.
67
+ Smirky is a minimalist static site generator. Write Markdown, run Smirky, done.
68
+ ```
77
69
 
78
- ### Build your site
70
+ **Example blog post with tags**: `content/my-first-post.md`
79
71
 
80
- ```
81
- npm run build
82
- ```
72
+ ```md
73
+ ---
74
+ title: My First Post
75
+ date: 2026-01-08
76
+ tags:
77
+ - JavaScript
78
+ - Static Sites
79
+ ---
83
80
 
84
- This generates a fully static website inside the `dist/` directory.
81
+ Hello! This is my first blog post powered by Smirky.
82
+ ```
85
83
 
86
- ### Development mode
84
+ > The `tags` field lets Smirky automatically generate tag pages and link posts to them.
87
85
 
88
- If you prefer to rebuild manually during development:
86
+ 4. Build your site:
89
87
 
90
- ```
91
- npm run dev
88
+ ```bash
89
+ npm run build
92
90
  ```
93
91
 
94
- ---
95
92
 
96
- ## Content and Pages
93
+ The generated site will be in the `dist/` folder. Deploy it anywhere: Netlify, Vercel, GitHub Pages, etc.
97
94
 
98
- Smirky uses two types of Markdown files:
95
+ ---
99
96
 
100
- ### Pages
101
- Stored in `/pages`, each file becomes a standalone route:
97
+ ## How Themes Work
102
98
 
103
- ```
104
- /pages/about.md → /about/index.html
105
- ```
99
+ Smirky uses templates and partials to assemble your pages:
106
100
 
107
- ### Blog Posts
108
- Stored in `/content`, each file becomes a blog post:
101
+ * `layout.html` — main wrapper
102
+ * `index.html` home page
103
+ * `page.html` — static pages
104
+ * `post.html` — individual blog posts
105
+ * `blog.html` — blog index and tag pages
106
+ * `tags.html` — tag index
109
107
 
110
- ```
111
- /content/my-first-post.md → /blog/my-first-post/index.html
112
- ```
108
+ Partials are reusable components:
113
109
 
114
- Both support front‑matter:
110
+ * `head.html` — meta tags, CSS
111
+ * `navbar.html` — navigation bar
112
+ * `footer.html` — footer content
113
+ * `blog_post_card.html` — blog summary card
114
+ * `tag_pill.html` — tag label
115
115
 
116
- ```yaml
117
- ---
118
- title: About Us
119
- slug: about
120
- tags: [company, mission]
121
- ---
122
- ```
116
+ Variables such as `{{ title }}`, `{{ content }}`, `{{ tag_pills }}`, `{{ site_title }}` are replaced automatically.
123
117
 
124
118
  ---
125
119
 
126
- ## Default Theme
120
+ ## Tags
127
121
 
128
- Smirky includes a Tailwind CSS theme located in the `/theme` directory. It provides:
122
+ * Tags are defined in Markdown frontmatter with `tags: [Tag1, Tag2]`
123
+ * Smirky generates:
129
124
 
130
- - Responsive layout
131
- - Navigation bar
132
- - Blog index and post templates
133
- - Tag pages
134
- - Footer
135
- - Contact form powered by Fabform
125
+ * `/tags/` — index of all tags
126
+ * `/tags/{tag}/` — all posts with that tag
136
127
 
137
- ### Fabform Integration
138
-
139
- The default theme includes a ready‑to‑use contact form that posts directly to Fabform.
140
- To enable it, update the form action in your theme’s HTML:
128
+ Tag pages automatically list posts that have the tag. Example URL:
141
129
 
142
130
  ```
143
- <form action="https://fabform.io/f/your-form-id" method="POST">
131
+ /tags/javascript/
144
132
  ```
145
133
 
146
- No backend code is required.
147
-
148
134
  ---
149
135
 
150
- ## Creating Your Own Themes
136
+ ## Contact Forms (Fabform.io)
151
137
 
152
- Smirky is fully theme‑driven. A theme consists of:
138
+ Smirky works with [Fabform.io](https://fabform.io) for contact forms without a backend.
153
139
 
154
- - HTML templates
155
- - Partials
156
- - Assets (CSS, JS, images)
157
- - A `site.json` configuration file
158
-
159
- You can create a new theme by duplicating the default theme and modifying:
160
-
161
- - Layout structure
162
- - Tailwind classes or CSS framework
163
- - Partials
164
- - Blog card design
165
- - Tag pill design
166
-
167
- Smirky does not enforce any styling framework. You may use Tailwind, Bootstrap, custom CSS, or anything else.
168
-
169
- ### Required template placeholders
170
-
171
- Every theme must include the following tokens:
140
+ **Example Contact Form:**
172
141
 
142
+ ```html
143
+ <form
144
+ action="https://fabform.io/f/FORM_ID"
145
+ method="POST"
146
+ >
147
+ <input type="text" name="name" placeholder="Your name" required />
148
+ <input type="email" name="email" placeholder="Your email" required />
149
+ <textarea name="message" placeholder="Your message"></textarea>
150
+ <button type="submit">Send</button>
151
+ </form>
173
152
  ```
174
- {{ head }}
175
- {{ navbar }}
176
- {{ footer }}
177
- {{ content }}
178
- {{ title }}
179
- ```
180
153
 
181
- Smirky replaces these during the build process.
154
+ * Replace `FORM_ID` with your Fabform ID
155
+ * Works directly on your static site
156
+ * No server, no backend
157
+
158
+ [Visit Fabform.io](https://fabform.io)
182
159
 
183
160
  ---
184
161
 
185
162
  ## Deployment
186
163
 
187
- Since Smirky outputs a fully static site, you can deploy the `dist/` folder to any static hosting provider:
164
+ After running `npm run build`, deploy the `dist/` folder to any static host:
188
165
 
189
- - Netlify
190
- - Vercel
191
- - GitHub Pages
192
- - Cloudflare Pages
193
- - AWS S3
194
- - Any static file server
166
+ * [Netlify](https://www.netlify.com/)
167
+ * [Vercel](https://vercel.com/)
168
+ * [Cloudflare Pages](https://pages.cloudflare.com/)
169
+ * [GitHub Pages](https://pages.github.com/)
195
170
 
196
171
  ---
197
172
 
198
- ## License
173
+ ## Philosophy
174
+
175
+ Smirky is for people who want simple static sites. No plugins, no hidden configs, no ceremony.
176
+
177
+ **Write Markdown, run Smirky, done.**
199
178
 
200
- MIT License
201
- Copyright © Geoffrey Callaghan
202
179
 
203
- ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "smirky",
3
- "version": "1.0.0",
3
+ "version": "1.0.4",
4
4
  "description": "A tiny, theme-friendly static website generator powered by Markdown.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -23,6 +23,10 @@
23
23
  ],
24
24
  "author": "Geoffrey Callaghan",
25
25
  "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/fabformhub/smirky"
29
+ },
26
30
  "dependencies": {
27
31
  "gray-matter": "^4.0.3",
28
32
  "marked": "^12.0.0"
@@ -1,60 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <link rel="stylesheet" href="/assets/site.css">
5
-
6
-
7
- <meta charset="UTF-8" />
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
-
10
- <title>About - My Site</title>
11
- <meta name="description" content="A simple static site powered by a KISS SSG." />
12
- </head>
13
- <body class="bg-slate-50 text-slate-900">
14
-
15
- <nav class="bg-white shadow-sm">
16
- <div class="max-w-5xl mx-auto px-4 h-16 flex items-center justify-between">
17
-
18
- <a href="/" class="text-xl font-bold text-indigo-600">
19
- My Site
20
- </a>
21
-
22
- <div class="space-x-6 text-sm font-medium">
23
- <a href="/about/" class="text-indigo-600 font-semibold">About</a>
24
- <a href="/contact/" class="text-slate-700 hover:text-slate-900">Contact</a>
25
- <a href="/blog/" class="text-slate-700 hover:text-slate-900">Blog</a>
26
- <a href="/tags/" class="text-slate-700 hover:text-slate-900">Tags</a>
27
- </div>
28
-
29
- </div>
30
- </nav>
31
-
32
-
33
-
34
- <main class="max-w-5xl mx-auto px-4 py-10">
35
- <article class="prose prose-slate max-w-none">
36
- <h1>About</h1>
37
- <h1>About This Site</h1>
38
- <p>This website is built using a tiny static site generator that follows the KISS principle.</p>
39
- <p>Everything is intentionally simple:</p>
40
- <ul>
41
- <li>No complex frameworks </li>
42
- <li>No heavy build tools </li>
43
- <li>No unnecessary features</li>
44
- </ul>
45
- <p>Just clean Markdown, simple templates, and fast static HTML output.</p>
46
-
47
- </article>
48
-
49
-
50
- </main>
51
-
52
- <footer class="mt-12 border-t border-slate-200 py-6 text-sm text-slate-500 text-center">
53
- © 2026 My Site
54
- </footer>
55
-
56
-
57
-
58
- </body>
59
- </html>
60
-
@@ -1,92 +0,0 @@
1
- @import "tailwindcss";
2
-
3
- /* ---------------------------
4
- Global Markdown Typography
5
- Tailwind v4 — No Config File
6
- ---------------------------- */
7
-
8
- /* Headings */
9
- h1 {
10
- @apply text-4xl font-bold leading-tight mt-8 mb-4;
11
- }
12
-
13
- h2 {
14
- @apply text-3xl font-semibold leading-snug mt-6 mb-3;
15
- }
16
-
17
- h3 {
18
- @apply text-2xl font-semibold leading-snug mt-5 mb-2;
19
- }
20
-
21
- h4 {
22
- @apply text-xl font-semibold mt-4 mb-2;
23
- }
24
-
25
- h5 {
26
- @apply text-lg font-medium mt-3 mb-2;
27
- }
28
-
29
- h6 {
30
- @apply text-base font-medium mt-2 mb-2;
31
- }
32
-
33
- /* Paragraphs */
34
- p {
35
- @apply text-base leading-relaxed mb-4;
36
- }
37
-
38
- /* Links */
39
- a {
40
- @apply text-blue-600 underline hover:text-blue-800;
41
- }
42
-
43
- /* Images */
44
- img {
45
- @apply rounded-lg my-4;
46
- }
47
-
48
- /* Lists */
49
- ul {
50
- @apply list-disc pl-6 mb-4;
51
- }
52
-
53
- ol {
54
- @apply list-decimal pl-6 mb-4;
55
- }
56
-
57
- li {
58
- @apply mb-1;
59
- }
60
-
61
- /* Blockquotes */
62
- blockquote {
63
- @apply border-l-4 border-gray-300 pl-4 italic text-gray-700 my-4;
64
- }
65
-
66
- /* Code blocks */
67
- pre {
68
- @apply bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto my-4;
69
- }
70
-
71
- code {
72
- @apply bg-gray-100 text-red-600 px-1 py-0.5 rounded;
73
- }
74
-
75
- /* Horizontal rule */
76
- hr {
77
- @apply border-gray-300 my-8;
78
- }
79
-
80
- /* Tables */
81
- table {
82
- @apply w-full border-collapse my-6;
83
- }
84
-
85
- th {
86
- @apply border-b font-semibold p-2 text-left;
87
- }
88
-
89
- td {
90
- @apply border-b p-2;
91
- }
92
-