zenweb 2.18.1 → 3.0.0.b1
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/.autotest +18 -0
- data/.gemtest +0 -0
- data/History.txt +6 -0
- data/Manifest.txt +52 -50
- data/README.txt +27 -22
- data/Rakefile +8 -9
- data/example-site/.isolate.rb +8 -0
- data/example-site/Rakefile +32 -0
- data/example-site/_config.yml +3 -0
- data/example-site/_includes/analytics.html.erb +11 -0
- data/example-site/_includes/header.html.erb +3 -0
- data/example-site/_includes/page_list_item.html +5 -0
- data/example-site/_includes/post_list_item.html +5 -0
- data/example-site/_layouts/post.erb +13 -0
- data/example-site/_layouts/project.erb +39 -0
- data/example-site/_layouts/site.erb +62 -0
- data/example-site/about/index.html.md +8 -0
- data/example-site/atom.xml.erb +43 -0
- data/example-site/blog/2012-01-02-page1.html.md +5 -0
- data/example-site/blog/2012-01-03-page2.html.md +5 -0
- data/example-site/blog/2012-01-04-page3.html.md +5 -0
- data/example-site/blog/_config.yml +1 -0
- data/example-site/blog/index.html.erb +19 -0
- data/example-site/config.ru +33 -0
- data/example-site/css/colors.css.less +71 -0
- data/example-site/css/styles.css +223 -0
- data/example-site/css/syntax.css +171 -0
- data/example-site/img/bg.png +0 -0
- data/example-site/index.html.erb +27 -0
- data/example-site/js/jquery.js +154 -0
- data/example-site/js/site.js +37 -0
- data/example-site/pages/index.html.erb +17 -0
- data/example-site/pages/nonblogpage.html.md +8 -0
- data/example-site/projects/index.html.erb +18 -0
- data/example-site/projects/zenweb.html.erb +9 -0
- data/example-site/sitemap.xml.erb +24 -0
- data/lib/zenweb.rb +12 -0
- data/lib/zenweb/config.rb +126 -0
- data/lib/zenweb/extensions.rb +51 -0
- data/lib/zenweb/page.rb +409 -0
- data/lib/zenweb/plugins/disqus.rb +18 -0
- data/lib/zenweb/plugins/erb.rb +43 -0
- data/lib/zenweb/plugins/google.rb +20 -0
- data/lib/zenweb/plugins/less.rb +10 -0
- data/lib/zenweb/plugins/markdown.rb +121 -0
- data/lib/zenweb/site.rb +237 -0
- data/lib/zenweb/tasks.rake +165 -0
- data/test/helper.rb +53 -0
- data/test/test_zenweb_config.rb +90 -0
- data/test/test_zenweb_extensions.rb +33 -0
- data/test/test_zenweb_page.rb +381 -0
- data/test/test_zenweb_plugins_disqus.rb +41 -0
- data/test/test_zenweb_plugins_erb.rb +60 -0
- data/test/test_zenweb_plugins_google.rb +38 -0
- data/test/test_zenweb_plugins_less.rb +33 -0
- data/test/test_zenweb_plugins_markdown.rb +227 -0
- data/test/test_zenweb_site.rb +294 -0
- metadata +230 -86
- metadata.gz.sig +0 -0
- data/bin/zenweb +0 -27
- data/bin/zenwebpage +0 -66
- data/bin/zenwebsite +0 -39
- data/design/REQUIREMENTS.txt +0 -52
- data/design/ZENWEB_2.txt +0 -69
- data/design/heirarchy.png +0 -0
- data/design/heirarchy.tgif +0 -311
- data/docs/Customizing +0 -76
- data/docs/FAQ +0 -12
- data/docs/Features +0 -128
- data/docs/Presentation +0 -88
- data/docs/QuickStart +0 -32
- data/docs/Renderers +0 -85
- data/docs/SiteMap +0 -13
- data/docs/YourOwnWebsite +0 -32
- data/docs/index +0 -14
- data/docs/metadata.txt +0 -10
- data/lib/ZenWeb.rb +0 -850
- data/lib/ZenWeb/CalendarRenderer.rb +0 -162
- data/lib/ZenWeb/CompactRenderer.rb +0 -45
- data/lib/ZenWeb/CompositeRenderer.rb +0 -63
- data/lib/ZenWeb/FileAttachmentRenderer.rb +0 -57
- data/lib/ZenWeb/FooterRenderer.rb +0 -38
- data/lib/ZenWeb/GenericRenderer.rb +0 -143
- data/lib/ZenWeb/HeaderRenderer.rb +0 -52
- data/lib/ZenWeb/HtmlRenderer.rb +0 -81
- data/lib/ZenWeb/HtmlTableRenderer.rb +0 -94
- data/lib/ZenWeb/HtmlTemplateRenderer.rb +0 -173
- data/lib/ZenWeb/MetadataRenderer.rb +0 -83
- data/lib/ZenWeb/RelativeRenderer.rb +0 -97
- data/lib/ZenWeb/RubyCodeRenderer.rb +0 -56
- data/lib/ZenWeb/SitemapRenderer.rb +0 -56
- data/lib/ZenWeb/StandardRenderer.rb +0 -40
- data/lib/ZenWeb/StupidRenderer.rb +0 -91
- data/lib/ZenWeb/SubpageRenderer.rb +0 -45
- data/lib/ZenWeb/TextToHtmlRenderer.rb +0 -219
- data/lib/ZenWeb/TocRenderer.rb +0 -60
- data/lib/ZenWeb/XXXRenderer.rb +0 -32
- data/test/SiteMap +0 -14
- data/test/Something +0 -4
- data/test/include.txt +0 -3
- data/test/index +0 -8
- data/test/metadata.txt +0 -10
- data/test/ryand/SiteMap +0 -10
- data/test/ryand/blah +0 -4
- data/test/ryand/blah-blah +0 -4
- data/test/ryand/index +0 -52
- data/test/ryand/metadata.txt +0 -2
- data/test/ryand/stuff/index +0 -4
- data/test/test_zenweb.rb +0 -1619
data.tar.gz.sig
CHANGED
Binary file
|
data/.autotest
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require 'autotest/restart'
|
4
|
+
require 'autotest/isolate'
|
5
|
+
require 'autotest/rcov' if ENV['RCOV']
|
6
|
+
|
7
|
+
Autotest.add_hook :initialize do |at|
|
8
|
+
at.testlib = "minitest/autorun"
|
9
|
+
|
10
|
+
at.add_exception /isolate/
|
11
|
+
|
12
|
+
at.extra_class_map["Zenweb::Site"] = "lib/zenweb/site.rb"
|
13
|
+
at.extra_class_map["Zenweb::Page"] = "lib/zenweb/page.rb"
|
14
|
+
at.extra_class_map["Zenweb::Config"] = "lib/zenweb/config.rb"
|
15
|
+
at.extra_class_map["TestZenwebPageErb"] = "test/test_zenweb_plugins_erb.rb"
|
16
|
+
at.extra_class_map["TestZenwebPageMarkdown"] = "test/test_zenweb_plugins_markdown.rb"
|
17
|
+
at.extra_class_map["TestZenwebPageLess"] = "test/test_zenweb_plugins_less.rb"
|
18
|
+
end
|
data/.gemtest
ADDED
File without changes
|
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -1,54 +1,56 @@
|
|
1
|
+
.autotest
|
1
2
|
History.txt
|
2
3
|
Manifest.txt
|
3
4
|
README.txt
|
4
5
|
Rakefile
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
lib/
|
36
|
-
lib/
|
37
|
-
lib/
|
38
|
-
lib/
|
39
|
-
lib/
|
40
|
-
lib/
|
41
|
-
lib/
|
42
|
-
lib/
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
test/
|
47
|
-
test/
|
48
|
-
test/
|
49
|
-
test/
|
50
|
-
test/
|
51
|
-
test/
|
52
|
-
test/
|
53
|
-
test/
|
54
|
-
test/
|
6
|
+
example-site/.isolate.rb
|
7
|
+
example-site/Rakefile
|
8
|
+
example-site/_config.yml
|
9
|
+
example-site/_includes/analytics.html.erb
|
10
|
+
example-site/_includes/header.html.erb
|
11
|
+
example-site/_includes/page_list_item.html
|
12
|
+
example-site/_includes/post_list_item.html
|
13
|
+
example-site/_layouts/post.erb
|
14
|
+
example-site/_layouts/project.erb
|
15
|
+
example-site/_layouts/site.erb
|
16
|
+
example-site/about/index.html.md
|
17
|
+
example-site/atom.xml.erb
|
18
|
+
example-site/blog/2012-01-02-page1.html.md
|
19
|
+
example-site/blog/2012-01-03-page2.html.md
|
20
|
+
example-site/blog/2012-01-04-page3.html.md
|
21
|
+
example-site/blog/_config.yml
|
22
|
+
example-site/blog/index.html.erb
|
23
|
+
example-site/config.ru
|
24
|
+
example-site/css/colors.css.less
|
25
|
+
example-site/css/styles.css
|
26
|
+
example-site/css/syntax.css
|
27
|
+
example-site/img/bg.png
|
28
|
+
example-site/index.html.erb
|
29
|
+
example-site/js/jquery.js
|
30
|
+
example-site/js/site.js
|
31
|
+
example-site/pages/index.html.erb
|
32
|
+
example-site/pages/nonblogpage.html.md
|
33
|
+
example-site/projects/index.html.erb
|
34
|
+
example-site/projects/zenweb.html.erb
|
35
|
+
example-site/sitemap.xml.erb
|
36
|
+
lib/zenweb.rb
|
37
|
+
lib/zenweb/config.rb
|
38
|
+
lib/zenweb/extensions.rb
|
39
|
+
lib/zenweb/page.rb
|
40
|
+
lib/zenweb/plugins/disqus.rb
|
41
|
+
lib/zenweb/plugins/erb.rb
|
42
|
+
lib/zenweb/plugins/google.rb
|
43
|
+
lib/zenweb/plugins/less.rb
|
44
|
+
lib/zenweb/plugins/markdown.rb
|
45
|
+
lib/zenweb/site.rb
|
46
|
+
lib/zenweb/tasks.rake
|
47
|
+
test/helper.rb
|
48
|
+
test/test_zenweb_config.rb
|
49
|
+
test/test_zenweb_extensions.rb
|
50
|
+
test/test_zenweb_page.rb
|
51
|
+
test/test_zenweb_plugins_disqus.rb
|
52
|
+
test/test_zenweb_plugins_erb.rb
|
53
|
+
test/test_zenweb_plugins_google.rb
|
54
|
+
test/test_zenweb_plugins_less.rb
|
55
|
+
test/test_zenweb_plugins_markdown.rb
|
56
|
+
test/test_zenweb_site.rb
|
data/README.txt
CHANGED
@@ -1,47 +1,52 @@
|
|
1
1
|
= ZenWeb
|
2
2
|
|
3
|
-
*
|
3
|
+
* https://github.com/seattlerb/zenweb/
|
4
4
|
|
5
5
|
== DESCRIPTION:
|
6
6
|
|
7
|
-
|
7
|
+
Zenweb is a set of classes/tools for organizing and formating a
|
8
8
|
website. It is website oriented rather than webpage oriented, unlike
|
9
9
|
most rendering tools. It is content oriented, rather than style
|
10
|
-
oriented, unlike most rendering tools. It
|
11
|
-
|
10
|
+
oriented, unlike most rendering tools. It uses a rubygems plugin
|
11
|
+
system to provide a very flexible, and powerful system.
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
or whatever machine you are running on.
|
13
|
+
Zenweb 3 was inspired by jekyll. The filesystem layout is similar to
|
14
|
+
jekyll's layout, but zenweb isn't focused on blogs. It can do any sort
|
15
|
+
of website just fine.
|
16
|
+
|
17
|
+
Zenweb uses rake to handle dependencies. As a result, scanning a
|
18
|
+
website and regenerating incrementally is not just possible, it is
|
19
|
+
blazingly fast.
|
21
20
|
|
22
21
|
== FEATURES:
|
23
22
|
|
24
|
-
*
|
25
|
-
*
|
26
|
-
*
|
27
|
-
*
|
28
|
-
*
|
29
|
-
*
|
23
|
+
* Uses rake to do intelligent incremental builds.
|
24
|
+
* Uses rubygems to provide a flexible plugin system.
|
25
|
+
* Provides plugins for less, markdown, and erb out of the box.
|
26
|
+
* Uses a hierarchical config/variable system making pages cleaner.
|
27
|
+
* Has syntax highlighting via coderay.
|
28
|
+
* Blazingly fast.
|
29
|
+
* Stupidly flexible.
|
30
|
+
* TODO: provide more templates via gem extensions.
|
31
|
+
* TODO: provide more migrators via gem extensions.
|
30
32
|
|
31
33
|
== REQUIREMENTS:
|
32
34
|
|
33
|
-
*
|
34
|
-
*
|
35
|
+
* rubygems
|
36
|
+
* rake
|
37
|
+
* kramdown
|
38
|
+
* coderay
|
39
|
+
* rb-fsevent
|
35
40
|
|
36
41
|
== INSTALL:
|
37
42
|
|
38
|
-
*
|
43
|
+
* gem install zenweb
|
39
44
|
|
40
45
|
== LICENSE:
|
41
46
|
|
42
47
|
(The MIT License)
|
43
48
|
|
44
|
-
Copyright (c)
|
49
|
+
Copyright (c) Ryan Davis, Seattle.rb
|
45
50
|
|
46
51
|
Permission is hereby granted, free of charge, to any person obtaining
|
47
52
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -4,19 +4,18 @@ require 'rubygems'
|
|
4
4
|
require 'hoe'
|
5
5
|
|
6
6
|
Hoe.plugin :seattlerb
|
7
|
+
Hoe.plugin :isolate
|
8
|
+
Hoe.plugin :rcov
|
7
9
|
|
8
10
|
Hoe.spec 'zenweb' do
|
9
11
|
developer 'Ryan Davis', 'ryand-ruby@zenspider.com'
|
10
12
|
|
11
|
-
|
13
|
+
dependency "rake", "~> 0.9", :development
|
14
|
+
dependency "makerakeworkwell", "~> 1.0", :development
|
15
|
+
dependency "less", "~> 1.2"
|
16
|
+
dependency "coderay", "~> 1.0"
|
17
|
+
dependency "kramdown", "~> 0.13"
|
18
|
+
dependency "rcov", "~> 0.9", :development
|
12
19
|
end
|
13
20
|
|
14
|
-
task :docs do
|
15
|
-
ruby "-w -Ilib bin/zenweb docs"
|
16
|
-
end
|
17
|
-
|
18
|
-
# TODO:
|
19
|
-
# apache: docs
|
20
|
-
# grep -v CustomLog $$(httpd -V | grep SERVER_CONFIG_FILE | cut -f 2 -d= | cut -f 2 -d\") > httpd.conf; httpd -X -d $$PWD/docshtml -f $$PWD/httpd.conf -c "PidFile $$PWD/httpd.pid" -c "Port 8080" -c "ErrorLog $$PWD/error.log" -c "TransferLog $$PWD/access.log" -c "DocumentRoot $$PWD/docshtml"
|
21
|
-
|
22
21
|
# vim: syntax=ruby
|
@@ -0,0 +1,32 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
|
5
|
+
load ".isolate.rb"
|
6
|
+
|
7
|
+
$: << "../lib"
|
8
|
+
|
9
|
+
Rake.application.options.rakelib << "../lib/zenweb"
|
10
|
+
|
11
|
+
def extra_wirings
|
12
|
+
site = $website
|
13
|
+
pages = site.pages
|
14
|
+
html = site.pages.reject { |k,p| p.url_path !~ /\.html/ }
|
15
|
+
cats = site.categories
|
16
|
+
|
17
|
+
pages["sitemap.xml.erb"]. depends_on html
|
18
|
+
pages["atom.xml.erb"]. depends_on site.pages_by_date.first(30)
|
19
|
+
pages["index.html.erb"]. depends_on html
|
20
|
+
|
21
|
+
pages["blog/index.html.erb"]. depends_on cats.blog
|
22
|
+
pages["projects/index.html.erb"]. depends_on cats.projects
|
23
|
+
pages["pages/index.html.erb"]. depends_on cats.pages
|
24
|
+
end
|
25
|
+
|
26
|
+
task :extra_wirings do
|
27
|
+
extra_wirings
|
28
|
+
end
|
29
|
+
|
30
|
+
task :push do
|
31
|
+
sh "rsync -rv --del .site/ /Library/WebServer/Documents/"
|
32
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<script type="text/javascript">
|
2
|
+
var _gaq = _gaq || [];
|
3
|
+
_gaq.push(['_setAccount', '{{ site.google_ua }}']);
|
4
|
+
_gaq.push(['_trackPageview']);
|
5
|
+
|
6
|
+
(function() {
|
7
|
+
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
8
|
+
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
9
|
+
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(ga);
|
10
|
+
})();
|
11
|
+
</script>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
layout: site
|
3
|
+
header: example.com projects
|
4
|
+
...
|
5
|
+
|
6
|
+
<div class="project">
|
7
|
+
<h1 class="title">{{ page.title }}</h1>
|
8
|
+
<h2 class="subtitle">{{ page.subtitle }}</h2>
|
9
|
+
|
10
|
+
{{ content }}
|
11
|
+
|
12
|
+
<!-- get the code -->
|
13
|
+
<h1 class="section">Get The Code</h1>
|
14
|
+
{% if page.gem %}
|
15
|
+
If you just want to use {{ page.title }}, you can install it via RubyGems:
|
16
|
+
<pre>gem install {{ page.gem }}</pre>
|
17
|
+
{% end %}
|
18
|
+
|
19
|
+
{% if page.github %}
|
20
|
+
<a href="http://github.com/{{ page.github }}">
|
21
|
+
<img style="position: absolute; top: 80px; right: 0; border: 0;"
|
22
|
+
src="http://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png"
|
23
|
+
alt="Fork me on GitHub"
|
24
|
+
/>
|
25
|
+
</a>
|
26
|
+
|
27
|
+
If you want to hack on {{ page.title }}, clone it from GitHub:
|
28
|
+
<pre>git clone git://github.com/{{ page.github }}</pre>
|
29
|
+
|
30
|
+
<!-- Recent Activity -->
|
31
|
+
<h1 class="section">Recent Activity</h1>
|
32
|
+
<ul id="recent_activity" class="activity">
|
33
|
+
<h3>Loading...</h3>
|
34
|
+
</ul>
|
35
|
+
<script type="text/javascript">
|
36
|
+
fetch_recent_github_activity( "{{ page.github }}" );
|
37
|
+
</script>
|
38
|
+
{% end %}
|
39
|
+
</div>
|
@@ -0,0 +1,62 @@
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
3
|
+
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en-us">
|
5
|
+
<head>
|
6
|
+
<title>
|
7
|
+
{% if page.title %} {{ page.title }} | {% end %} {{ page.header }}
|
8
|
+
</title>
|
9
|
+
|
10
|
+
<!-- atom feed -->
|
11
|
+
<link href="http://blog.example.com/atom.xml" rel="alternate" title="{{ page.title }}" type="application/atom+xml" />
|
12
|
+
|
13
|
+
<!-- stylesheets -->
|
14
|
+
<link rel="stylesheet" href="/css/styles.css" type="text/css" />
|
15
|
+
<link rel="stylesheet" href="/css/syntax.css" type="text/css" />
|
16
|
+
|
17
|
+
<!-- site javascript -->
|
18
|
+
<script type="text/javascript" src="/js/jquery.js"></script>
|
19
|
+
<script type="text/javascript" src="/js/site.js"></script>
|
20
|
+
|
21
|
+
<!-- typekit -->
|
22
|
+
<script type="text/javascript" src="http://use.typekit.com/sic1xhc.js"></script>
|
23
|
+
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
|
24
|
+
</head>
|
25
|
+
|
26
|
+
<body>
|
27
|
+
{{ include "analytics.html.erb", page }}
|
28
|
+
|
29
|
+
<div id="header">
|
30
|
+
<h1><a href="/">{{ page.header }}</a></h1>
|
31
|
+
|
32
|
+
<ul>
|
33
|
+
<li><a href="/">home</a></li>
|
34
|
+
<li><a href="/posts">blog</a></li>
|
35
|
+
<li><a href="/projects">projects</a></li>
|
36
|
+
<li><a href="/releases">releases</a></li>
|
37
|
+
<li><a href="/pages">pages</a></li>
|
38
|
+
<li><a href="/about">about</a></li>
|
39
|
+
</ul>
|
40
|
+
</div>
|
41
|
+
|
42
|
+
<div id="container">
|
43
|
+
{{ content }}
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="footer">
|
47
|
+
<div id="contact">
|
48
|
+
John Doe<br />
|
49
|
+
john.doe@example.com<br />
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div id="presence">
|
53
|
+
<a href="http://blog.example.com">nerd blog</a><br />
|
54
|
+
<a href="http://github.com/seattlerb">github.com/seattlerb</a>
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="copyright">
|
58
|
+
All content © John Doe
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</body>
|
62
|
+
</html>
|