yuzu 0.2.1.pre
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.
- data/.document +5 -0
- data/.yardopts +7 -0
- data/ChangeLog.md +8 -0
- data/Gemfile +26 -0
- data/Gemfile.lock +30 -0
- data/LICENSE.txt +20 -0
- data/README.md +52 -0
- data/Rakefile +62 -0
- data/bin/yuzu +17 -0
- data/docs/About.md +19 -0
- data/docs/GettingStarted.md +48 -0
- data/docs/Reference.md +97 -0
- data/lib/helpers/object.rb +19 -0
- data/lib/helpers/path.rb +296 -0
- data/lib/helpers/string.rb +35 -0
- data/lib/helpers/system_checks.rb +10 -0
- data/lib/helpers/url.rb +64 -0
- data/lib/html/base.rb +187 -0
- data/lib/uploader/base.rb +59 -0
- data/lib/uploader/config.rb +19 -0
- data/lib/uploader/filesystem_service.rb +72 -0
- data/lib/uploader/ftp_service.rb +90 -0
- data/lib/uploader/s3_service.rb +135 -0
- data/lib/uploader/service.rb +57 -0
- data/lib/uploader/suppressor.rb +25 -0
- data/lib/yuzu.rb +6 -0
- data/lib/yuzu/argparse.rb +60 -0
- data/lib/yuzu/command.rb +104 -0
- data/lib/yuzu/commands/base.rb +150 -0
- data/lib/yuzu/commands/create.rb +68 -0
- data/lib/yuzu/commands/generate.rb +95 -0
- data/lib/yuzu/commands/help.rb +20 -0
- data/lib/yuzu/commands/preview.rb +58 -0
- data/lib/yuzu/commands/publish.rb +43 -0
- data/lib/yuzu/commands/stage.rb +62 -0
- data/lib/yuzu/commands/watch.rb +70 -0
- data/lib/yuzu/content/blog_post.rb +45 -0
- data/lib/yuzu/content/sample_project.rb +130 -0
- data/lib/yuzu/core/config.rb +154 -0
- data/lib/yuzu/core/layout.rb +85 -0
- data/lib/yuzu/core/paginated_file.rb +69 -0
- data/lib/yuzu/core/registrar.rb +32 -0
- data/lib/yuzu/core/siteroot.rb +57 -0
- data/lib/yuzu/core/template.rb +158 -0
- data/lib/yuzu/core/updater.rb +123 -0
- data/lib/yuzu/core/visitor.rb +44 -0
- data/lib/yuzu/core/website_base.rb +150 -0
- data/lib/yuzu/core/website_file.rb +270 -0
- data/lib/yuzu/core/website_folder.rb +176 -0
- data/lib/yuzu/filters/base.rb +86 -0
- data/lib/yuzu/filters/catalog.rb +248 -0
- data/lib/yuzu/filters/categories.rb +58 -0
- data/lib/yuzu/filters/currentpath.rb +35 -0
- data/lib/yuzu/filters/description.rb +16 -0
- data/lib/yuzu/filters/extension.rb +16 -0
- data/lib/yuzu/filters/images.rb +32 -0
- data/lib/yuzu/filters/linkroot.rb +35 -0
- data/lib/yuzu/filters/post_date.rb +45 -0
- data/lib/yuzu/filters/post_title.rb +66 -0
- data/lib/yuzu/filters/post_title_removed.rb +28 -0
- data/lib/yuzu/filters/sidebar.rb +26 -0
- data/lib/yuzu/filters/template.rb +16 -0
- data/lib/yuzu/generators/base.rb +44 -0
- data/lib/yuzu/generators/category_folders.rb +91 -0
- data/lib/yuzu/generators/index.rb +108 -0
- data/lib/yuzu/generators/paginate.rb +136 -0
- data/lib/yuzu/postprocessors/all_categories.rb +48 -0
- data/lib/yuzu/postprocessors/base.rb +34 -0
- data/lib/yuzu/postprocessors/contents_without_first_paragraph.rb +20 -0
- data/lib/yuzu/postprocessors/excerpt.rb +23 -0
- data/lib/yuzu/postprocessors/first_paragraph.rb +16 -0
- data/lib/yuzu/postprocessors/pagination.rb +35 -0
- data/lib/yuzu/postprocessors/recent_posts.rb +27 -0
- data/lib/yuzu/postprocessors/thumbnails.rb +48 -0
- data/lib/yuzu/preprocessors/base.rb +71 -0
- data/lib/yuzu/preprocessors/insert_contents.rb +57 -0
- data/lib/yuzu/renderers/base.rb +23 -0
- data/lib/yuzu/renderers/breadcrumb.rb +163 -0
- data/lib/yuzu/renderers/gallery.rb +24 -0
- data/lib/yuzu/renderers/title.rb +21 -0
- data/lib/yuzu/translators/base.rb +57 -0
- data/lib/yuzu/translators/markdown.rb +21 -0
- data/lib/yuzu/translators/plaintext.rb +17 -0
- data/lib/yuzu/version.rb +12 -0
- data/resources/config/compass.rb +6 -0
- data/resources/config/yuzu.yml +166 -0
- data/resources/git/post-commit +42 -0
- data/resources/sample_content/introduction/_snippets/about_insert_contents.md +3 -0
- data/resources/sample_content/introduction/about.md +6 -0
- data/resources/sample_content/introduction/advanced-posts.md +18 -0
- data/resources/sample_content/introduction/blog/blog-folder-is-special.md +8 -0
- data/resources/sample_content/introduction/getting-started.md +14 -0
- data/resources/sample_content/introduction/index.md +6 -0
- data/resources/sample_content/introduction/sample-post.md +13 -0
- data/resources/sample_projects.yml +7 -0
- data/resources/themes/minimal/_sass/print.sass +0 -0
- data/resources/themes/minimal/_sass/screen.sass +81 -0
- data/resources/themes/minimal/_templates/_block.haml +4 -0
- data/resources/themes/minimal/_templates/_blog.haml +3 -0
- data/resources/themes/minimal/_templates/_footer.haml +2 -0
- data/resources/themes/minimal/_templates/_gallery.haml +25 -0
- data/resources/themes/minimal/_templates/_head.haml +12 -0
- data/resources/themes/minimal/_templates/_header.haml +1 -0
- data/resources/themes/minimal/_templates/_menu.haml +6 -0
- data/resources/themes/minimal/_templates/blog.haml +21 -0
- data/resources/themes/minimal/_templates/generic.haml +26 -0
- data/resources/themes/minimal/_templates/home.haml +15 -0
- data/resources/themes/minimal/_templates/index.haml +21 -0
- data/resources/themes/minimal/css/print.css +0 -0
- data/resources/themes/minimal/css/screen.css +133 -0
- data/resources/themes/minimal/img/favicon.png +0 -0
- data/resources/yard/default/fulldoc/html/css/common.css +16 -0
- data/test/helper.rb +18 -0
- data/test/test_yuzu.rb +8 -0
- data/yuzu.gemspec +182 -0
- metadata +302 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
require 'preprocessors/base'
|
|
2
|
+
require 'helpers/path'
|
|
3
|
+
|
|
4
|
+
module Yuzu::PreProcessors
|
|
5
|
+
class InsertContentsPreProcessor < PreProcessor
|
|
6
|
+
include Helpers
|
|
7
|
+
|
|
8
|
+
def initialize
|
|
9
|
+
@name = :insert_contents
|
|
10
|
+
@directive = "INSERTCONTENTS"
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def default(website_file=nil)
|
|
14
|
+
nil
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def value(website_file)
|
|
18
|
+
match_path = match(website_file.raw_contents)
|
|
19
|
+
raw_path = match_path.nil? ? default(website_file) : match_path
|
|
20
|
+
Path.new(match_path)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def replacement(website_file, new_contents="")
|
|
24
|
+
# Get the next match.
|
|
25
|
+
match_path = match(new_contents)
|
|
26
|
+
raw_path = match_path.nil? ? default(website_file) : match_path
|
|
27
|
+
file_path = Path.new(raw_path)
|
|
28
|
+
|
|
29
|
+
siteroot = website_file.root
|
|
30
|
+
file_to_insert = siteroot.find_file_by_path(file_path)
|
|
31
|
+
|
|
32
|
+
if not file_to_insert.nil?
|
|
33
|
+
"\n" + file_to_insert.prefiltered_contents
|
|
34
|
+
else
|
|
35
|
+
insert_file(file_path)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# A raw file insert. Load the file from disk and insert the contents directly.
|
|
40
|
+
#
|
|
41
|
+
# @param [Path] path refers to the file on disk.
|
|
42
|
+
# @return [String] The contents of the file.
|
|
43
|
+
def insert_file(path)
|
|
44
|
+
if path.exists?
|
|
45
|
+
f = File.open(path.absolute, "r")
|
|
46
|
+
contents = f.read
|
|
47
|
+
f.close
|
|
48
|
+
contents
|
|
49
|
+
else
|
|
50
|
+
""
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
PreProcessor.register(:insert_contents => InsertContentsPreProcessor)
|
|
56
|
+
end
|
|
57
|
+
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
|
|
2
|
+
module Yuzu::Renderers
|
|
3
|
+
include Yuzu::Registrar
|
|
4
|
+
|
|
5
|
+
class Renderer < Register
|
|
6
|
+
@@renderers = {}
|
|
7
|
+
def self.registry
|
|
8
|
+
:renderers
|
|
9
|
+
end
|
|
10
|
+
def self.renderers
|
|
11
|
+
@@renderers
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def initialize
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def render(website_file)
|
|
18
|
+
""
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
end
|
|
23
|
+
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
require 'renderers/base'
|
|
2
|
+
require 'helpers/path'
|
|
3
|
+
require 'html/base'
|
|
4
|
+
|
|
5
|
+
module Yuzu::Renderers
|
|
6
|
+
class BreadcrumbRenderer < Renderer
|
|
7
|
+
def render(website_file)
|
|
8
|
+
Breadcrumb.new(website_file).to_s
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
Renderer.register(:breadcrumb => BreadcrumbRenderer)
|
|
12
|
+
|
|
13
|
+
class Breadcrumb
|
|
14
|
+
def initialize(website_obj, level=0)
|
|
15
|
+
@website_obj = website_obj
|
|
16
|
+
@level = level
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def to_s
|
|
20
|
+
@website_obj.nil? ? "" : crumbs_to_s
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def crumbs_to_s
|
|
24
|
+
ordered_crumbs.collect {|crumb| crumb.to_s}.join(separator)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def separator
|
|
28
|
+
" #{config.breadcrumb_separator} "
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def reverse?
|
|
32
|
+
true # TODO make configurable
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def ordered_crumbs
|
|
36
|
+
crumbs
|
|
37
|
+
#reverse? ? crumbs.reverse : crumbs
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def crumbs
|
|
41
|
+
tr = []
|
|
42
|
+
level_correct = 0
|
|
43
|
+
ordered_structure.each_index do |i|
|
|
44
|
+
crumb_tag = ordered_structure[i]
|
|
45
|
+
crumb = crumb_for(crumb_tag, @level + i + level_correct)
|
|
46
|
+
if crumb.nil?
|
|
47
|
+
level_correct -= 1
|
|
48
|
+
end
|
|
49
|
+
tr.push(crumb)
|
|
50
|
+
end
|
|
51
|
+
tr.reject {|el| el.nil?}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def crumb_for(crumb_tag, level)
|
|
55
|
+
case crumb_tag
|
|
56
|
+
when :home
|
|
57
|
+
Crumb.new(@website_obj.root, level)
|
|
58
|
+
|
|
59
|
+
when :blog
|
|
60
|
+
Crumb.new(@website_obj.blog_folder, level)
|
|
61
|
+
|
|
62
|
+
when :category
|
|
63
|
+
folder? ? nil : CategoryCrumb.new(@website_obj, level)
|
|
64
|
+
|
|
65
|
+
when :post
|
|
66
|
+
if index?
|
|
67
|
+
# Defer to parent.
|
|
68
|
+
nil
|
|
69
|
+
else
|
|
70
|
+
Crumb.new(@website_obj, level)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
when :parent
|
|
74
|
+
@website_obj.parent.nil? ? nil : Breadcrumb.new(@website_obj.parent, level)
|
|
75
|
+
|
|
76
|
+
else
|
|
77
|
+
nil
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
def ordered_structure
|
|
83
|
+
reverse? ? structure.reverse : structure
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def structure
|
|
87
|
+
if file? and in_blog? and not is_blog? and not index?
|
|
88
|
+
[:home, :blog, :category, :post]
|
|
89
|
+
|
|
90
|
+
else
|
|
91
|
+
[:parent, :post]
|
|
92
|
+
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def in_blog?
|
|
97
|
+
@website_obj.in_blog?
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def is_blog?
|
|
101
|
+
@website_obj.is_blog?
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
def config
|
|
105
|
+
@website_obj.config
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
def index?
|
|
109
|
+
@website_obj.index?
|
|
110
|
+
end
|
|
111
|
+
|
|
112
|
+
def folder?
|
|
113
|
+
@website_obj.folder?
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
def file?
|
|
117
|
+
@website_obj.file?
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class Crumb
|
|
123
|
+
def initialize(website_obj, level=0)
|
|
124
|
+
@website_obj = website_obj
|
|
125
|
+
@level = level
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
def to_s
|
|
129
|
+
Html::Link.new(
|
|
130
|
+
:href => @website_obj.link_url,
|
|
131
|
+
:class => "breadcrumb_#{@level}"
|
|
132
|
+
) << @website_obj.name
|
|
133
|
+
end
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
# A crumb for blog categories. For multiple categories, this currently adds links for all of them,
|
|
138
|
+
# separated by a slash.
|
|
139
|
+
class CategoryCrumb < Crumb
|
|
140
|
+
include Helpers
|
|
141
|
+
|
|
142
|
+
def initialize(website_file, level=0)
|
|
143
|
+
@website_file = website_file
|
|
144
|
+
@categories = website_file.categories
|
|
145
|
+
@level = level
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
def to_s
|
|
149
|
+
Html::Span.new(:class => "breadcrumb_#{@level}") << links.join(separator)
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def links
|
|
153
|
+
@categories.collect {|cat| cat.link}
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
def separator
|
|
157
|
+
" / "
|
|
158
|
+
end
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
require 'renderers/base'
|
|
2
|
+
require 'html/base'
|
|
3
|
+
|
|
4
|
+
module Yuzu::Renderers
|
|
5
|
+
class GalleryRenderer < Renderer
|
|
6
|
+
def template_name
|
|
7
|
+
"_gallery.haml"
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def gallery_template
|
|
11
|
+
@template ||= Yuzu::Core::HamlTemplate.new(template_name)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def render(website_file)
|
|
15
|
+
if gallery_template.exists?
|
|
16
|
+
gallery_template.render(website_file, {:images => website_file.images})
|
|
17
|
+
else
|
|
18
|
+
Html::Comment.new << "Couldn't find gallery template #{gallery_template.path.absolute}"
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
Renderer.register(:gallery => GalleryRenderer)
|
|
23
|
+
end
|
|
24
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'renderers/base'
|
|
2
|
+
|
|
3
|
+
module Yuzu
|
|
4
|
+
|
|
5
|
+
module Renderers
|
|
6
|
+
# Renders the html <title> tag.
|
|
7
|
+
class TitleRenderer < Renderer
|
|
8
|
+
def render(website_file)
|
|
9
|
+
config = website_file.config
|
|
10
|
+
if website_file.root? or website_file.home?
|
|
11
|
+
config.site_name
|
|
12
|
+
else
|
|
13
|
+
"#{website_file.post_title} | #{config.site_name}"
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
Renderer.register(:title => TitleRenderer)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
end
|
|
21
|
+
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
# Translators translate one markup language to another, e.g. markdown to html.
|
|
2
|
+
|
|
3
|
+
module Yuzu::Translators
|
|
4
|
+
include Yuzu::Registrar
|
|
5
|
+
|
|
6
|
+
class Translator < Register
|
|
7
|
+
@@translators = {}
|
|
8
|
+
def self.registry
|
|
9
|
+
:translators
|
|
10
|
+
end
|
|
11
|
+
def self.translators
|
|
12
|
+
@@translators
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def self.translate(contents, file_extension)
|
|
16
|
+
filetype = identify_filetype(file_extension)
|
|
17
|
+
if not filetype.nil?
|
|
18
|
+
Translator.translators[filetype].translate(contents)
|
|
19
|
+
else
|
|
20
|
+
contents
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def self.can_translate?(website_file)
|
|
25
|
+
source_extension = website_file.path.extension
|
|
26
|
+
# TODO map source -> output extensions, e.g. haml-to-xml, etc.
|
|
27
|
+
#target_extension = website_file.extension
|
|
28
|
+
filetype = identify_filetype(source_extension)
|
|
29
|
+
not filetype.nil?
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.identify_filetype(file_extension)
|
|
33
|
+
Translator.translators.each_pair do |filetype, translator|
|
|
34
|
+
return filetype if translator.translates?(file_extension)
|
|
35
|
+
end
|
|
36
|
+
return nil
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def self.filetypes
|
|
40
|
+
Translator.translators.keys
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def translates?(file_extension)
|
|
44
|
+
extensions.include?(file_extension)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def extensions
|
|
48
|
+
[]
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def translate(contents)
|
|
52
|
+
contents
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
end
|
|
57
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
require 'translators/base'
|
|
2
|
+
require 'kramdown'
|
|
3
|
+
|
|
4
|
+
module Yuzu::Translators
|
|
5
|
+
|
|
6
|
+
class MarkdownTranslator < Translator
|
|
7
|
+
def extensions
|
|
8
|
+
%w(.md .mdown .mkd .markdown .markd)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def translate(contents)
|
|
12
|
+
rendered = Kramdown::Document.new(contents).to_html
|
|
13
|
+
rendered = rendered.gsub("<p><noscript></p>", "<noscript>").gsub("<p></noscript></p>", "</noscript>")
|
|
14
|
+
rendered.gsub(/\n\s*<\/code>/, "</code>").gsub(/<code>(?!\s)/, "<code> ")
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
Translator.register(:markdown => MarkdownTranslator)
|
|
18
|
+
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
require 'translators/base'
|
|
2
|
+
|
|
3
|
+
module Yuzu::Translators
|
|
4
|
+
|
|
5
|
+
class PlaintextTranslator < Translator
|
|
6
|
+
def extensions
|
|
7
|
+
%(txt text)
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def translate(contents)
|
|
11
|
+
contents
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
Translator.register(:plaintext => PlaintextTranslator)
|
|
15
|
+
|
|
16
|
+
end
|
|
17
|
+
|
data/lib/yuzu/version.rb
ADDED
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
# Yuzu Config
|
|
2
|
+
|
|
3
|
+
site_name: Yuzu Starter Site
|
|
4
|
+
author: First Last
|
|
5
|
+
|
|
6
|
+
blog_dir: blog
|
|
7
|
+
template_dir: _templates
|
|
8
|
+
|
|
9
|
+
# Connection Configurations
|
|
10
|
+
|
|
11
|
+
# Yuzu uses the project's folder structure as a template for the website structure.
|
|
12
|
+
# In the process of producing the site, it must resolve to problems:
|
|
13
|
+
#
|
|
14
|
+
# 1. Where to place the actual files in the destination
|
|
15
|
+
# 2. How to resolve the URL links so they point at the correct files.
|
|
16
|
+
#
|
|
17
|
+
# Yuzu provides two ways of resolving these: remote_root_path and link_root.
|
|
18
|
+
#
|
|
19
|
+
# remote_root_path determines where the remote folder is located on the server, relative
|
|
20
|
+
# to the FTP user's home directory. If the FTP user is configured to place files directly
|
|
21
|
+
# into the root of the site, leave this blank.
|
|
22
|
+
#
|
|
23
|
+
# link_root is a string that can be prepended to all links. This enables you to place
|
|
24
|
+
# files wherever you want to in the destination and still get the URLs right.
|
|
25
|
+
# For example, in posts, you can specify links URLs like this:
|
|
26
|
+
#
|
|
27
|
+
# LINKROOT/images/my_image.png
|
|
28
|
+
#
|
|
29
|
+
# If link_root is blank, the URL defaults to the site root. This is especially
|
|
30
|
+
# useful for local setups where the root path isn't localhost, for example:
|
|
31
|
+
# link_root: http://localhost/~awmartin/my_site
|
|
32
|
+
|
|
33
|
+
# Which connection to use for publication. This should be set to s3, ftp, or
|
|
34
|
+
# filesystem. For publishing a site to this service use 'publish'.
|
|
35
|
+
#
|
|
36
|
+
# e.g. yuzu publish:all
|
|
37
|
+
#
|
|
38
|
+
connection: filesystem
|
|
39
|
+
|
|
40
|
+
services:
|
|
41
|
+
# The preview folder is used to support local design and development before
|
|
42
|
+
# publishing to a remote server.
|
|
43
|
+
#
|
|
44
|
+
# e.g. yuzu preview:all
|
|
45
|
+
preview:
|
|
46
|
+
destination: HOME/Sites/yuzu-preview
|
|
47
|
+
link_root: file://HOME/Sites/yuzu-preview
|
|
48
|
+
|
|
49
|
+
# The stage is used to produce a copy of the actual site on the file system
|
|
50
|
+
# for manual FTP-ing to a web server. This gives you the opportunity to get
|
|
51
|
+
# all the paths right for the server.
|
|
52
|
+
#
|
|
53
|
+
# e.g. yuzu stage:all
|
|
54
|
+
stage:
|
|
55
|
+
destination: HOME/Sites/yuzu-staging
|
|
56
|
+
link_root: /~USERNAME/yuzu-staging
|
|
57
|
+
|
|
58
|
+
# All the file system needs is the absolute path of the destination parent folder.
|
|
59
|
+
filesystem:
|
|
60
|
+
destination: HOME/Sites/yuzu-published
|
|
61
|
+
link_root: file://HOME/Sites/yuzu-published
|
|
62
|
+
|
|
63
|
+
# For FTP service to a web server or file server.
|
|
64
|
+
ftp:
|
|
65
|
+
domain: site.example.com
|
|
66
|
+
host: example.com
|
|
67
|
+
username: test%example.com
|
|
68
|
+
password: 123456
|
|
69
|
+
link_root:
|
|
70
|
+
remote_root_path:
|
|
71
|
+
|
|
72
|
+
# For service at Amazon S3. By default, this is configured to get the access_key and
|
|
73
|
+
# secret_key from environment variables, like ENV['AMAZON_ACCESS_KEY_ID']. Just put
|
|
74
|
+
# the name of the environment variable in those two fields.
|
|
75
|
+
s3:
|
|
76
|
+
domain: mybucket.s3.amazonaws.com
|
|
77
|
+
bucket: mybucket
|
|
78
|
+
access_key: AMAZON_ACCESS_KEY_ID
|
|
79
|
+
secret_key: AMAZON_SECRET_ACCESS_KEY
|
|
80
|
+
link_root:
|
|
81
|
+
remote_root_path:
|
|
82
|
+
|
|
83
|
+
# Proxy configuration if needed. This only works for S3 right now. Not needed for filesystem.
|
|
84
|
+
# Put 'yes' next to use_proxy: to turn on the proxy settings.
|
|
85
|
+
proxy:
|
|
86
|
+
use_proxy: no
|
|
87
|
+
host: proxy.nyit.edu
|
|
88
|
+
port: 80
|
|
89
|
+
username:
|
|
90
|
+
password:
|
|
91
|
+
|
|
92
|
+
# This is a list of the local folders to ignore completely, so the recursive updates
|
|
93
|
+
# won't traverse them. The SASS 'src' folder is a good one to exclude.
|
|
94
|
+
folder_blacklist:
|
|
95
|
+
- _sass
|
|
96
|
+
- _templates
|
|
97
|
+
- .sass-cache
|
|
98
|
+
- .yardoc
|
|
99
|
+
|
|
100
|
+
# Some folders have to be traversed to update resources, but we don't want to create
|
|
101
|
+
# auto-generated index.html files for them. This is the list of such folders.
|
|
102
|
+
no_index_folders:
|
|
103
|
+
- js
|
|
104
|
+
- sass
|
|
105
|
+
- css
|
|
106
|
+
- img
|
|
107
|
+
|
|
108
|
+
# These files will not be rendered, even if they have a processable extension.
|
|
109
|
+
no_render:
|
|
110
|
+
- robots.txt
|
|
111
|
+
|
|
112
|
+
# Files with these extensions will be ignored.
|
|
113
|
+
extension_blacklist:
|
|
114
|
+
- .rb
|
|
115
|
+
- .sassc
|
|
116
|
+
- .yml
|
|
117
|
+
|
|
118
|
+
# Files with these extensions will be put through the Textile or HAML markup generators.
|
|
119
|
+
processable_extensions:
|
|
120
|
+
- .text
|
|
121
|
+
- .textile
|
|
122
|
+
- .haml
|
|
123
|
+
- .txt
|
|
124
|
+
- .markdown
|
|
125
|
+
- .mdown
|
|
126
|
+
- .md
|
|
127
|
+
|
|
128
|
+
# Images.
|
|
129
|
+
image_extensions:
|
|
130
|
+
- .png
|
|
131
|
+
- .gif
|
|
132
|
+
- .jpg
|
|
133
|
+
- .jpeg
|
|
134
|
+
|
|
135
|
+
# Assets are files that rarely change, like PDFs and Java archives, that should be uploaded
|
|
136
|
+
# once and then ignored. Assets are generally ignored unless you ask them to be uploaded,
|
|
137
|
+
# since they can also be uploaded more easily with a graphic FTP client.
|
|
138
|
+
asset_extensions:
|
|
139
|
+
- .pdf
|
|
140
|
+
- .jar
|
|
141
|
+
- .pde
|
|
142
|
+
- .java
|
|
143
|
+
- .html
|
|
144
|
+
|
|
145
|
+
# Resources are files like CSS and Javascript that still may change when
|
|
146
|
+
# adding functionality or changing the styling of the site. These aren't put
|
|
147
|
+
# through the markup processors and are just uploaded when asked to.
|
|
148
|
+
resource_extensions:
|
|
149
|
+
- .css
|
|
150
|
+
- .js
|
|
151
|
+
|
|
152
|
+
# Thumbnail image names and widths.
|
|
153
|
+
# Every entry here will cause the generate:thumbnails command to produce a
|
|
154
|
+
# resized image with the key appended to the name. For example, an entry of
|
|
155
|
+
# small: 320 will cause the command to take "my-photo.png" and produce a new
|
|
156
|
+
# image, "my-photo-small.png" with a width of 320 pixels. "medium: 600" will
|
|
157
|
+
# produce "my-photo-medium.png" with a width of 600 pixels.
|
|
158
|
+
thumbnails:
|
|
159
|
+
small: 350
|
|
160
|
+
medium: 700
|
|
161
|
+
large: 1050
|
|
162
|
+
|
|
163
|
+
# Config under development.
|
|
164
|
+
remove_h1_tags: true
|
|
165
|
+
breadcrumb_separator: "·"
|
|
166
|
+
|