zenweb 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/History.txt +200 -187
- data/Rakefile +1 -1
- data/lib/zenweb.rb +1 -1
- data/lib/zenweb/config.rb +5 -1
- data/lib/zenweb/plugins/markdown.rb +9 -5
- data/lib/zenweb/site.rb +10 -2
- metadata +18 -12
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
=== 3.1.0 / 2013-02-22
|
2
|
+
|
3
|
+
* 4 minor enhancements:
|
4
|
+
|
5
|
+
* Added Site.binary_files so you can register extra binary file extensions.
|
6
|
+
* Added Site.text_files so you can register extra text file extensions.
|
7
|
+
* Updated to use rake 0.9 or 10.
|
8
|
+
* markdown: Added new config no_line_numbers to control coderay's formatting.
|
9
|
+
|
10
|
+
* 1 bug fix:
|
11
|
+
|
12
|
+
* 2.0: Default is now UTF-8, so treat UTF_BOM as binary explicitly
|
13
|
+
|
1
14
|
=== 3.0.0 / 2012-11-03
|
2
15
|
|
3
16
|
* 1 major enhancement:
|
@@ -111,7 +124,7 @@
|
|
111
124
|
|
112
125
|
* 10 bug fixes
|
113
126
|
|
114
|
-
|
127
|
+
* Couldn't call parent on the top page.
|
115
128
|
* Fixed a bug in HtmlTableRenderer when a paragraph butts up against it.
|
116
129
|
* Fixed a bug in the doco.
|
117
130
|
* Fixed a problem where files with dashes in their names were rejected.
|
@@ -126,375 +139,375 @@
|
|
126
139
|
|
127
140
|
* 3 minor enhancements
|
128
141
|
|
129
|
-
|
130
|
-
|
131
|
-
|
142
|
+
* Added FileAttachmentRenderer
|
143
|
+
* Added ordered HTML list support with the "=" delimiter
|
144
|
+
* Workaround added until a bug is fixed in ruby (should be in 1.8.2). This speeds up ZenWeb by 50% on my website.
|
132
145
|
|
133
146
|
* 1 bug fixes
|
134
147
|
|
135
|
-
|
148
|
+
* Couldn't call parent on the top page.
|
136
149
|
|
137
150
|
=== 2.16.0 / 2004-02-26
|
138
151
|
|
139
152
|
* 11 minor enhancements
|
140
153
|
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
154
|
+
* Added HtmlTableRenderer and tests.
|
155
|
+
* Added ZenWebsite, creates Makefile, and data dir with minimal site.
|
156
|
+
* Added better debugging output for undefined metadata variable access.
|
157
|
+
* Added caching of eval'd strings in MetadataRenderer.
|
158
|
+
* Added displayBadMetadata method that reports bad metadata access and stale definitions.
|
159
|
+
* Added the apache rule to Makefile and ZenWebpage.rb.
|
160
|
+
* Added the start of a FAQ to the demo pages.
|
161
|
+
* Added two helper methods link and img, to clean up metadata files.
|
162
|
+
* Extended ZenWebpage to include creating generic Makefiles.
|
163
|
+
* Lots of cleanup and (minor) optimization in the renderers.
|
164
|
+
* MetadataRenderer.include now properly does relative paths.
|
152
165
|
|
153
166
|
* 15 bug fixes
|
154
167
|
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
168
|
+
* Added RUBYFLAGS to Makefile.
|
169
|
+
* Added a new metatag 'style' to ZenWeb for short CSS snippets.
|
170
|
+
* Added geourl metadata
|
171
|
+
* Changes for 1.8 version of Test::Unit
|
172
|
+
* Clarified some documentation, esp in quickstart.
|
173
|
+
* Cleaned the documentation quite a bit using new metadata debugging.
|
174
|
+
* Fixed shutupwhile for ruby 1.8.0 with Matz's help.
|
175
|
+
* Fixed stupid Test::Unit breakage.
|
176
|
+
* Minor test refactoring.
|
177
|
+
* Renamed demo to docs to clear up user confusion.
|
178
|
+
* Retired zentestrunner.
|
179
|
+
* RubyCodeRenderer updated for changes to xmp. Less fragile now.
|
180
|
+
* Updated version.
|
181
|
+
* ZenWeb.rb will use "html" if source dir is "data".
|
182
|
+
* make install now sets permissions on scripts.
|
170
183
|
|
171
184
|
=== 2.15.0 / 2003-02-04
|
172
185
|
|
173
186
|
* 2 minor enhancements
|
174
187
|
|
175
|
-
|
176
|
-
|
188
|
+
* Added MetadataRenderer.include and tests. I can finally render my documentation online without duplicating it in my source tree!
|
189
|
+
* 'force' = true as a metadata variable forces page rebuild. Good for includes.
|
177
190
|
|
178
191
|
* 4 bug fixes
|
179
192
|
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
193
|
+
* Massively revamped the history file to work w/in ZenWeb.
|
194
|
+
* Enhanced html list tests to ensure it worked at many levels.
|
195
|
+
* Hash to DL conversion now (finally!) preserves order.
|
196
|
+
* Moved run_all_tests_with into zentestrunner.rb.
|
184
197
|
|
185
198
|
=== 2.14.1 / 2002-10-06
|
186
199
|
|
187
200
|
* 2 bug fixes
|
188
201
|
|
189
|
-
|
190
|
-
|
202
|
+
* RelativeRenderer was busted w/ '#location' urls.
|
203
|
+
* tests using 'touch' didn't work on some linux distros.
|
191
204
|
|
192
205
|
=== 2.14.0 / 2002-09-28
|
193
206
|
|
194
207
|
* 1 minor enhancement
|
195
208
|
|
196
|
-
|
209
|
+
* <EM>Added many tests to bring it to ZenTest 1.0 compliancy.</EM>
|
197
210
|
|
198
211
|
* 4 bug fixes
|
199
212
|
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
213
|
+
* Renamed ZenTest to ZenTestCase.
|
214
|
+
* ZenDocument#addSubpage tests the type and throws if bad.
|
215
|
+
* CompositeRenderer#addRenderer checks the types.
|
216
|
+
* StupidRenderer wasn't compliant to the new GenericRenderer API.
|
204
217
|
|
205
218
|
=== 2.14.0 / 2002-09-28
|
206
219
|
|
207
220
|
* 1 minor enhancement
|
208
221
|
|
209
|
-
|
222
|
+
* Added many tests to bring it to ZenTest 1.0 compliancy.
|
210
223
|
|
211
224
|
* 4 bug fixes
|
212
225
|
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
226
|
+
* Renamed ZenTest to ZenTestCase.
|
227
|
+
* ZenDocument#addSubpage tests the type and throws if bad.
|
228
|
+
* CompositeRenderer#addRenderer checks the types.
|
229
|
+
* StupidRenderer wasn't compliant to the new GenericRenderer API.
|
217
230
|
|
218
|
-
=== 2002-09-02
|
231
|
+
=== 2.13.1 / 2002-09-02
|
219
232
|
|
220
233
|
* 2 bug fixes
|
221
234
|
|
222
|
-
|
223
|
-
|
235
|
+
* Fixed a big rendering bug. It escaped my tests because of a race condition.
|
236
|
+
* Added optional charset variable to HtmlTemplateRenderer.
|
224
237
|
|
225
|
-
=== 2002-08-31
|
238
|
+
=== 2.13.0 / 2002-08-31
|
226
239
|
|
227
240
|
* 2 major enhancements
|
228
241
|
|
229
|
-
|
230
|
-
|
242
|
+
* Architectural change: render methods now take and return a single string.
|
243
|
+
* Reduced runtime by about 20%.
|
231
244
|
|
232
245
|
* 4 minor enhancements
|
233
246
|
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
247
|
+
* Fixed use of regular expressions that caused incompatibilities between 1.6.4, 1.6.7, and 1.7.2. Needs testing.
|
248
|
+
* Modified RelativeRenderer to NoOp if ruby < 1.6.7.
|
249
|
+
* Updated sitemaps now cause re-rendering of entire site. (disabled-minor bug)
|
250
|
+
* Added GenericRenderer#result
|
238
251
|
|
239
252
|
* 5 bug fixes
|
240
253
|
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
254
|
+
* Moved several documents to design directory. Updated manifest.
|
255
|
+
* Moved ZenDocument#createList and createHash to ZenWeb/TextToHtmlRenderer.
|
256
|
+
* Stripped out old profiling code.
|
257
|
+
* Removed all existing warnings from ruby 1.7.2
|
258
|
+
* (Re)Moved dependencies for renderers in ZenWeb.rb.
|
246
259
|
|
247
|
-
=== 2002-08-29
|
260
|
+
=== 2.12.1 / 2002-08-29
|
248
261
|
|
249
262
|
* 1 bug fix
|
250
263
|
|
251
|
-
|
264
|
+
* Added StupidRenderer, which is so stupid that I thought I'd list it as a bug instead of a minor enhancement. :) The cool thing is that this was written at a Seattle.rb meeting as a demo and it only took 20 seconds for the first iteration!
|
252
265
|
|
253
|
-
=== 2002-08-19
|
266
|
+
=== 2.12.0 / 2002-08-19
|
254
267
|
|
255
268
|
* 2 minor enhancements
|
256
269
|
|
257
|
-
|
258
|
-
|
270
|
+
* Added TocRenderer code and tests. Using it in the demo as well...
|
271
|
+
* Added Renderers page to demo.
|
259
272
|
|
260
273
|
* 3 bug fixes
|
261
274
|
|
262
|
-
|
263
|
-
|
264
|
-
|
275
|
+
* Fixed some parsing errors when used w/ ruby 1.7. Tests clean in 1.6 and 1.7.
|
276
|
+
* Moved TestMetadata in TestZenWeb and clumped the renderers together.
|
277
|
+
* switched to RUBY variable in Makefile for testing in multiple versions.
|
265
278
|
|
266
|
-
=== 2002-08-16
|
279
|
+
=== 2.11.1 / 2002-08-16
|
267
280
|
|
268
281
|
* 1 bug fix
|
269
282
|
|
270
|
-
|
283
|
+
* Wrote Customizing document for those who want to really tweak their site.
|
271
284
|
|
272
|
-
=== 2002-08-15
|
285
|
+
=== 2.11.0 / 2002-08-15
|
273
286
|
|
274
287
|
* 1 minor enhancement
|
275
288
|
|
276
|
-
|
289
|
+
* ZenWeb.rb: Split out all renderers into separate files and modified renderer instantiation to ensure they are loaded dynamically.
|
277
290
|
|
278
291
|
* 3 bug fixes
|
279
292
|
|
280
|
-
|
281
|
-
|
282
|
-
|
293
|
+
* TestZenWeb: got to work w/ new split structure.
|
294
|
+
* demo: added (mostly empty) customizing page.
|
295
|
+
* Makefile: added requirements checker and massive improvements to install.
|
283
296
|
|
284
|
-
=== 2002-08-13
|
297
|
+
=== 2.10.0 / 2002-08-13
|
285
298
|
|
286
299
|
* 4 minor enhancements
|
287
300
|
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
301
|
+
* Overhauled demo pages. Documented special variables and much more.
|
302
|
+
* Extended ZenWebpage.rb to deal w/ metadata.txt and SiteMap files.
|
303
|
+
* Added demo/Presentation.
|
304
|
+
* Added heirarchy.png and .tgif.
|
292
305
|
|
293
306
|
* 4 bug fixes
|
294
307
|
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
308
|
+
* Deleted design.obj and objectmodel.obj in favor of heirarchy.tgif.
|
309
|
+
* Fixed version number, I had kept and released a mislabeled beta by accident.
|
310
|
+
* Improved banner to point to zenspider.com.
|
311
|
+
* Updated Manifest.txt, no more stale stuff.
|
299
312
|
|
300
|
-
=== 2002-08-11
|
313
|
+
=== 2.9.1 / 2002-08-11
|
301
314
|
|
302
315
|
* 2 bug fixes
|
303
316
|
|
304
|
-
|
305
|
-
|
317
|
+
* Fixed REQUIREMENTS.txt (minor).
|
318
|
+
* Fixed SiteMapRenderer indentation for ~user sites.
|
306
319
|
|
307
|
-
=== 2002-08-06
|
320
|
+
=== 2.9.0 / 2002-08-06
|
308
321
|
|
309
322
|
* 2 minor enhancements
|
310
323
|
|
311
|
-
|
312
|
-
|
324
|
+
* Added RelativeRenderer to convert urls to relative where possible.
|
325
|
+
* Improved tests and test content.
|
313
326
|
|
314
|
-
=== 2002-08-03
|
327
|
+
=== 2.8.1 / 2002-08-03
|
315
328
|
|
316
329
|
* 3 bug fixes
|
317
330
|
|
318
|
-
|
319
|
-
|
320
|
-
|
331
|
+
* Removed "mailto:" from MADE metadata to have anti-spam links.
|
332
|
+
* Allow for a backslashed colon to prevent automatic url conversion.
|
333
|
+
* Fixed demo and overhauled it's documentation.
|
321
334
|
|
322
|
-
=== 2002-05-29
|
335
|
+
=== 2.8.0 / 2002-05-29
|
323
336
|
|
324
337
|
* 2 minor enhancements
|
325
338
|
|
326
|
-
|
327
|
-
|
339
|
+
* Added ruby code interpolation in MetadataRenderer
|
340
|
+
* Cut (wallclock) runtime for large sites by 50%. ~25% for smaller sites.
|
328
341
|
|
329
342
|
* 4 bug fixes
|
330
343
|
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
344
|
+
* Added a INSTALL section to the readme.
|
345
|
+
* Got rid of extra xxx test directory and fixed tests.
|
346
|
+
* Added ZenWebsite.banner method and switched to it in cmdline tools and tests.
|
347
|
+
* Improved metadata usage documentation.
|
335
348
|
|
336
|
-
=== 2002-05-17
|
349
|
+
=== 2.7.4 / 2002-05-17
|
337
350
|
|
338
351
|
* 4 bug fixes
|
339
352
|
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
353
|
+
* Added a 'demo' rule to the makefile.
|
354
|
+
* Added a requirements section to the readme.
|
355
|
+
* Modified incremental build tests to be much faster. Requires 'touch'.
|
356
|
+
* demo/... Updated old python based demo ... oops.
|
344
357
|
|
345
|
-
=== 2002-05-14
|
358
|
+
=== 2.7.3 / 2002-05-14
|
346
359
|
|
347
360
|
* 3 bug fixes
|
348
361
|
|
349
|
-
|
350
|
-
|
351
|
-
|
362
|
+
* Implemented test_load, test_loadFromDirectory, test_renderContent_foot.
|
363
|
+
* Added -I. to Makefile invocation of tests.
|
364
|
+
* Deleted Metadata#save and corresponding test. Yeah! Less code!
|
352
365
|
|
353
|
-
=== 2002-04-07
|
366
|
+
=== 2.7.2 / 2002-04-07
|
354
367
|
|
355
368
|
* 2 bug fixes
|
356
369
|
|
357
|
-
|
358
|
-
|
370
|
+
* Updated to use Test::Unit instead of deprecated RUNIT.
|
371
|
+
* Fixed all tests. Clean run!
|
359
372
|
|
360
|
-
=== 2002-04-07
|
373
|
+
=== 2.7.1 / 2002-04-07
|
361
374
|
|
362
375
|
* 1 bug fix
|
363
376
|
|
364
|
-
|
377
|
+
* Synced version to new revisionist history version number.
|
365
378
|
|
366
379
|
NOTE: all versions below this line are essentially a revisionist history.
|
367
380
|
|
368
|
-
=== 2002-03-31
|
381
|
+
=== 2.7.0 / 2002-03-31
|
369
382
|
|
370
383
|
* 2 major enhancements
|
371
384
|
|
372
|
-
|
373
|
-
|
385
|
+
* Fixed RubyCodeRenderer!!!! (sorta)
|
386
|
+
* Added ZenWebpage.rb
|
374
387
|
|
375
|
-
=== 2002-01-19
|
388
|
+
=== 2.6.1 / 2002-01-19
|
376
389
|
|
377
390
|
* 1 bug fix
|
378
391
|
|
379
|
-
|
392
|
+
* Allowed #\{ to prevent interpolation. Helps w/ Ruby quickref.
|
380
393
|
|
381
|
-
=== 2001-08-24
|
394
|
+
=== 2.6.0 / 2001-08-24
|
382
395
|
|
383
396
|
* 2 major enhancements
|
384
397
|
|
385
|
-
|
386
|
-
|
398
|
+
* Extended to be able to do incremental builds.
|
399
|
+
* Tool is damn cool now!
|
387
400
|
|
388
401
|
* 2 minor enhancements
|
389
402
|
|
390
|
-
|
391
|
-
|
403
|
+
* Improved unit tests for incremental builds.
|
404
|
+
* Profiled to enhance small changesets in incremental builds.
|
392
405
|
|
393
|
-
=== 2001-08-07
|
406
|
+
=== 2.5.0 / 2001-08-07
|
394
407
|
|
395
408
|
* 3 minor enhancements
|
396
409
|
|
397
|
-
|
398
|
-
|
399
|
-
|
400
|
-
|
410
|
+
* Tests exit w/ test result count.
|
411
|
+
* TestZenWeb.rb: Improved tests. started working on differential build
|
412
|
+
* tests.
|
413
|
+
* ZenWeb.rb: Stubbed newerThanTarget. Sorted some stuff for testing.
|
401
414
|
|
402
|
-
=== 2001-04-14
|
415
|
+
=== 2.4.0 / 2001-04-14
|
403
416
|
|
404
417
|
* 3 minor enhancements
|
405
418
|
|
406
|
-
|
407
|
-
|
408
|
-
|
419
|
+
* Added CompositeRenderer and StandardRenderer to make life easier.
|
420
|
+
* Added test for navbar generation.
|
421
|
+
* Added tilde test files.
|
409
422
|
|
410
423
|
* 1 bug fix
|
411
424
|
|
412
|
-
|
425
|
+
* Removed a redundant refactor tag by renaming to refactee.
|
413
426
|
|
414
|
-
=== 2001-03-30
|
427
|
+
=== 2.3.0 / 2001-03-30
|
415
428
|
|
416
429
|
* 1 major enhancement
|
417
430
|
|
418
|
-
|
431
|
+
* Added tweak to make tilde sites work correctly.
|
419
432
|
|
420
433
|
* 2 minor enhancements
|
421
434
|
|
422
|
-
|
423
|
-
|
435
|
+
* Added test for tilde sites.
|
436
|
+
* Added Makefile
|
424
437
|
|
425
438
|
* 1 bug fix
|
426
439
|
|
427
|
-
|
440
|
+
* Fixed some docs.
|
428
441
|
|
429
|
-
=== 2001-03-08
|
442
|
+
=== 2.2.1 / 2001-03-08
|
430
443
|
|
431
444
|
* 3 bug fixes
|
432
445
|
|
433
|
-
|
434
|
-
|
435
|
-
|
446
|
+
* Fixed renderer list.
|
447
|
+
* Added accessor for testing. Cleaned some html.
|
448
|
+
* Wrote tests for generic renderer.
|
436
449
|
|
437
|
-
=== 2001-03-07
|
450
|
+
=== 2.2.0 / 2001-03-07
|
438
451
|
|
439
452
|
* 12 minor enhancements
|
440
453
|
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
454
|
+
* Added some refactored renderers to renderers list.
|
455
|
+
* Fixed some tags. Refactored some renderers.
|
456
|
+
* Added some tests for newly separated renderers.
|
457
|
+
* Started cleaning up some of the little design things.
|
458
|
+
* Knocked off several tags: cleanup, refactoring, and wrote tests.
|
459
|
+
* Added a test for hash2html.
|
460
|
+
* Fixed several failed tests.
|
461
|
+
* Switched some accessors to only be defined during testing.
|
462
|
+
* Switched TestZenWebsite to subclass ZenTest.
|
463
|
+
* Added several tests. Fixed some.
|
464
|
+
* Switched TestZenSiteMap to subclass TestZenDocument.
|
465
|
+
* Added dictionary lists for testing.
|
453
466
|
|
454
467
|
* 2 bug fixes
|
455
468
|
|
456
|
-
|
457
|
-
|
469
|
+
* Fixed Metadata#initialize.
|
470
|
+
* Added tests for Metadata#initialize.
|
458
471
|
|
459
|
-
=== 2001-03-05
|
472
|
+
=== 2.1.0 / 2001-03-05
|
460
473
|
|
461
474
|
* 15 minor enhancements
|
462
475
|
|
463
|
-
|
464
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
468
|
-
|
469
|
-
|
470
|
-
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
477
|
-
|
476
|
+
* (originally 2.0.0 - first time version was added)
|
477
|
+
* Added ZenDocument#createHash as an analog to createList.
|
478
|
+
* Added HtmlRenderer#hash2html
|
479
|
+
* Added Text2HtmlRenderer extensions for dictionary lists.
|
480
|
+
* Added tests for all new features, and some old ones.
|
481
|
+
* Added content setter if testing.
|
482
|
+
* Added tests for footer and header renderers.
|
483
|
+
* Moved TESTING declaration to be global
|
484
|
+
* Added TESTING variable for verbose-ness only when actually running.
|
485
|
+
* Added test for non-existant renderers.
|
486
|
+
* Added doctype.
|
487
|
+
* Modified how banner is used to make it look much better.
|
488
|
+
* Modified TextToHTMLRenderer to re-split lines more properly.
|
489
|
+
* Started to add RubyCodeRenderer, but am having problems w/ it.
|
490
|
+
* Added tons 'o docs.
|
478
491
|
|
479
492
|
* 1 bug fix
|
480
493
|
|
481
|
-
|
494
|
+
* Corrected date
|
482
495
|
|
483
|
-
=== 2001-02-13
|
496
|
+
=== 2.0.1 / 2001-02-13
|
484
497
|
|
485
498
|
* 2 minor enhancements
|
486
499
|
|
487
|
-
|
488
|
-
|
500
|
+
* Added design docs
|
501
|
+
* Added a test suite
|
489
502
|
|
490
|
-
=== 2001-02-13
|
503
|
+
=== 2.0.0 / 2001-02-13
|
491
504
|
|
492
505
|
* 1 major enhancement
|
493
506
|
|
494
|
-
|
507
|
+
* First fully working version in Ruby.
|
495
508
|
|
496
|
-
===
|
509
|
+
=== 2.0.0 alpha / 2001-01-29
|
497
510
|
|
498
511
|
* 1 major enhancement
|
499
512
|
|
500
|
-
|
513
|
+
* Started ruby project.
|
data/Rakefile
CHANGED
@@ -9,7 +9,7 @@ Hoe.plugin :isolate
|
|
9
9
|
Hoe.spec 'zenweb' do
|
10
10
|
developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
|
11
11
|
|
12
|
-
dependency "rake", "
|
12
|
+
dependency "rake", [">= 0.9", "< 11"]
|
13
13
|
dependency "makerakeworkwell", "~> 1.0"
|
14
14
|
dependency "less", "~> 1.2"
|
15
15
|
dependency "coderay", "~> 1.0"
|
data/lib/zenweb.rb
CHANGED
data/lib/zenweb/config.rb
CHANGED
@@ -2,6 +2,7 @@ require "yaml"
|
|
2
2
|
|
3
3
|
gem "rake"
|
4
4
|
require "rake"
|
5
|
+
require "zenweb/extensions"
|
5
6
|
|
6
7
|
module Zenweb
|
7
8
|
##
|
@@ -52,6 +53,9 @@ module Zenweb
|
|
52
53
|
h[k.to_s] or parent[k]
|
53
54
|
end
|
54
55
|
|
56
|
+
UTF_BOM = "\xEF\xBB\xBF"
|
57
|
+
UTF_BOM.force_encoding "binary" if File::RUBY19
|
58
|
+
|
55
59
|
##
|
56
60
|
# Splits a file and returns the yaml header and body, as applicable.
|
57
61
|
#
|
@@ -63,7 +67,7 @@ module Zenweb
|
|
63
67
|
body = File.binread path
|
64
68
|
|
65
69
|
raise ArgumentError, "UTF BOM not supported: #{path}" if
|
66
|
-
body.start_with?
|
70
|
+
body.start_with? UTF_BOM
|
67
71
|
|
68
72
|
yaml_file = File.extname(path) == ".yml"
|
69
73
|
|
@@ -14,7 +14,8 @@ class Zenweb::Page
|
|
14
14
|
# Render markdown page content using kramdown.
|
15
15
|
|
16
16
|
def render_md page, content
|
17
|
-
|
17
|
+
no_line_numbers = page.config["no_line_numbers"]
|
18
|
+
markdown(content || self.body, no_line_numbers)
|
18
19
|
end
|
19
20
|
|
20
21
|
def extend_md
|
@@ -27,14 +28,17 @@ class Zenweb::Page
|
|
27
28
|
# I cheated and added some additional gsubs. I prefer "``` lang" so
|
28
29
|
# that works now.
|
29
30
|
|
30
|
-
def markdown content
|
31
|
+
def markdown content, no_line_numbers = false
|
31
32
|
require "kramdown"
|
32
33
|
|
33
34
|
content = content.
|
34
|
-
|
35
|
-
|
35
|
+
gsub(/^\`\`\` *(\w+)/) { "{:lang=\"#$1\"}\n~~~" }.
|
36
|
+
gsub(/^\`\`\`/, '~~~')
|
36
37
|
|
37
|
-
|
38
|
+
config = KRAMDOWN_CONFIG.dup
|
39
|
+
config[:coderay_line_numbers] = nil if no_line_numbers
|
40
|
+
|
41
|
+
Kramdown::Document.new(content, config).to_html
|
38
42
|
end
|
39
43
|
|
40
44
|
module MarkdownHelpers
|
data/lib/zenweb/site.rb
CHANGED
@@ -173,9 +173,9 @@ module Zenweb
|
|
173
173
|
next
|
174
174
|
when /\.yml$/ then
|
175
175
|
@configs[path] = Config.new self, path
|
176
|
-
when /\.(
|
176
|
+
when /\.(?:#{self.class.binary_files.join("|")})$/ then
|
177
177
|
@pages[path] = Page.new self, path, self.config
|
178
|
-
when /\.(
|
178
|
+
when /\.(?:#{self.class.text_files.join("|")})$/, renderers_re then
|
179
179
|
@pages[path] = Page.new self, path
|
180
180
|
else
|
181
181
|
warn "unknown file type: #{path}" if Rake.application.options.trace
|
@@ -189,6 +189,14 @@ module Zenweb
|
|
189
189
|
fix_subpages
|
190
190
|
end
|
191
191
|
|
192
|
+
def self.binary_files
|
193
|
+
@binary_files ||= %w[png jpg gif eot svg ttf woff ico pdf m4a t?gz]
|
194
|
+
end
|
195
|
+
|
196
|
+
def self.text_files
|
197
|
+
@text_files ||= %w[txt html css js]
|
198
|
+
end
|
199
|
+
|
192
200
|
def fix_subpages # :nodoc:
|
193
201
|
parents = {}
|
194
202
|
@pages.values.select(&:index?).each do |p|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zenweb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 3.0.0
|
10
|
+
version: 3.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date:
|
39
|
+
date: 2013-02-23 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
@@ -44,13 +44,19 @@ dependencies:
|
|
44
44
|
requirement: &id001 !ruby/object:Gem::Requirement
|
45
45
|
none: false
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
hash: 25
|
50
50
|
segments:
|
51
51
|
- 0
|
52
52
|
- 9
|
53
53
|
version: "0.9"
|
54
|
+
- - <
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 21
|
57
|
+
segments:
|
58
|
+
- 11
|
59
|
+
version: "11"
|
54
60
|
type: :runtime
|
55
61
|
version_requirements: *id001
|
56
62
|
- !ruby/object:Gem::Dependency
|
@@ -121,11 +127,11 @@ dependencies:
|
|
121
127
|
requirements:
|
122
128
|
- - ~>
|
123
129
|
- !ruby/object:Gem::Version
|
124
|
-
hash:
|
130
|
+
hash: 23
|
125
131
|
segments:
|
126
132
|
- 4
|
127
|
-
-
|
128
|
-
version: "4.
|
133
|
+
- 6
|
134
|
+
version: "4.6"
|
129
135
|
type: :development
|
130
136
|
version_requirements: *id006
|
131
137
|
- !ruby/object:Gem::Dependency
|
@@ -151,11 +157,11 @@ dependencies:
|
|
151
157
|
requirements:
|
152
158
|
- - ~>
|
153
159
|
- !ruby/object:Gem::Version
|
154
|
-
hash:
|
160
|
+
hash: 13
|
155
161
|
segments:
|
156
162
|
- 3
|
157
|
-
-
|
158
|
-
version: "3.
|
163
|
+
- 5
|
164
|
+
version: "3.5"
|
159
165
|
type: :development
|
160
166
|
version_requirements: *id008
|
161
167
|
description: |-
|
@@ -270,7 +276,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
270
276
|
requirements: []
|
271
277
|
|
272
278
|
rubyforge_project: zenweb
|
273
|
-
rubygems_version: 1.8.
|
279
|
+
rubygems_version: 1.8.25
|
274
280
|
signing_key:
|
275
281
|
specification_version: 3
|
276
282
|
summary: Zenweb is a set of classes/tools for organizing and formating a website
|
metadata.gz.sig
CHANGED
Binary file
|