jackdaw 1.0.0 → 1.0.2

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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.DS_Store +0 -0
  3. data/.rubocop.yml +1 -1
  4. data/lib/jackdaw/commands/new.rb +1 -1
  5. data/lib/jackdaw/server.rb +1 -1
  6. data/lib/jackdaw/version.rb +1 -1
  7. data/usejackdaw.com.site/.gitignore +2 -0
  8. data/usejackdaw.com.site/site/assets/css/style.css +242 -0
  9. data/usejackdaw.com.site/site/assets/favicon/android-icon-144x144.png +0 -0
  10. data/usejackdaw.com.site/site/assets/favicon/android-icon-192x192.png +0 -0
  11. data/usejackdaw.com.site/site/assets/favicon/android-icon-36x36.png +0 -0
  12. data/usejackdaw.com.site/site/assets/favicon/android-icon-48x48.png +0 -0
  13. data/usejackdaw.com.site/site/assets/favicon/android-icon-72x72.png +0 -0
  14. data/usejackdaw.com.site/site/assets/favicon/android-icon-96x96.png +0 -0
  15. data/usejackdaw.com.site/site/assets/favicon/apple-icon-114x114.png +0 -0
  16. data/usejackdaw.com.site/site/assets/favicon/apple-icon-120x120.png +0 -0
  17. data/usejackdaw.com.site/site/assets/favicon/apple-icon-144x144.png +0 -0
  18. data/usejackdaw.com.site/site/assets/favicon/apple-icon-152x152.png +0 -0
  19. data/usejackdaw.com.site/site/assets/favicon/apple-icon-180x180.png +0 -0
  20. data/usejackdaw.com.site/site/assets/favicon/apple-icon-57x57.png +0 -0
  21. data/usejackdaw.com.site/site/assets/favicon/apple-icon-60x60.png +0 -0
  22. data/usejackdaw.com.site/site/assets/favicon/apple-icon-72x72.png +0 -0
  23. data/usejackdaw.com.site/site/assets/favicon/apple-icon-76x76.png +0 -0
  24. data/usejackdaw.com.site/site/assets/favicon/apple-icon-precomposed.png +0 -0
  25. data/usejackdaw.com.site/site/assets/favicon/apple-icon.png +0 -0
  26. data/usejackdaw.com.site/site/assets/favicon/browserconfig.xml +2 -0
  27. data/usejackdaw.com.site/site/assets/favicon/favicon-16x16.png +0 -0
  28. data/usejackdaw.com.site/site/assets/favicon/favicon-32x32.png +0 -0
  29. data/usejackdaw.com.site/site/assets/favicon/favicon-96x96.png +0 -0
  30. data/usejackdaw.com.site/site/assets/favicon/favicon.ico +0 -0
  31. data/usejackdaw.com.site/site/assets/favicon/manifest.json +41 -0
  32. data/usejackdaw.com.site/site/assets/favicon/ms-icon-144x144.png +0 -0
  33. data/usejackdaw.com.site/site/assets/favicon/ms-icon-150x150.png +0 -0
  34. data/usejackdaw.com.site/site/assets/favicon/ms-icon-310x310.png +0 -0
  35. data/usejackdaw.com.site/site/assets/favicon/ms-icon-70x70.png +0 -0
  36. data/usejackdaw.com.site/site/assets/jackdaw.png +0 -0
  37. data/usejackdaw.com.site/site/assets/squawk.png +0 -0
  38. data/usejackdaw.com.site/site/src/blog/2026-01-06-hello-world.blog.md +9 -0
  39. data/usejackdaw.com.site/site/src/commands.page.md +185 -0
  40. data/usejackdaw.com.site/site/src/content.page.md +300 -0
  41. data/usejackdaw.com.site/site/src/deployment.page.md +306 -0
  42. data/usejackdaw.com.site/site/src/getting-started.page.md +180 -0
  43. data/usejackdaw.com.site/site/src/index.page.md +86 -0
  44. data/usejackdaw.com.site/site/src/installation.page.md +63 -0
  45. data/usejackdaw.com.site/site/src/templates.page.md +294 -0
  46. data/usejackdaw.com.site/site/templates/_footer.html.erb +12 -0
  47. data/usejackdaw.com.site/site/templates/_nav.html.erb +19 -0
  48. data/usejackdaw.com.site/site/templates/blog.html.erb +7 -0
  49. data/usejackdaw.com.site/site/templates/layout.html.erb +18 -0
  50. data/usejackdaw.com.site/site/templates/page.html.erb +5 -0
  51. metadata +47 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f5b17899530465a6c70afaf54e32479a44f82c97eb3a590ad765273824765997
