jekyll-asciidoc 2.1.1 → 3.0.0.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +26 -0
- data/Gemfile +4 -16
- data/LICENSE.adoc +1 -1
- data/README.adoc +370 -192
- data/jekyll-asciidoc.gemspec +23 -11
- data/lib/jekyll-asciidoc/compat.rb +5 -9
- data/lib/jekyll-asciidoc/converter.rb +89 -69
- data/lib/jekyll-asciidoc/filters.rb +2 -3
- data/lib/jekyll-asciidoc/integrator.rb +18 -29
- data/lib/jekyll-asciidoc/utils.rb +6 -3
- data/lib/jekyll-asciidoc/version.rb +1 -1
- metadata +48 -220
- data/Rakefile +0 -24
- data/spec/fixtures/alternate_page_attribute_prefix/_config.yml +0 -4
- data/spec/fixtures/alternate_page_attribute_prefix/_layouts/default.html +0 -12
- data/spec/fixtures/alternate_page_attribute_prefix/explicit-permalink.adoc +0 -4
- data/spec/fixtures/attributes_as_array/_config.yml +0 -7
- data/spec/fixtures/attributes_as_hash/_config.yml +0 -7
- data/spec/fixtures/basic_site/_config.yml +0 -2
- data/spec/fixtures/basic_site/_layouts/custom.html +0 -15
- data/spec/fixtures/basic_site/_layouts/page.html +0 -15
- data/spec/fixtures/basic_site/auto-layout.adoc +0 -4
- data/spec/fixtures/basic_site/bare-header.adoc +0 -4
- data/spec/fixtures/basic_site/custom-layout.adoc +0 -4
- data/spec/fixtures/basic_site/docid.adoc +0 -4
- data/spec/fixtures/basic_site/empty-layout.adoc +0 -4
- data/spec/fixtures/basic_site/empty-page-attribute.adoc +0 -4
- data/spec/fixtures/basic_site/liquid-enabled.adoc +0 -6
- data/spec/fixtures/basic_site/nil-layout.adoc +0 -4
- data/spec/fixtures/basic_site/no-doctitle.adoc +0 -2
- data/spec/fixtures/basic_site/no-liquid.adoc +0 -3
- data/spec/fixtures/basic_site/not-published.adoc +0 -4
- data/spec/fixtures/basic_site/section-with-id-and-role.adoc +0 -6
- data/spec/fixtures/basic_site/standalone-a.adoc +0 -4
- data/spec/fixtures/basic_site/standalone-b.adoc +0 -4
- data/spec/fixtures/basic_site/subdir/page-in-subdir.adoc +0 -7
- data/spec/fixtures/basic_site/with-front-matter-header-only.adoc +0 -4
- data/spec/fixtures/basic_site/with-front-matter-header.adoc +0 -6
- data/spec/fixtures/basic_site/without-front-matter-header.adoc +0 -3
- data/spec/fixtures/blank_page_attribute_prefix/_config.yml +0 -4
- data/spec/fixtures/blank_page_attribute_prefix/_layouts/default.html +0 -12
- data/spec/fixtures/blank_page_attribute_prefix/explicit-permalink.adoc +0 -4
- data/spec/fixtures/default_config/_config.yml +0 -2
- data/spec/fixtures/explicit_site_time/_config.yml +0 -4
- data/spec/fixtures/explicit_site_time/_layouts/default.html +0 -12
- data/spec/fixtures/explicit_site_time/home.adoc +0 -3
- data/spec/fixtures/fallback_to_default_layout/_blueprints/blueprint.adoc +0 -3
- data/spec/fixtures/fallback_to_default_layout/_config.yml +0 -5
- data/spec/fixtures/fallback_to_default_layout/_layouts/default.html +0 -15
- data/spec/fixtures/fallback_to_default_layout/_posts/2016-01-01-post.adoc +0 -4
- data/spec/fixtures/fallback_to_default_layout/home.adoc +0 -3
- data/spec/fixtures/front_matter_defaults/_config.yml +0 -10
- data/spec/fixtures/front_matter_defaults/_layouts/docs.html +0 -15
- data/spec/fixtures/front_matter_defaults/_layouts/general.html +0 -15
- data/spec/fixtures/front_matter_defaults/docs/page.adoc +0 -3
- data/spec/fixtures/front_matter_defaults/page.adoc +0 -3
- data/spec/fixtures/hybrid_config/_config.yml +0 -8
- data/spec/fixtures/imagesdir_relative_to_root/_config.yml +0 -5
- data/spec/fixtures/include_relative_to_docdir/_config.yml +0 -4
- data/spec/fixtures/include_relative_to_docdir/_layouts/default.html +0 -12
- data/spec/fixtures/include_relative_to_docdir/about/_people.adoc +0 -2
- data/spec/fixtures/include_relative_to_docdir/about/index.adoc +0 -13
- data/spec/fixtures/include_relative_to_root/source/_config.yml +0 -2
- data/spec/fixtures/include_relative_to_root/source/_layouts/default.html +0 -11
- data/spec/fixtures/include_relative_to_root/source/about/_people.adoc +0 -2
- data/spec/fixtures/include_relative_to_root/source/about/index.adoc +0 -13
- data/spec/fixtures/include_relative_to_source/_config.yml +0 -4
- data/spec/fixtures/include_relative_to_source/_layouts/default.html +0 -12
- data/spec/fixtures/include_relative_to_source/about/_people.adoc +0 -2
- data/spec/fixtures/include_relative_to_source/about/index.adoc +0 -13
- data/spec/fixtures/legacy_config/_config.yml +0 -5
- data/spec/fixtures/pygments_code_highlighting/_config.yml +0 -6
- data/spec/fixtures/pygments_code_highlighting/_layouts/page.html +0 -13
- data/spec/fixtures/pygments_code_highlighting/page-with-code.adoc +0 -16
- data/spec/fixtures/read_error/_config.yml +0 -2
- data/spec/fixtures/read_error/unreadable.adoc +0 -3
- data/spec/fixtures/require_front_matter_header/_config.yml +0 -4
- data/spec/fixtures/require_front_matter_header/_layouts/default.html +0 -12
- data/spec/fixtures/require_front_matter_header/with-front-matter-header.adoc +0 -5
- data/spec/fixtures/require_front_matter_header/without-front-matter-header.adoc +0 -3
- data/spec/fixtures/safe_mode/_config.yml +0 -4
- data/spec/fixtures/safe_mode/_layouts/home.html +0 -15
- data/spec/fixtures/safe_mode/home.adoc +0 -5
- data/spec/fixtures/tocify_filter/_config.yml +0 -2
- data/spec/fixtures/tocify_filter/_layouts/default.html +0 -15
- data/spec/fixtures/tocify_filter/index.adoc +0 -25
- data/spec/fixtures/with_custom_collection/_blueprints/blueprint-a.adoc +0 -4
- data/spec/fixtures/with_custom_collection/_blueprints/blueprint-b.adoc +0 -10
- data/spec/fixtures/with_custom_collection/_config.yml +0 -7
- data/spec/fixtures/with_custom_collection/_layouts/blueprint.html +0 -15
- data/spec/fixtures/with_custom_collection/_layouts/default.html +0 -15
- data/spec/fixtures/with_posts/_config.yml +0 -6
- data/spec/fixtures/with_posts/_drafts/a-draft-post.adoc +0 -5
- data/spec/fixtures/with_posts/_layouts/custom.html +0 -15
- data/spec/fixtures/with_posts/_layouts/post.html +0 -23
- data/spec/fixtures/with_posts/_posts/2016-01-01-welcome.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-01-02-empty-layout.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-01-03-auto-layout.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-01-04-custom-layout.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-01-05-nil-layout.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-02-01-post-with-categories.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-02-02-post-with-singular-vars.adoc +0 -7
- data/spec/fixtures/with_posts/_posts/2016-03-01-post-with-excerpt.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-04-01-show-me-the-title.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-05-31-automatic-title.adoc +0 -1
- data/spec/fixtures/with_posts/_posts/2016-06-15-post-with-date.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-07-15-post-with-date-and-tz.adoc +0 -4
- data/spec/fixtures/with_posts/_posts/2016-07-20-post-with-date-in-revision-line.adoc +0 -6
- data/spec/fixtures/with_posts/index.html +0 -22
- data/spec/fixtures/xhtml_syntax/_config.yml +0 -6
- data/spec/fixtures/xhtml_syntax/home.adoc +0 -5
- data/spec/fixtures/xhtml_syntax/images/sunset.jpg +0 -0
- data/spec/jekyll-asciidoc_spec.rb +0 -1103
- data/spec/spec_helper.rb +0 -64
data/spec/spec_helper.rb
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
require 'jekyll'
|
2
|
-
require 'fileutils'
|
3
|
-
|
4
|
-
Jekyll::MIN_VERSION_3 = (Gem::Version.new Jekyll::VERSION) >= (Gem::Version.new '3.0.0') unless defined? Jekyll::MIN_VERSION_3
|
5
|
-
Jekyll.logger.log_level = :error
|
6
|
-
|
7
|
-
RSpec.configure do |config|
|
8
|
-
config.before :suite do
|
9
|
-
::FileUtils.rm_rf output_dir
|
10
|
-
end
|
11
|
-
|
12
|
-
def fixture_site_params path
|
13
|
-
{
|
14
|
-
'source' => (source_dir path),
|
15
|
-
'destination' => (output_dir path),
|
16
|
-
'url' => 'http://example.org'
|
17
|
-
}
|
18
|
-
end
|
19
|
-
|
20
|
-
def source_dir path
|
21
|
-
::File.join (::File.expand_path '../fixtures', __FILE__) , path
|
22
|
-
end
|
23
|
-
|
24
|
-
def source_file path
|
25
|
-
::File.join site.config['source'], path
|
26
|
-
end
|
27
|
-
|
28
|
-
def output_dir path = nil
|
29
|
-
base = ::File.expand_path '../../build/test-output', __FILE__
|
30
|
-
path ? (::File.join base, path) : base
|
31
|
-
end
|
32
|
-
|
33
|
-
def output_file path
|
34
|
-
::File.join site.config['destination'], path
|
35
|
-
end
|
36
|
-
|
37
|
-
def find_page path
|
38
|
-
site.pages.find {|p| p.path == path }
|
39
|
-
end
|
40
|
-
|
41
|
-
def find_post path
|
42
|
-
path = %(_posts/#{path}) unless path.start_with? '_posts/'
|
43
|
-
((site.respond_to? :posts=) ? site.posts : site.posts.docs).find {|p| p.relative_path == path }
|
44
|
-
end
|
45
|
-
|
46
|
-
def find_draft path
|
47
|
-
path = %(_drafts/#{path}) unless path.start_with? '_drafts/'
|
48
|
-
if site.respond_to? :posts=
|
49
|
-
path = %(/#{path})
|
50
|
-
site.posts.find {|p| p.relative_path == path }
|
51
|
-
else
|
52
|
-
site.posts.docs.find {|p| p.relative_path == path }
|
53
|
-
end
|
54
|
-
end
|
55
|
-
|
56
|
-
def find_doc path, collection_name
|
57
|
-
path = %(_#{collection_name}/#{path}) unless path.start_with? %(_#{collection_name}/)
|
58
|
-
site.collections[collection_name].docs.find {|p| p.relative_path == path }
|
59
|
-
end
|
60
|
-
|
61
|
-
def windows?
|
62
|
-
::RbConfig::CONFIG['host_os'] =~ /win|ming/
|
63
|
-
end
|
64
|
-
end
|