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
@@ -0,0 +1,300 @@
1
+ # Content Guide
2
+
3
+ Everything you need to know about creating content in Jackdaw.
4
+
5
+ ## Content Files
6
+
7
+ Content is written in Markdown in `site/src/`.
8
+
9
+ ### File Naming Convention
10
+
11
+ ```
12
+ [date-]name.type.md
13
+ ```
14
+
15
+ **Examples:**
16
+ - `index.page.md` → `/index.html` (homepage)
17
+ - `about.page.md` → `/about.html` (page)
18
+ - `2026-01-06-hello.blog.md` → `/2026-01-06-hello.html` (blog post)
19
+ - `docs/guide.page.md` → `/docs/guide.html` (nested)
20
+
21
+ ### Content Types
22
+
23
+ The `.type.` part determines template and behavior:
24
+
25
+ - **page** - Static pages (no date required)
26
+ - **blog** - Blog posts (dated)
27
+ - **post** - Alternative to blog
28
+ - **article** - Alternative to blog
29
+ - **Custom** - Create your own types
30
+
31
+ ## Title Extraction
32
+
33
+ Jackdaw extracts titles from:
34
+ category: Tutorial
35
+ featured: true
36
+ image: /images/hero.jpg
37
+ ---
38
+ ```
39
+
40
+ Access in templates:
41
+ ```erb
42
+ <% if featured %>
43
+ <span class="badge">Featured</span>
44
+ <% end %>
45
+ ```
46
+
47
+ ## Writing Markdown
48
+
49
+ Jackdaw uses GitHub-flavored Markdown via Kramdown.
50
+
51
+ ### Headings
52
+
53
+ ```markdown
54
+ # Heading 1
55
+ ## Heading 2
56
+ ### Heading 3
57
+ ```
58
+
59
+ ### Text Formatting
60
+
61
+ ```markdown
62
+ **bold** or __bold__
63
+ *italic* or _italic_
64
+ ~~strikethrough~~
65
+ `code`
66
+ ```
67
+
68
+ ### Links
69
+
70
+ ```markdown
71
+ [Link text](https://example.com)
72
+ [Relative link](/about.html)
73
+ [Link with title](https://example.com "Title")
74
+ ```
75
+
76
+ ### Images
77
+
78
+ ```markdown
79
+ ![Alt text](/images/photo.jpg)
80
+ ![With title](/images/photo.jpg "Photo title")
81
+ ```
82
+
83
+ ### Lists
84
+
85
+ ```markdown
86
+ - Unordered item
87
+ - Another item
88
+ - Nested item
89
+
90
+ 1. Ordered item
91
+ 2. Another item
92
+ 1. Nested ordered
93
+ ```
94
+
95
+ ### Code Blocks
96
+
97
+ With syntax highlighting:
98
+
99
+ ````markdown
100
+ ```ruby
101
+ def hello
102
+ puts "Hello, world!"
103
+ end
104
+ ```
105
+ ````
106
+
107
+ Supported languages: Ruby, JavaScript, Python, HTML, CSS, Shell, and 200+ more.
108
+
109
+ ### Blockquotes
110
+
111
+ ```markdown
112
+ > This is a quote
113
+ > spanning multiple lines
114
+ ```
115
+
116
+ ### Tables
117
+
118
+ ```markdown
119
+ | Header 1 | Header 2 |
120
+ |----------|----------|
121
+ | Cell 1 | Cell 2 |
122
+ | Cell 3 | Cell 4 |
123
+ ```
124
+
125
+ ### Horizontal Rules
126
+
127
+ ```markdown
128
+ ---
129
+ ```
130
+
131
+ ### HTML
132
+
133
+ You can include HTML:
134
+
135
+ ```markdown
136
+ <div class="custom">
137
+ Regular markdown **works** here too.
138
+ </div>
139
+ ```
140
+
141
+ ## Automatic Excerpt
142
+
143
+ The first paragraph becomes the excerpt:
144
+
145
+ ```markdown
146
+ ---
147
+ title: My Post
148
+ ---
149
+
150
+ This paragraph is automatically used as the excerpt.
151
+
152
+ This is regular content.
153
+ ```
154
+
155
+ Or set it manually:
156
+
157
+ ```markdown
158
+ ---
159
+ title: My Post
160
+ excerpt: Custom excerpt here
161
+ ---
162
+
163
+ Content...
164
+ ```
165
+
166
+ ## Nested Content
167
+
168
+ Organize with directories:
169
+
170
+ ```
171
+ site/src/
172
+ ├── index.page.md
173
+ ├── about.page.md
174
+ ├── blog/
175
+ │ ├── 2026-01-01-first.blog.md
176
+ │ └── 2026-01-02-second.blog.md
177
+ └── docs/
178
+ ├── getting-started.page.md
179
+ └── api.page.md
180
+ ```
181
+
182
+ URLs match structure:
183
+ - `blog/2026-01-01-first.blog.md` → `/blog/2026-01-01-first.html`
184
+ - `docs/api.page.md` → `/docs/api.html`
185
+
186
+ ## Dates
187
+
188
+ ### Automatic Date Extraction
189
+
190
+ Jackdaw extracts dates from filenames:
191
+
192
+ ```
193
+ 2026-01-06-post-name.blog.md
194
+ ^ ^
195
+ Date │
196
+ Title
197
+ ```
198
+
199
+ Formats:
200
+ - `YYYY-MM-DD-title.type.md`
201
+ - `YYYY-MM-title.type.md`
202
+ - `YYYY-title.type.md`
203
+
204
+ ### No Date
205
+
206
+ For pages that don't need dates:
207
+
208
+ ```
209
+ about.page.md # No date in filename
210
+ ```
211
+
212
+ ## Title Extraction
213
+
214
+ Jackdaw extracts titles from:
215
+
216
+ 1. **First H1** in content (highest priority):
217
+ ```markdown
218
+ # This Becomes the Title
219
+ ```
220
+
221
+ 2. **Filename** (fallback):
222
+ ```
223
+ my-awesome-post.blog.md
224
+ → "My Awesome Post"
225
+ ```
226
+
227
+ ## Content Organization Patterns
228
+
229
+ ### Blog
230
+
231
+ ```
232
+ site/src/
233
+ ├── index.page.md # Blog homepage
234
+ └── blog/
235
+ ├── 2026-01-01-hello.blog.md
236
+ ├── 2026-01-02-second.blog.md
237
+ └── 2026-01-03-third.blog.md
238
+ ```
239
+
240
+ ### Documentation Site
241
+
242
+ ```
243
+ site/src/
244
+ ├── index.page.md # Docs homepage
245
+ ├── getting-started.page.md
246
+ ├── installation.page.md
247
+ └── guides/
248
+ ├── basics.page.md
249
+ ├── advanced.page.md
250
+ └── api.page.md
251
+ ```
252
+
253
+ ### Marketing Site
254
+
255
+ ```
256
+ site/src/
257
+ ├── index.page.md # Homepage
258
+ ├── about.page.md
259
+ ├── pricing.page.md
260
+ ├── contact.page.md
261
+ └── blog/
262
+ └── 2026-01-01-announcement.blog.md
263
+ ```
264
+
265
+ ## RSS/Atom Feeds
266
+
267
+ Feeds are automatically generated for blog content:
268
+
269
+ - `public/feed.xml` (RSS 2.0)
270
+ - `public/atom.xml` (Atom 1.0)
271
+
272
+ Includes:
273
+ - 20 most recent posts
274
+ - Title, link, date
275
+ - Excerpt/description
276
+
277
+ ## Sitemap
278
+
279
+ `public/sitemap.xml` is automatically generated with:
280
+
281
+ - All pages and posts
282
+ - Correct priorities (1.0 for index, 0.8 for pages, 0.6 for posts)
283
+ - Change frequency hints
284
+ - Last modification dates
285
+
286
+ ## Best Practices
287
+
288
+ 1. **Use descriptive filenames** - They become URLs
289
+ 2. **Add excerpts** - First paragraph is used as excerpt
290
+ 3. **Organize with directories** - Keep related content together
291
+ 4. **Include dates for time-sensitive content**
292
+ 5. **Write semantic Markdown** - Use proper headings hierarchy
293
+ 6. **Add alt text to images** - For accessibility
294
+
295
+ ## Tips
296
+
297
+ - **Test locally** - Use `jackdaw serve` to preview
298
+ - **Incremental builds** - Only changed files rebuild
299
+ - **Link relatively** - Use `/about.html` not `https://...`
300
+ - **Check output** - Look in `public/` to verify
@@ -0,0 +1,306 @@
1
+ # Deployment
2
+
3
+ Deploy your static site to any hosting platform.
4
+
5
+ ## Build for Production
6
+
7
+ ```bash
8
+ jackdaw build --clean
9
+ ```
10
+
11
+ This creates a `public/` directory with your complete site.
12
+
13
+ ## Static Hosts
14
+
15
+ ### Netlify
16
+
17
+ **1. Install Netlify CLI:**
18
+ ```bash
19
+ npm install -g netlify-cli
20
+ ```
21
+
22
+ **2. Deploy:**
23
+ ```bash
24
+ cd public
25
+ netlify deploy --prod
26
+ ```
27
+
28
+ Or connect your Git repository for automatic deployments.
29
+
30
+ **netlify.toml:**
31
+ ```toml
32
+ [build]
33
+ command = "gem install jackdaw && jackdaw build"
34
+ publish = "public"
35
+
36
+ [build.environment]
37
+ RUBY_VERSION = "4.0.0"
38
+ ```
39
+
40
+ ### Vercel
41
+
42
+ **1. Install Vercel CLI:**
43
+ ```bash
44
+ npm install -g vercel
45
+ ```
46
+
47
+ **2. Deploy:**
48
+ ```bash
49
+ vercel --prod
50
+ ```
51
+
52
+ **vercel.json:**
53
+ ```json
54
+ {
55
+ "buildCommand": "gem install jackdaw && jackdaw build",
56
+ "outputDirectory": "public"
57
+ }
58
+ ```
59
+
60
+ ### GitHub Pages
61
+
62
+ **1. Build locally:**
63
+ ```bash
64
+ jackdaw build
65
+ ```
66
+
67
+ **2. Push to gh-pages branch:**
68
+ ```bash
69
+ cd public
70
+ git init
71
+ git add .
72
+ git commit -m "Deploy"
73
+ git remote add origin https://github.com/username/repo.git
74
+ git push -f origin master:gh-pages
75
+ ```
76
+
77
+ Or use GitHub Actions:
78
+
79
+ **.github/workflows/deploy.yml:**
80
+ ```yaml
81
+ name: Deploy
82
+ on:
83
+ push:
84
+ branches: [main]
85
+
86
+ jobs:
87
+ deploy:
88
+ runs-on: ubuntu-latest
89
+ steps:
90
+ - uses: actions/checkout@v2
91
+
92
+ - uses: ruby/setup-ruby@v1
93
+ with:
94
+ ruby-version: 4.0
95
+
96
+ - run: gem install jackdaw
97
+ - run: jackdaw build
98
+
99
+ - uses: peaceiris/actions-gh-pages@v3
100
+ with:
101
+ github_token: ${{ secrets.GITHUB_TOKEN }}
102
+ publish_dir: ./public
103
+ ```
104
+
105
+ ### Cloudflare Pages
106
+
107
+ Connect your Git repository and configure:
108
+
109
+ - **Build command:** `gem install jackdaw && jackdaw build`
110
+ - **Build output directory:** `public`
111
+ - **Environment variables:**
112
+ - `RUBY_VERSION = 4.0.0`
113
+
114
+ ### AWS S3 + CloudFront
115
+
116
+ **1. Build:**
117
+ ```bash
118
+ jackdaw build
119
+ ```
120
+
121
+ **2. Upload to S3:**
122
+ ```bash
123
+ aws s3 sync public/ s3://your-bucket/ --delete
124
+ ```
125
+
126
+ **3. Invalidate CloudFront cache:**
127
+ ```bash
128
+ aws cloudfront create-invalidation \
129
+ --distribution-id YOUR_ID \
130
+ --paths "/*"
131
+ ```
132
+
133
+ ### Simple Server
134
+
135
+ Any web server that serves static files:
136
+
137
+ **nginx:**
138
+ ```nginx
139
+ server {
140
+ listen 80;
141
+ server_name example.com;
142
+ root /var/www/public;
143
+
144
+ location / {
145
+ try_files $uri $uri/ =404;
146
+ }
147
+ }
148
+ ```
149
+
150
+ **Apache:**
151
+ ```apache
152
+ <VirtualHost *:80>
153
+ ServerName example.com
154
+ DocumentRoot /var/www/public
155
+
156
+ <Directory /var/www/public>
157
+ Options -Indexes +FollowSymLinks
158
+ AllowOverride All
159
+ Require all granted
160
+ </Directory>
161
+ </VirtualHost>
162
+ ```
163
+
164
+ ## Custom Domain
165
+
166
+ ### DNS Configuration
167
+
168
+ Point your domain to your host:
169
+
170
+ **Netlify/Vercel:**
171
+ - Add CNAME record: `www` → `your-site.netlify.app`
172
+ - Or use their nameservers
173
+
174
+ **CloudFlare Pages:**
175
+ - Add CNAME: `www` → `your-site.pages.dev`
176
+
177
+ **GitHub Pages:**
178
+ - Add CNAME file in `public/` with your domain
179
+ - Add A records:
180
+ ```
181
+ 185.199.108.153
182
+ 185.199.109.153
183
+ 185.199.110.153
184
+ 185.199.111.153
185
+ ```
186
+
187
+ ## SSL/HTTPS
188
+
189
+ All modern hosts provide free SSL:
190
+
191
+ - **Netlify** - Automatic with Let's Encrypt
192
+ - **Vercel** - Automatic
193
+ - **CloudFlare** - Automatic
194
+ - **GitHub Pages** - Automatic for custom domains
195
+
196
+ ## Optimization Tips
197
+
198
+ ### Before Deploy
199
+
200
+ ```bash
201
+ # Clean build
202
+ jackdaw build --clean
203
+
204
+ # Minify CSS (optional)
205
+ npx cssnano public/css/*.css
206
+
207
+ # Optimize images
208
+ npx imagemin public/images/* --out-dir=public/images
209
+ ```
210
+
211
+ ### Performance
212
+
213
+ 1. **Use a CDN** - Most hosts provide this
214
+ 2. **Enable compression** - Gzip/Brotli
215
+ 3. **Set cache headers** - Long TTL for assets
216
+ 4. **Optimize images** - WebP, proper sizing
217
+ 5. **Minify assets** - CSS, JS
218
+
219
+ ### SEO
220
+
221
+ 1. **Sitemap** - Automatically generated at `/sitemap.xml`
222
+ 2. **RSS feeds** - Automatically at `/feed.xml` and `/atom.xml`
223
+ 3. **SEO tags** - Use `<%= seo_tags %>` in templates
224
+ 4. **Canonical URLs** - Use `<%= canonical_tag %>`
225
+ 5. **Submit to search engines** - Google Search Console
226
+
227
+ ## Continuous Deployment
228
+
229
+ ### With Git
230
+
231
+ 1. Push code to GitHub/GitLab
232
+ 2. Host connects to repository
233
+ 3. Automatic builds on push
234
+ 4. Site updates automatically
235
+
236
+ ### Build Command
237
+
238
+ Most hosts need:
239
+
240
+ ```bash
241
+ gem install jackdaw && jackdaw build
242
+ ```
243
+
244
+ ### Build Time
245
+
246
+ Jackdaw is fast:
247
+ - Small site (10 pages): ~0.1s
248
+ - Medium site (100 pages): ~0.5s
249
+ - Large site (600 pages): ~0.9s
250
+
251
+ ## Rollback
252
+
253
+ If something breaks:
254
+
255
+ **Netlify:**
256
+ ```bash
257
+ netlify rollback
258
+ ```
259
+
260
+ **Vercel:**
261
+ - Use dashboard to rollback deployment
262
+
263
+ **Git-based:**
264
+ ```bash
265
+ git revert HEAD
266
+ git push
267
+ ```
268
+
269
+ ## Monitoring
270
+
271
+ Check your deployed site:
272
+
273
+ ```bash
274
+ # Status
275
+ curl -I https://example.com
276
+
277
+ # Performance
278
+ curl -w "@curl-format.txt" -o /dev/null -s https://example.com
279
+ ```
280
+
281
+ **curl-format.txt:**
282
+ ```
283
+ time_total: %{time_total}s
284
+ ```
285
+
286
+ ## Troubleshooting
287
+
288
+ **Build fails:**
289
+ - Check Ruby version (need 4.0+)
290
+ - Install bundler if using Gemfile
291
+ - Check build logs for errors
292
+
293
+ **404 errors:**
294
+ - Verify public/ has files
295
+ - Check deployment directory setting
296
+ - Ensure build completed successfully
297
+
298
+ **Assets not loading:**
299
+ - Use absolute paths: `/css/style.css`
300
+ - Check asset file locations
301
+ - Verify asset directory deployed
302
+
303
+ **Slow build:**
304
+ - Use incremental builds (default)
305
+ - Cache dependencies
306
+ - Check build machine specs