textigniter 0.0.34 → 0.0.35
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +37 -31
- data/lib/skeleton/{config.yml → .textigniter/config.yml} +1 -4
- data/lib/skeleton/.textigniter/content/about.textile +4 -0
- data/lib/skeleton/.textigniter/layouts/default.liquid +18 -1
- data/lib/skeleton/.textigniter/layouts/partials/_footer.liquid +3 -0
- data/lib/skeleton/.textigniter/layouts/partials/_header.liquid +7 -0
- data/lib/skeleton/{plugins → .textigniter/plugins}/README.textile +0 -0
- data/lib/textigniter.rb +59 -13
- data/lib/textigniter/build.rb +4 -4
- data/lib/textigniter/build/template_parser.rb +2 -1
- data/lib/textigniter/build/text_parser.rb +5 -2
- data/lib/textigniter/init.rb +21 -19
- data/lib/textigniter/plugins.rb +5 -3
- data/lib/textigniter/plugins/breadcrumbs.rb +31 -0
- data/lib/textigniter/plugins/created_at.rb +3 -1
- data/lib/textigniter/plugins/slug.rb +3 -2
- data/lib/textigniter/scrub.rb +4 -13
- data/textigniter.gemspec +7 -11
- metadata +19 -23
- data/lib/skeleton/.textigniter/content/userguide/index.textile +0 -4
- data/lib/skeleton/.textigniter/content/userguide/textigniter-0.0.3.textile +0 -6
- data/lib/skeleton/.textigniter/content/userguide/textigniter-0.0.31.textile +0 -6
- data/lib/skeleton/.textigniter/content/userguide/textigniter-0.0.32.textile +0 -6
- data/lib/skeleton/.textigniter/content/userguide/textigniter-0.0.33.textile +0 -6
- data/lib/skeleton/.textigniter/layouts/userguide/userguide.liquid +0 -50
- data/lib/skeleton/.textigniter/styles/userguide.less +0 -73
- data/lib/skeleton/README.textile +0 -5
data/README.textile
CHANGED
@@ -1,10 +1,8 @@
|
|
1
1
|
h1. Textigniter
|
2
2
|
|
3
|
-
Follow us on twitter
|
4
|
-
"@textigniter":http://twitter.com/textigniter
|
5
|
-
"@kalebheitzman":http://twitter.com/kalebheitzman
|
3
|
+
Follow us on twitter "@textigniter":http://twitter.com/textigniter
|
6
4
|
|
7
|
-
Textigniter
|
5
|
+
Textigniter uses the power of "Textile":http://redcloth.org/ ("Markdown":http://kramdown.rubyforge.org/ is optional...), "Liquid":http://liquidmarkup.org/, "LESS CSS":http://lesscss.org/, and "Coffee Script":http://jashkenas.github.com/coffee-script/ to create static websites.
|
8
6
|
|
9
7
|
h2. Installation
|
10
8
|
|
@@ -16,57 +14,69 @@ The default parser gem's will be downloaded as well.
|
|
16
14
|
|
17
15
|
h2. Usage
|
18
16
|
|
19
|
-
@textigniter init@
|
17
|
+
@textigniter init (directory)@
|
20
18
|
|
21
|
-
|
19
|
+
Passing the init option initializes a new textigniter environment in your current directory. You can pass a second option to specify a directory that you want to install textigniter in. The textigniter environment is found under a hidden directory named _.textigniter_.
|
22
20
|
|
23
|
-
|
21
|
+
@textigniter build (directory)@
|
24
22
|
|
25
|
-
|
23
|
+
Passing the build option will make textigniter parse the _.textigniter_ directory and output the static html alongside the _.textigniter_ directory.
|
26
24
|
|
27
|
-
|
25
|
+
@textignier scrub (directory)@
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
When you pass the scrub option, all textigniter related files and folders will be removed. This will also remove _output_. If you have files not related to textigniter specifically in the _output_ folder, you should back them up if you do not want to lose them.
|
27
|
+
When you pass the scrub option, all textigniter related files and folders will be removed (I'm rethinking the use of this. It will probably "scrub" the base folder of anything not found in the textigniter environment instead).
|
32
28
|
|
33
29
|
@textigniter help@
|
34
30
|
|
35
|
-
Passing help on the command line will print out usage of
|
31
|
+
Passing help on the command line will print out usage of _textigniter._
|
36
32
|
|
37
33
|
h2. Configuration
|
38
34
|
|
39
|
-
You can add
|
35
|
+
You can add any key:value pair to _./textigniter/config.yml_ as long as it follows YAML format. Anything added to the config file is available as a variable in your templates.
|
36
|
+
|
37
|
+
If you have @site_name: Textigniter@ in the config file, it would be available in your templates as @{{ site_name }}@
|
40
38
|
|
41
39
|
h2. Content
|
42
40
|
|
43
41
|
Content is stored in text files instead of a database. You can find a default _index.textile_ and _about.textile_ under the _.textigniter/content_ folder.
|
44
42
|
Your folder structure will determine your site structure. If you wanted a link that was _yoursite.com/articles/textigniter_, your folder and file structure would be _.textigniter/content/articles/textigniter.textile_. If you decide to use markdown instead of textile, make sure to update _config.yml_ with the correct _text_parser_ and change your file extensions from _.textile_ to _.markdown_.
|
45
43
|
|
46
|
-
These text files are broken down into a meta section and sections delimited by @-- content@, @-- variable_name@. The meta is parsed with YAML and
|
44
|
+
These text files are broken down into a meta section and sections delimited by @-- content@, @-- variable_name@. The meta section is parsed with YAML and all other sections are parsed with Textile. You can use any variable name you want for the text section and they'll be available to the template parser. This is true for the meta section as well. An example file could look something like this:
|
47
45
|
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
46
|
+
<code>title: Textigniter
|
47
|
+
slug: textigniter
|
48
|
+
tags: static, content, html5
|
49
|
+
author: Kaleb Heitzman
|
50
|
+
-- content
|
51
|
+
h1. This is textigniter powered
|
52
|
+
-- sidebar
|
53
|
+
h3. This is some sidebar content
|
54
|
+
</code>
|
56
55
|
|
57
56
|
The following variables would be available in the template according to the code above: {{ title }}, {{ slug }}, {{ tags }}, {{ author }}, {{ content }}, {{ sidebar }}.
|
58
57
|
|
59
58
|
h2. Plugins
|
60
59
|
|
61
|
-
Textigniter supports _meta_
|
60
|
+
Textigniter supports _meta_ section plugins. You can add custom plugin code to _.textigniter/plugins_. Plugins are named after their _meta_ keys found in _.textile_ files.
|
61
|
+
|
62
|
+
For example, if you had a meta key named twitter, you would create a twitter.rb file inside of the plugins directory with a class declaration of @class Textigniter::Plugins::Twitter@. The plugin must have a @parse(h)@ method and must return the parsed value, i.e @return value.@ *h* is the entire text hash with things like title, handle, slug and etc. This allows you combine other meta key:value combinations. We use this functionality for our breadcrumbs plugin. We take the slug and the Title to create an html string that we store in @h['breadcrumbs']@
|
62
63
|
|
63
|
-
|
64
|
+
Here is a sample template:
|
65
|
+
|
66
|
+
<code>
|
67
|
+
class Textigniter::Plugins::Twitter
|
68
|
+
def parse(h)
|
69
|
+
value = h['twitter']
|
70
|
+
return twitter
|
71
|
+
end
|
72
|
+
end
|
73
|
+
</code>
|
64
74
|
|
65
75
|
h2. Templates
|
66
76
|
|
67
77
|
Textigniter uses _liquid_ templates. Anything that goes in liquid can go in textigniter. Checkout the "liquid documentation.":https://github.com/Shopify/liquid/wiki/Liquid-for-Designers
|
68
78
|
|
69
|
-
Anything in
|
79
|
+
Anything in _.textigniter/config.yml_ and the textile(markdown) file is available to the template. For example, _site_name_ is declared in the config file and is available in the template file as {{ site_name }}
|
70
80
|
|
71
81
|
h2. Styles
|
72
82
|
|
@@ -82,8 +92,4 @@ See the "CoffeeScript homepage":http://jashkenas.github.com/coffee-script/ for m
|
|
82
92
|
|
83
93
|
h2. Philosophy
|
84
94
|
|
85
|
-
HTML5 is the rising up
|
86
|
-
|
87
|
-
A moment of honesty. Modular systems are awesome but systems are not created equal. Textigniter has been created with this in mind. Textigniter uses "Textile":http://redcloth.org/ ("Markdown":http://kramdown.rubyforge.org/ is optional...), "Liquid":http://liquidmarkup.org/, "LESS CSS":http://lesscss.org/, and "Coffee Script":http://jashkenas.github.com/coffee-script/ for parsing different files and outputting static content.
|
88
|
-
|
89
|
-
Static content mixed with the power of Javascript and HTML5 is more than enough for a majority of users who want easily maintainable websites.
|
95
|
+
HTML5 is the rising up-comer and with it come many advantages that in my opinion make databases overused for a majority of websites (Bloggers/Brochure Sites). Most dynamic content doesn't need pulled from a database anymore because it can processed with Javascript and XML, i.e Twitter feeds. Static Site Generators can really excel in this area. Static content mixed with the power of Javascript and HTML5 is more than enough for a majority of users who want easily maintainable websites.
|
@@ -1,11 +1,8 @@
|
|
1
1
|
# site configuration
|
2
2
|
site_name: "Textigniter"
|
3
3
|
site_description: "A textigniter powered website"
|
4
|
-
site_url: "http://localhost/textigniter
|
4
|
+
site_url: "http://localhost/textigniter"
|
5
5
|
copyright: "2011 © Textigniter"
|
6
6
|
|
7
7
|
# textigniter configuration
|
8
|
-
blog_type: "article"
|
9
|
-
output_environment: "output"
|
10
|
-
plugins_environment: "plugins"
|
11
8
|
text_parser: "textile"
|
@@ -4,6 +4,23 @@
|
|
4
4
|
<title>{{ title }}</title>
|
5
5
|
</head>
|
6
6
|
<body>
|
7
|
-
|
7
|
+
|
8
|
+
<div id="wrapper">
|
9
|
+
|
10
|
+
{% include 'partials/header' %}
|
11
|
+
|
12
|
+
<div id="content">
|
13
|
+
|
14
|
+
<p>{{ breadcrumbs }}</p>
|
15
|
+
|
16
|
+
{{ content }}
|
17
|
+
|
18
|
+
|
19
|
+
</div><!--/content-->
|
20
|
+
|
21
|
+
{% include 'partials/footer' %}
|
22
|
+
|
23
|
+
</div>
|
24
|
+
|
8
25
|
</body>
|
9
26
|
</html>
|
File without changes
|
data/lib/textigniter.rb
CHANGED
@@ -8,33 +8,56 @@
|
|
8
8
|
# would recommend you use something more established like Jekyll or Nanoc for
|
9
9
|
# productions sites.
|
10
10
|
#
|
11
|
-
# Last update: November
|
11
|
+
# Last update: November 23, 2011
|
12
12
|
class Textigniter
|
13
13
|
|
14
14
|
# Contains a switch for arguments passed via the command line
|
15
15
|
def initialize
|
16
|
+
|
17
|
+
# Globals being created
|
18
|
+
#
|
19
|
+
# $beginning Time script began to run
|
20
|
+
# $gem_path Lib path for textigniter.rb
|
21
|
+
# $base_path Base textigniter enviornment
|
22
|
+
# $config config.yml to YAML hash
|
23
|
+
# $twd .textigniter working directory
|
24
|
+
# $owd output workding directory
|
25
|
+
# $spec gemspec file to YAML hash
|
26
|
+
|
16
27
|
# get start time
|
17
28
|
$beginning = Time.now
|
18
29
|
|
19
30
|
# Get command line arguments arguments
|
20
31
|
cmd = ARGV[0]
|
21
32
|
args = ARGV[1]
|
22
|
-
|
33
|
+
|
34
|
+
# get the gem path
|
35
|
+
$gem_path = File.dirname(__FILE__)
|
36
|
+
|
37
|
+
# get the base path
|
38
|
+
if cmd == "init" || cmd == "build" || cmd == "scrub" || cmd == "view"
|
39
|
+
$base_path = "#{Dir::pwd}/#{args}"
|
40
|
+
else
|
41
|
+
$base_path = Dir::pwd
|
42
|
+
end
|
43
|
+
|
44
|
+
# Store textigniter enviornment path in a global
|
45
|
+
$twd = "#{$base_path}.textigniter"
|
46
|
+
|
23
47
|
# Store configuration information into a global
|
24
|
-
if File.exists?(
|
48
|
+
if File.exists?("#{$twd}/config.yml")
|
25
49
|
# Use the existing site configuration
|
26
|
-
$config = YAML::load(File.open(
|
50
|
+
$config = YAML::load(File.open("#{$twd}/config.yml"))
|
27
51
|
else
|
28
52
|
# Pull base site configuration from textigniter gem
|
29
|
-
$config = YAML::load(File.
|
53
|
+
$config = YAML::load(File.open("#{$gem_path}/skeleton/.textigniter/config.yml"))
|
30
54
|
end
|
31
|
-
|
32
|
-
$twd = Dir::pwd + "/.textigniter"
|
55
|
+
|
33
56
|
# Store output environment path in a global
|
34
|
-
$owd =
|
57
|
+
$owd = "#{$base_path}#{$config['output_environment']}"
|
35
58
|
|
36
59
|
# get gemspec info
|
37
|
-
specfile =
|
60
|
+
specfile = $gem_path.gsub('lib', 'textigniter.gemspec')
|
38
61
|
$spec = Gem::Specification::load(specfile)
|
39
62
|
|
40
63
|
# Let's put up some cool ascii art promoting textigniter
|
@@ -57,6 +80,8 @@ class Textigniter
|
|
57
80
|
Textigniter.init(args)
|
58
81
|
when "scrub"
|
59
82
|
Textigniter.scrub(args)
|
83
|
+
when "view"
|
84
|
+
Textigniter.view(args)
|
60
85
|
else
|
61
86
|
Textigniter.help(args)
|
62
87
|
end
|
@@ -82,13 +107,34 @@ class Textigniter
|
|
82
107
|
def self.init(args=nil)
|
83
108
|
# create a new initialization instance
|
84
109
|
@init = Init.new(args)
|
110
|
+
# check for environment
|
111
|
+
env_exists = @init.env_check
|
112
|
+
# unless false run the skeleton
|
113
|
+
unless env_exists == false
|
114
|
+
@init.skeleton
|
115
|
+
else
|
116
|
+
# Error message, the directory already exists.
|
117
|
+
STDOUT.puts "[FAIL]".red_on_black + " #{$base_path} already exists. \r\n".yellow_on_black
|
118
|
+
end
|
85
119
|
end
|
86
120
|
|
87
121
|
# Initialize a new scrub object
|
88
|
-
def self.scrub(args)
|
89
|
-
#
|
90
|
-
|
91
|
-
|
122
|
+
def self.scrub(args=nil)
|
123
|
+
# Check for an existing environment
|
124
|
+
unless File.directory?($twd)
|
125
|
+
# Output a failure message do to lack of environment and exit
|
126
|
+
STDOUT.puts "Textigniter does not exist in this directory ".yellow_on_black + "[FAIL]".red_on_black
|
127
|
+
STDOUT.puts "\r\nHint: ".white_on_black + "textigniter init ".bold.white_on_black + " creates a new environment\r\n".white_on_black
|
128
|
+
else
|
129
|
+
# create a new scrub instance
|
130
|
+
@scrub = Scrub.new(args)
|
131
|
+
@scrub.scrub
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
# Start a server
|
136
|
+
def self.view(args)
|
137
|
+
|
92
138
|
end
|
93
139
|
|
94
140
|
end
|
data/lib/textigniter/build.rb
CHANGED
@@ -9,7 +9,7 @@ class Textigniter::Build
|
|
9
9
|
# Output a start message
|
10
10
|
STDOUT.puts "Building static content".yellow_on_black
|
11
11
|
# Check for an existing environment
|
12
|
-
unless File.directory?(
|
12
|
+
unless File.directory?($twd)
|
13
13
|
# Output a failure message do to lack of environment and exit
|
14
14
|
STDOUT.puts "Textigniter does not exist in this directory ".yellow_on_black + "[FAIL]".red_on_black
|
15
15
|
STDOUT.puts "\r\nHint: ".white_on_black + "textigniter init ".bold.white_on_black + " creates a new environment\r\n".white_on_black
|
@@ -37,13 +37,13 @@ class Textigniter::Build
|
|
37
37
|
case format
|
38
38
|
when 'html'
|
39
39
|
# Create the html list
|
40
|
-
build_list = Dir.glob($twd
|
40
|
+
build_list = Dir.glob("#{$twd}/content/**/*")
|
41
41
|
when 'styles'
|
42
42
|
# Create the style list
|
43
|
-
build_list = Dir.glob($twd
|
43
|
+
build_list = Dir.glob("#{$twd}/styles/**/*")
|
44
44
|
when 'scripts'
|
45
45
|
# Create the script list
|
46
|
-
build_list = Dir.glob($twd
|
46
|
+
build_list = Dir.glob("#{$twd}/scripts/**/*")
|
47
47
|
end
|
48
48
|
# create an array to store the new build list in
|
49
49
|
cleaned_build_list = Array.new
|
@@ -9,7 +9,7 @@ class Textigniter::Build::TemplateParser
|
|
9
9
|
# iterate through the item list and parse templates
|
10
10
|
item_list['items'].each do |item|
|
11
11
|
# specifiy the template
|
12
|
-
file = File.open(
|
12
|
+
file = File.open("#{$twd}/layouts/" + item['layout'] + '.liquid', 'rb')
|
13
13
|
# load the template
|
14
14
|
template_from_file = file.read
|
15
15
|
# render the output
|
@@ -32,6 +32,7 @@ class Textigniter::Build::TemplateParser
|
|
32
32
|
# require liquid lib
|
33
33
|
require 'liquid'
|
34
34
|
#parse the template
|
35
|
+
Liquid::Template.file_system = Liquid::LocalFileSystem.new("#{$twd}/layouts")
|
35
36
|
template = Liquid::Template.parse(layout_file)
|
36
37
|
# render the template
|
37
38
|
output = template.render(item)
|
@@ -50,16 +50,19 @@ class Textigniter::Build::TextParser
|
|
50
50
|
# get the template if exists else default
|
51
51
|
@h['layout'] = 'default' unless @h.has_key? 'layout'
|
52
52
|
|
53
|
+
# bread crumbs
|
54
|
+
@h['breadcrumbs'] = @h['slug']
|
55
|
+
|
53
56
|
# gather the rest of the components into key value and convert
|
54
57
|
@h = components_parser(components, @h)
|
55
|
-
|
58
|
+
|
56
59
|
# run through plugin parser
|
57
60
|
@h = plugin_parser.parse(@h)
|
58
61
|
|
59
62
|
# set slug to directory
|
60
63
|
@h['directory'] = @h['slug']
|
61
64
|
|
62
|
-
#
|
65
|
+
# set a handle to be used in templates
|
63
66
|
@h["handle"] = @h['slug'].sub($owd, '')[1..-1]
|
64
67
|
|
65
68
|
# check if blog posts according to the type key
|
data/lib/textigniter/init.rb
CHANGED
@@ -7,33 +7,35 @@ class Textigniter::Init
|
|
7
7
|
def initialize(args)
|
8
8
|
# Sends message to cli
|
9
9
|
STDOUT.puts "Initializing a new textigniter environment".yellow_on_black
|
10
|
-
# get the skeleton
|
11
|
-
skeleton(args)
|
12
10
|
end
|
13
11
|
|
14
|
-
#
|
15
|
-
def
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
12
|
+
# check for existing environment
|
13
|
+
def env_check
|
14
|
+
unless File.directory? $base_path
|
15
|
+
# Make the directory
|
16
|
+
FileUtils.mkdir($base_path)
|
17
|
+
# Change into the dir
|
18
|
+
FileUtils.cd($base_path)
|
19
|
+
# return true
|
20
|
+
return true
|
21
|
+
else
|
22
|
+
unless File.directory? $twd
|
23
|
+
return true
|
24
|
+
else
|
25
|
+
return false
|
27
26
|
end
|
28
|
-
end
|
27
|
+
end
|
28
|
+
end
|
29
29
|
|
30
|
+
# Duplicate the skeleton into the current working directory/passed directory
|
31
|
+
def skeleton
|
30
32
|
# Get the current working directory path
|
31
|
-
cwd = Dir::pwd
|
33
|
+
cwd = "#{Dir::pwd}/"
|
32
34
|
# Get the skeleton directory path
|
33
|
-
swd =
|
35
|
+
swd = "#{$gem_path}/skeleton/"
|
34
36
|
|
35
37
|
# Run a check for existing environment
|
36
|
-
if File.directory?(
|
38
|
+
if File.directory?($twd)
|
37
39
|
# Output error and resolution message
|
38
40
|
STDOUT.puts "[FAIL]".red_on_black + " Existing textigniter environment".yellow_on_black
|
39
41
|
STDOUT.puts "\r\nHint: If you need to start over, use ".white_on_black + "textigniter scrub".bold.white_on_black
|
data/lib/textigniter/plugins.rb
CHANGED
@@ -12,7 +12,9 @@ class Textigniter::Plugins
|
|
12
12
|
h.each do |key, value|
|
13
13
|
# check for plugin methods
|
14
14
|
if splugin.has_key?(key)
|
15
|
-
|
15
|
+
# pass the entire hash to parser
|
16
|
+
# may have to rethink this if speed problems arise
|
17
|
+
@h["#{key}"] = splugin["#{key}"].parse(h)
|
16
18
|
else
|
17
19
|
@h["#{key}"] = value
|
18
20
|
end
|
@@ -24,9 +26,9 @@ class Textigniter::Plugins
|
|
24
26
|
# gather a list of textigniter and custom plugins
|
25
27
|
def plugins
|
26
28
|
# textigniter plugins
|
27
|
-
textigniter_plugins = Dir.glob("#{
|
29
|
+
textigniter_plugins = Dir.glob("#{$gem_path}/textigniter/plugins/**/*.rb")
|
28
30
|
# custom plugins
|
29
|
-
custom_plugins = Dir.glob("#{
|
31
|
+
custom_plugins = Dir.glob("#{$twd}/plugins/**/*.rb")
|
30
32
|
# join plugins
|
31
33
|
@plugins = textigniter_plugins | custom_plugins
|
32
34
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class Textigniter::Plugins::Breadcrumbs
|
2
|
+
|
3
|
+
def parse(h)
|
4
|
+
value = "#{h['breadcrumbs']}"
|
5
|
+
value.gsub!("#{$twd}/content/", '')
|
6
|
+
|
7
|
+
unless value == "index"
|
8
|
+
# begin breadcrumbs
|
9
|
+
breadcrumbs = "<a href=\"#{$config['site_url']}\" class=\"home\">Home</a>"
|
10
|
+
# split the string by /
|
11
|
+
values = value.split(/\//)
|
12
|
+
# current page
|
13
|
+
current = values.last
|
14
|
+
# remove current from values
|
15
|
+
values.pop
|
16
|
+
|
17
|
+
values.each do |v|
|
18
|
+
breadcrumbs << " | <a href=\"#{$config['site_url']}/#{v}\">#{v}</a>"
|
19
|
+
end
|
20
|
+
|
21
|
+
breadcrumbs << " | <span class=\"current\">#{h['title']}</span>"
|
22
|
+
|
23
|
+
else
|
24
|
+
breadcrumbs = "Home"
|
25
|
+
end
|
26
|
+
|
27
|
+
return breadcrumbs
|
28
|
+
|
29
|
+
end
|
30
|
+
|
31
|
+
end
|
data/lib/textigniter/scrub.rb
CHANGED
@@ -6,25 +6,16 @@ class Textigniter::Scrub
|
|
6
6
|
def initialize(args)
|
7
7
|
# Output start message
|
8
8
|
STDOUT.puts "Scrubbing textigniter environment".yellow_on_black
|
9
|
-
# Check for an existing environment
|
10
|
-
unless File.directory?(".textigniter")
|
11
|
-
# Output a failure message do to lack of environment and exit
|
12
|
-
STDOUT.puts "Textigniter does not exist in this directory ".yellow_on_black + "[FAIL]".red_on_black
|
13
|
-
STDOUT.puts "\r\nHint: ".white_on_black + "textigniter init ".bold.white_on_black + " creates a new environment\r\n".white_on_black
|
14
|
-
exit
|
15
|
-
end
|
16
9
|
end
|
17
10
|
|
18
11
|
# Scrub the directory
|
19
12
|
def scrub
|
20
|
-
# Get the current working directory
|
21
|
-
cwd = Dir::pwd + '/'
|
22
13
|
# Scrub the directory, no turning back
|
23
|
-
scrub_directory(
|
24
|
-
scrub_directory(
|
25
|
-
scrub_directory(
|
14
|
+
scrub_directory("#{$twd}")
|
15
|
+
scrub_directory("#{$base_path}/plugins")
|
16
|
+
scrub_directory("#{$owd}")
|
26
17
|
# Files to delete as well
|
27
|
-
files = [
|
18
|
+
files = [ "#{$base_path}/README.textile", "#{$base_path}/config.yml" ]
|
28
19
|
# Remove files specified
|
29
20
|
FileUtils.rm files, :force => true
|
30
21
|
# Output success message
|
data/textigniter.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.rubygems_version = '1.9.2'
|
3
3
|
|
4
4
|
s.name = 'textigniter'
|
5
|
-
s.version = '0.0.
|
5
|
+
s.version = '0.0.35'
|
6
6
|
s.executables << 'textigniter'
|
7
7
|
s.date = '2011-11-19'
|
8
8
|
|
@@ -30,20 +30,15 @@ Gem::Specification.new do |s|
|
|
30
30
|
README.textile
|
31
31
|
textigniter.gemspec
|
32
32
|
bin/textigniter
|
33
|
-
lib/skeleton/
|
34
|
-
lib/skeleton/config.yml
|
33
|
+
lib/skeleton/.textigniter/config.yml
|
35
34
|
lib/skeleton/.textigniter/content/index.textile
|
36
|
-
lib/skeleton/.textigniter/content/
|
37
|
-
lib/skeleton/.textigniter/content/userguide/textigniter-0.0.3.textile
|
38
|
-
lib/skeleton/.textigniter/content/userguide/textigniter-0.0.31.textile
|
39
|
-
lib/skeleton/.textigniter/content/userguide/textigniter-0.0.32.textile
|
40
|
-
lib/skeleton/.textigniter/content/userguide/textigniter-0.0.33.textile
|
35
|
+
lib/skeleton/.textigniter/content/about.textile
|
41
36
|
lib/skeleton/.textigniter/scripts/functions.coffeescript
|
42
37
|
lib/skeleton/.textigniter/styles/style.less
|
43
|
-
lib/skeleton/.textigniter/styles/userguide.less
|
44
38
|
lib/skeleton/.textigniter/layouts/default.liquid
|
45
|
-
lib/skeleton/.textigniter/layouts/
|
46
|
-
lib/skeleton/
|
39
|
+
lib/skeleton/.textigniter/layouts/partials/_header.liquid
|
40
|
+
lib/skeleton/.textigniter/layouts/partials/_footer.liquid
|
41
|
+
lib/skeleton/.textigniter/plugins/README.textile
|
47
42
|
lib/textigniter.rb
|
48
43
|
lib/textigniter/build.rb
|
49
44
|
lib/textigniter/help.rb
|
@@ -56,6 +51,7 @@ Gem::Specification.new do |s|
|
|
56
51
|
lib/textigniter/build/style_parser.rb
|
57
52
|
lib/textigniter/build/template_parser.rb
|
58
53
|
lib/textigniter/build/text_parser.rb
|
54
|
+
lib/textigniter/plugins/breadcrumbs.rb
|
59
55
|
lib/textigniter/plugins/created_at.rb
|
60
56
|
lib/textigniter/plugins/slug.rb
|
61
57
|
]
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: textigniter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.35
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-11-19 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: RedCloth
|
16
|
-
requirement: &
|
16
|
+
requirement: &70149730914420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 4.2.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70149730914420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: kramdown
|
27
|
-
requirement: &
|
27
|
+
requirement: &70149730913540 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.13.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70149730913540
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: liquid
|
38
|
-
requirement: &
|
38
|
+
requirement: &70149730912820 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.3.0
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70149730912820
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: less
|
49
|
-
requirement: &
|
49
|
+
requirement: &70149730912340 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 2.0.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70149730912340
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: coffee-script
|
60
|
-
requirement: &
|
60
|
+
requirement: &70149730911820 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.2.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70149730911820
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: colored
|
71
|
-
requirement: &
|
71
|
+
requirement: &70149730911240 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '1.0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70149730911240
|
80
80
|
description: ! " Textigniter is a lightweight static site generator based on textile
|
81
81
|
(markdown optional), liquid, less, and coffeescript. You can have as many blogs
|
82
82
|
as you want and use your own custom meta tags in templates without having to write
|
@@ -94,20 +94,15 @@ files:
|
|
94
94
|
- README.textile
|
95
95
|
- textigniter.gemspec
|
96
96
|
- bin/textigniter
|
97
|
-
- lib/skeleton/
|
98
|
-
- lib/skeleton/config.yml
|
97
|
+
- lib/skeleton/.textigniter/config.yml
|
99
98
|
- lib/skeleton/.textigniter/content/index.textile
|
100
|
-
- lib/skeleton/.textigniter/content/
|
101
|
-
- lib/skeleton/.textigniter/content/userguide/textigniter-0.0.3.textile
|
102
|
-
- lib/skeleton/.textigniter/content/userguide/textigniter-0.0.31.textile
|
103
|
-
- lib/skeleton/.textigniter/content/userguide/textigniter-0.0.32.textile
|
104
|
-
- lib/skeleton/.textigniter/content/userguide/textigniter-0.0.33.textile
|
99
|
+
- lib/skeleton/.textigniter/content/about.textile
|
105
100
|
- lib/skeleton/.textigniter/scripts/functions.coffeescript
|
106
101
|
- lib/skeleton/.textigniter/styles/style.less
|
107
|
-
- lib/skeleton/.textigniter/styles/userguide.less
|
108
102
|
- lib/skeleton/.textigniter/layouts/default.liquid
|
109
|
-
- lib/skeleton/.textigniter/layouts/
|
110
|
-
- lib/skeleton/
|
103
|
+
- lib/skeleton/.textigniter/layouts/partials/_header.liquid
|
104
|
+
- lib/skeleton/.textigniter/layouts/partials/_footer.liquid
|
105
|
+
- lib/skeleton/.textigniter/plugins/README.textile
|
111
106
|
- lib/textigniter.rb
|
112
107
|
- lib/textigniter/build.rb
|
113
108
|
- lib/textigniter/help.rb
|
@@ -120,6 +115,7 @@ files:
|
|
120
115
|
- lib/textigniter/build/style_parser.rb
|
121
116
|
- lib/textigniter/build/template_parser.rb
|
122
117
|
- lib/textigniter/build/text_parser.rb
|
118
|
+
- lib/textigniter/plugins/breadcrumbs.rb
|
123
119
|
- lib/textigniter/plugins/created_at.rb
|
124
120
|
- lib/textigniter/plugins/slug.rb
|
125
121
|
- LICENSE
|
@@ -1,4 +0,0 @@
|
|
1
|
-
title: User Guide
|
2
|
-
layout: userguide/userguide
|
3
|
-
-- content
|
4
|
-
Textigniter is a command line tool used to generate static websites. Textigniter uses the power of "Textile":http://redcloth.org/ ("Markdown":http://kramdown.rubyforge.org/ is optional...), "Liquid":http://liquidmarkup.org/, "LESS CSS":http://lesscss.org/, and "Coffee Script":http://jashkenas.github.com/coffee-script/ for parsing different files and outputting "HTML5":http://www.html5rocks.com/en/ powered websites (Obviously you'll need to know HTML5, textigniter just helps with a development philosophy).
|
@@ -1,50 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Textigniter - {{ title }}</title>
|
5
|
-
<link rel="stylesheet" media="screen" href="{{ site_url }}/styles/userguide.css">
|
6
|
-
</head>
|
7
|
-
<body>
|
8
|
-
|
9
|
-
<div id="wrapper">
|
10
|
-
|
11
|
-
<div id="header">
|
12
|
-
|
13
|
-
<h1><a href="{{ site_url }}/userguide">Textigniter User Guide</a></h1>
|
14
|
-
|
15
|
-
</div><!--/header-->
|
16
|
-
|
17
|
-
<div id="container">
|
18
|
-
|
19
|
-
<div id="content">
|
20
|
-
|
21
|
-
<h3>{{ title }}</h3>
|
22
|
-
|
23
|
-
{{ content }}
|
24
|
-
|
25
|
-
</div><!--/content-->
|
26
|
-
|
27
|
-
<div id="sidebar">
|
28
|
-
|
29
|
-
<h3>Change Log</h3>
|
30
|
-
|
31
|
-
{% for item in userguide %}
|
32
|
-
|
33
|
-
<p><a href="{{ site_url }}/{{ item.handle }}">{{ item.title }}</a></p>
|
34
|
-
|
35
|
-
{% endfor %}
|
36
|
-
|
37
|
-
</div><!--/sidebar-->
|
38
|
-
|
39
|
-
</div><!--/container-->
|
40
|
-
|
41
|
-
<div id="footer">
|
42
|
-
|
43
|
-
<p>Textigniter © 2011</p>
|
44
|
-
|
45
|
-
</div><!--/footer-->
|
46
|
-
|
47
|
-
</div><!--/wrapper-->
|
48
|
-
|
49
|
-
</body>
|
50
|
-
</html>
|
@@ -1,73 +0,0 @@
|
|
1
|
-
/** Typography and Colors
|
2
|
-
*/
|
3
|
-
body {
|
4
|
-
background: #fff;
|
5
|
-
font-family: Arial, sans-serif;
|
6
|
-
font-size: 14px;
|
7
|
-
line-height: 20px;
|
8
|
-
color: #777;
|
9
|
-
margin: 0 20px;
|
10
|
-
}
|
11
|
-
h1,h2,h3 {
|
12
|
-
font-family: "Verdana", sans-serif;
|
13
|
-
font-weight: 600;
|
14
|
-
}
|
15
|
-
a {
|
16
|
-
color: #dc974d;
|
17
|
-
text-decoration: none;
|
18
|
-
}
|
19
|
-
|
20
|
-
/** Wrapper
|
21
|
-
*/
|
22
|
-
#wrapper {
|
23
|
-
|
24
|
-
/** Header
|
25
|
-
*/
|
26
|
-
#header {
|
27
|
-
|
28
|
-
padding: 20px;
|
29
|
-
width: 760px;
|
30
|
-
|
31
|
-
h1 {
|
32
|
-
font-size: 32px;
|
33
|
-
}
|
34
|
-
h1 a {
|
35
|
-
color: #777
|
36
|
-
}
|
37
|
-
|
38
|
-
}
|
39
|
-
|
40
|
-
/** Container
|
41
|
-
*/
|
42
|
-
#container {
|
43
|
-
|
44
|
-
width: 760px;
|
45
|
-
padding: 20px;
|
46
|
-
background: #efefef;
|
47
|
-
border: 1px solid #ddd;
|
48
|
-
overflow: hidden;
|
49
|
-
|
50
|
-
/** Content
|
51
|
-
*/
|
52
|
-
#content {
|
53
|
-
float: left;
|
54
|
-
width: 500px;
|
55
|
-
margin-right: 40px;
|
56
|
-
}
|
57
|
-
|
58
|
-
/** Sidebar
|
59
|
-
*/
|
60
|
-
#sidebar {
|
61
|
-
float: right;
|
62
|
-
width: 220px;
|
63
|
-
}
|
64
|
-
|
65
|
-
}
|
66
|
-
|
67
|
-
/** Footer
|
68
|
-
*/
|
69
|
-
#footer {
|
70
|
-
width: 760px;
|
71
|
-
padding: 20px;
|
72
|
-
}
|
73
|
-
}
|
data/lib/skeleton/README.textile
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
h1. Textigniter
|
2
|
-
|
3
|
-
Welcome to your Textigniter environment. This is pretty simple.
|
4
|
-
|
5
|
-
There are three folders. [.textigniter] is where you'll store the source for your site. [output] is where textigniter builds the static output of yoursite. [plugins] is for your custom meta plugins.
|