4
- data.tar.gz: '08c704ec34e10236e64b73f789fed9c3ffb1c084f7216a918b6914296a9e60df'
3
+ metadata.gz: ed2d73fe14698f4f0c26e57ae2b8fe3d12c62a911f357739b4921f3bf46c771c
4
+ data.tar.gz: 2ad96dea78d55ca75f03503b2bc0b30e3545781df5ea30aa46d360cc87013c24
5
5
  SHA512:
6
- metadata.gz: ba74079fefe98d864b769f62fe32ee8d3ea5bb9765c2c0823ffc9ec00d1af0e132ad2e0032f0be5de3c7c509b7307d89e8f752597cf8508e5d96cfe8a3b27a0d
7
- data.tar.gz: e3f055613bbf027a8758e5dcb7d0e0fd992c35962275111c94b9844b577161c8c7708b8c27050643c6c4b88de076ae47195fb7c949406bb8fee1fdcfeb79bcac
6
+ metadata.gz: f3953aeded250048be04c6ce5c38512fd55b4634f399e34dede149d31181f05e4217381152b5cd5a7ee53103251b2bec1711fdd37d49bb0a7686a1fcb2fcbeb0
7
+ data.tar.gz: aa9e3a74139d611774380ca3c393699efdf93110654dc530c9c4af7307345cd995f703d0abd779d634d43661d14a55193cdd78d9843b71f2c50d22c5e880590a
data/.DS_Store ADDED
Binary file
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 4.0
2
+ TargetRubyVersion: 3.4.0
3
3
  NewCops: enable
4
4
  SuggestExtensions: false
5
5
 
@@ -8,7 +8,7 @@ module Jackdaw
8
8
 
9
9
  def initialize(name)
10
10
  @name = name
11
- @site_dir = "#{name}.site"
11
+ @site_dir = name.end_with?('.site') ? name : "#{name}.site"
12
12
  end
13
13
 
14
14
  def execute
@@ -197,7 +197,7 @@ module Jackdaw
197
197
 
198
198
  # Inject reload script into HTML responses
199
199
  if headers['Content-Type']&.include?('text/html')
200
- body = ''
200
+ body = +'' # Unary plus makes it mutable
201
201
  response.each { |part| body << part }
202
202
 
203
203
  if body.include?('</body>')
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Jackdaw
4
- VERSION = '1.0.0'
4
+ VERSION = '1.0.2'
5
5
  end
@@ -0,0 +1,2 @@
1
+ public/
2
+ .DS_Store
@@ -0,0 +1,242 @@
1
+ /* Reset & Base */
2
+ * {
3
+ margin: 0;
4
+ padding: 0;
5
+ box-sizing: border-box;
6
+ }
7
+
8
+ body {
9
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
10
+ line-height: 1.6;
11
+ color: #333;
12
+ background: #fff;
13
+ }
14
+
15
+ /* Container */
16
+ .container {
17
+ max-width: 1200px;
18
+ margin: 0 auto;
19
+ padding: 0 2rem;
20
+ }
21
+
22
+ /* Navigation */
23
+ .navbar {
24
+ background: #2c3e50;
25
+ color: white;
26
+ padding: 1rem 0;
27
+ box-shadow: 0 2px 4px rgba(0,0,0,0.1);
28
+ }
29
+
30
+ .navbar .container {
31
+ display: flex;
32
+ justify-content: space-between;
33
+ align-items: center;
34
+ }
35
+
36
+ .nav-brand a {
37
+ color: white;
38
+ text-decoration: none;
39
+ font-size: 1.5rem;
40
+ font-weight: bold;
41
+ display: flex;
42
+ align-items: center;
43
+ gap: 0.75rem;
44
+ }
45
+
46
+ .nav-brand .logo {
47
+ height: 40px;
48
+ width: auto;
49
+ }
50
+
51
+ .nav-menu {
52
+ display: flex;
53
+ list-style: none;
54
+ gap: 2rem;
55
+ }
56
+
57
+ .nav-menu a {
58
+ color: white;
59
+ text-decoration: none;
60
+ transition: color 0.2s;
61
+ }
62
+
63
+ .nav-menu a:hover {
64
+ color: #3498db;
65
+ }
66
+
67
+ .nav-menu .github {
68
+ background: #3498db;
69
+ padding: 0.5rem 1rem;
70
+ border-radius: 4px;
71
+ }
72
+
73
+ .nav-menu .github:hover {
74
+ background: #2980b9;
75
+ color: white;
76
+ }
77
+
78
+ /* Main Content */
79
+ main {
80
+ padding: 3rem 0;
81
+ min-height: calc(100vh - 200px);
82
+ }
83
+
84
+ .content {
85
+ max-width: 800px;
86
+ }
87
+
88
+ /* Typography */
89
+ h1, h2, h3, h4, h5, h6 {
90
+ margin-top: 2rem;
91
+ margin-bottom: 1rem;
92
+ line-height: 1.2;
93
+ color: #2c3e50;
94
+ }
95
+
96
+ h1 {
97
+ font-size: 2.5rem;
98
+ border-bottom: 3px solid #3498db;
99
+ padding-bottom: 0.5rem;
100
+ }
101
+
102
+ h2 {
103
+ font-size: 2rem;
104
+ border-bottom: 2px solid #ecf0f1;
105
+ padding-bottom: 0.5rem;
106
+ }
107
+
108
+ h3 {
109
+ font-size: 1.5rem;
110
+ }
111
+
112
+ p {
113
+ margin-bottom: 1rem;
114
+ }
115
+
116
+ a {
117
+ color: #3498db;
118
+ text-decoration: none;
119
+ }
120
+
121
+ a:hover {
122
+ text-decoration: underline;
123
+ }
124
+
125
+ /* Code */
126
+ code {
127
+ background: #f8f9fa;
128
+ padding: 0.2rem 0.4rem;
129
+ border-radius: 3px;
130
+ font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
131
+ font-size: 0.9em;
132
+ color: #e83e8c;
133
+ }
134
+
135
+ pre {
136
+ background: #2c3e50;
137
+ color: #ecf0f1;
138
+ padding: 1.5rem;
139
+ border-radius: 6px;
140
+ overflow-x: auto;
141
+ margin: 1.5rem 0;
142
+ }
143
+
144
+ pre code {
145
+ background: none;
146
+ color: inherit;
147
+ padding: 0;
148
+ font-size: 0.9rem;
149
+ }
150
+
151
+ /* Tables */
152
+ table {
153
+ width: 100%;
154
+ border-collapse: collapse;
155
+ margin: 1.5rem 0;
156
+ }
157
+
158
+ th, td {
159
+ padding: 0.75rem;
160
+ border: 1px solid #dee2e6;
161
+ text-align: left;
162
+ }
163
+
164
+ th {
165
+ background: #f8f9fa;
166
+ font-weight: 600;
167
+ }
168
+
169
+ tr:hover {
170
+ background: #f8f9fa;
171
+ }
172
+
173
+ /* Lists */
174
+ ul, ol {
175
+ margin-left: 2rem;
176
+ margin-bottom: 1rem;
177
+ }
178
+
179
+ li {
180
+ margin-bottom: 0.5rem;
181
+ }
182
+
183
+ /* Blockquotes */
184
+ blockquote {
185
+ border-left: 4px solid #3498db;
186
+ padding-left: 1.5rem;
187
+ margin: 1.5rem 0;
188
+ color: #666;
189
+ font-style: italic;
190
+ }
191
+
192
+ /* Horizontal Rule */
193
+ hr {
194
+ border: none;
195
+ border-top: 2px solid #ecf0f1;
196
+ margin: 2rem 0;
197
+ }
198
+
199
+ /* Footer */
200
+ .footer {
201
+ background: #2c3e50;
202
+ color: white;
203
+ padding: 2rem 0;
204
+ margin-top: 4rem;
205
+ text-align: center;
206
+ }
207
+
208
+ .footer a {
209
+ color: #3498db;
210
+ }
211
+
212
+ .footer a:hover {
213
+ color: #5dade2;
214
+ }
215
+
216
+ .copyright {
217
+ margin-top: 1rem;
218
+ color: #95a5a6;
219
+ font-size: 0.9rem;
220
+ }
221
+
222
+ /* Responsive */
223
+ @media (max-width: 768px) {
224
+ .navbar .container {
225
+ flex-direction: column;
226
+ gap: 1rem;
227
+ }
228
+
229
+ .nav-menu {
230
+ flex-wrap: wrap;
231
+ justify-content: center;
232
+ gap: 1rem;
233
+ }
234
+
235
+ h1 {
236
+ font-size: 2rem;
237
+ }
238
+
239
+ h2 {
240
+ font-size: 1.5rem;
241
+ }
242
+ }
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <browserconfig><msapplication><tile><square70x70logo src="/ms-icon-70x70.png"/><square150x150logo src="/ms-icon-150x150.png"/><square310x310logo src="/ms-icon-310x310.png"/><TileColor>#ffffff</TileColor></tile></msapplication></browserconfig>
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "App",
3
+ "icons": [
4
+ {
5
+ "src": "\/android-icon-36x36.png",
6
+ "sizes": "36x36",
7
+ "type": "image\/png",
8
+ "density": "0.75"
9
+ },
10
+ {
11
+ "src": "\/android-icon-48x48.png",
12
+ "sizes": "48x48",
13
+ "type": "image\/png",
14
+ "density": "1.0"
15
+ },
16
+ {
17
+ "src": "\/android-icon-72x72.png",
18
+ "sizes": "72x72",
19
+ "type": "image\/png",
20
+ "density": "1.5"
21
+ },
22
+ {
23
+ "src": "\/android-icon-96x96.png",
24
+ "sizes": "96x96",
25
+ "type": "image\/png",
26
+ "density": "2.0"
27
+ },
28
+ {
29
+ "src": "\/android-icon-144x144.png",
30
+ "sizes": "144x144",
31
+ "type": "image\/png",
32
+ "density": "3.0"
33
+ },
34
+ {
35
+ "src": "\/android-icon-192x192.png",
36
+ "sizes": "192x192",
37
+ "type": "image\/png",
38
+ "density": "4.0"
39
+ }
40
+ ]
41
+ }
@@ -0,0 +1,9 @@
1
+ # Hello World
2
+
3
+ Welcome to your first blog post! This post demonstrates:
4
+
5
+ - Automatic date extraction from filename
6
+ - Title extraction from the first H1
7
+ - Folder structure preservation
8
+
9
+ Edit this file at `site/src/blog/2026-01-06-hello-world.blog.md`
@@ -0,0 +1,185 @@
1
+ # Commands Reference
2
+
3
+ Complete reference for all Jackdaw CLI commands.
4
+
5
+ ## jackdaw new
6
+
7
+ Create a new site project with starter templates.
8
+
9
+ ```bash
10
+ jackdaw new NAME
11
+ ```
12
+
13
+ **Examples:**
14
+ ```bash
15
+ jackdaw new my-blog
16
+ jackdaw new company-site.site # .site not duplicated
17
+ ```
18
+
19
+ Creates:
20
+ - Directory structure
21
+ - Starter templates (layout, page, blog)
22
+ - Example content
23
+ - `.gitignore`
24
+
25
+ ## jackdaw build
26
+
27
+ Build the static site.
28
+
29
+ ```bash
30
+ jackdaw build [OPTIONS]
31
+ ```
32
+
33
+ **Options:**
34
+ - `--clean` - Remove old files before building
35
+ - `--verbose` - Show detailed build information
36
+
37
+ **Examples:**
38
+ ```bash
39
+ jackdaw build # Incremental build
40
+ jackdaw build --clean # Full rebuild
41
+ jackdaw build --verbose # Detailed output
42
+ ```
43
+
44
+ **What it does:**
45
+ 1. Scans content, templates, and assets
46
+ 2. Renders Markdown → HTML
47
+ 3. Applies ERB templates
48
+ 4. Copies static assets
49
+ 5. Generates RSS/Atom feeds (if blog posts exist)
50
+ 6. Generates sitemap.xml
51
+
52
+ **Output:** `public/` directory
53
+
54
+ ## jackdaw serve
55
+
56
+ Start development server with live reload.
57
+
58
+ ```bash
59
+ jackdaw serve [OPTIONS]
60
+ ```
61
+
62
+ **Options:**
63
+ - `--port PORT` - Server port (default: 4000)
64
+ - `--no-livereload` - Disable automatic browser refresh
65
+
66
+ **Examples:**
67
+ ```bash
68
+ jackdaw serve # Start on port 4000
69
+ jackdaw serve --port 3000 # Custom port
70
+ jackdaw serve --no-livereload # No auto-refresh
71
+ ```
72
+
73
+ **Features:**
74
+ - Builds site on start
75
+ - Watches for file changes
76
+ - Auto-rebuilds on change
77
+ - Live reload in browser
78
+ - Serves from `public/`
79
+
80
+ Access at `http://localhost:4000`
81
+
82
+ ## jackdaw create
83
+
84
+ Create new content from templates.
85
+
86
+ ```bash
87
+ jackdaw create TEMPLATE NAME [OPTIONS]
88
+ ```
89
+
90
+ **Options:**
91
+ - `--dated` - Add date prefix (for pages)
92
+ - `--no-date` - Skip date prefix (for blog posts)
93
+
94
+ **Examples:**
95
+ ```bash
96
+ # Blog post (auto-dated)
97
+ jackdaw create blog "My First Post"
98
+ # → 2026-01-06-my-first-post.blog.md
99
+
100
+ # Page (no date)
101
+ jackdaw create page "About"
102
+ # → about.page.md
103
+
104
+ # Nested paths
105
+ jackdaw create page "docs/installation"
106
+ # → docs/installation.page.md
107
+
108
+ # Force date on page
109
+ jackdaw create page "Timeline" --dated
110
+ # → 2026-01-06-timeline.page.md
111
+
112
+ # Remove date from blog
113
+ jackdaw create blog "Timeless" --no-date
114
+ # → timeless.blog.md
115
+ ```
116
+
117
+ **Template types:**
118
+ - `blog` - Blog posts (dated by default)
119
+ - `page` - Static pages (no date)
120
+ - `post` - Alternative to blog
121
+ - `article` - Alternative to blog
122
+ - Custom types you create
123
+
124
+ ## jackdaw template
125
+
126
+ Manage content templates.
127
+
128
+ ```bash
129
+ jackdaw template SUBCOMMAND
130
+ ```
131
+
132
+ ### template list
133
+
134
+ List all available templates in `site/templates/`.
135
+
136
+ ```bash
137
+ jackdaw template list
138
+ ```
139
+
140
+ Shows templates you can use with `jackdaw create`.
141
+
142
+ ## jackdaw version
143
+
144
+ Display Jackdaw version.
145
+
146
+ ```bash
147
+ jackdaw version
148
+ ```
149
+
150
+ ## jackdaw help
151
+
152
+ Show help for commands.
153
+
154
+ ```bash
155
+ jackdaw help # All commands
156
+ jackdaw help build # Specific command
157
+ ```
158
+
159
+ ## Command Workflow
160
+
161
+ Typical development workflow:
162
+
163
+ ```bash
164
+ # Initial setup
165
+ jackdaw new my-site
166
+ cd my-site.site
167
+
168
+ # Development
169
+ jackdaw serve # Start dev server
170
+ # Edit files, see changes instantly
171
+
172
+ # Create content as needed
173
+ jackdaw create blog "New Post"
174
+ jackdaw create page "Contact"
175
+
176
+ # Production build
177
+ jackdaw build --clean
178
+
179
+ # Deploy (copy public/ to server)
180
+ ```
181
+
182
+ ## Exit Codes
183
+
184
+ - `0` - Success
185
+ - `1` - Error (with message)