jekyll 4.0.1 → 4.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +350 -163
  3. data/LICENSE +21 -21
  4. data/README.markdown +86 -90
  5. data/exe/jekyll +57 -57
  6. data/lib/blank_template/_config.yml +3 -3
  7. data/lib/blank_template/_layouts/default.html +12 -12
  8. data/lib/blank_template/_sass/main.scss +9 -9
  9. data/lib/blank_template/assets/css/main.scss +4 -4
  10. data/lib/blank_template/index.md +8 -8
  11. data/lib/jekyll/cache.rb +190 -190
  12. data/lib/jekyll/cleaner.rb +111 -111
  13. data/lib/jekyll/collection.rb +309 -309
  14. data/lib/jekyll/command.rb +105 -103
  15. data/lib/jekyll/commands/build.rb +93 -93
  16. data/lib/jekyll/commands/clean.rb +45 -45
  17. data/lib/jekyll/commands/doctor.rb +177 -173
  18. data/lib/jekyll/commands/help.rb +34 -34
  19. data/lib/jekyll/commands/new.rb +169 -169
  20. data/lib/jekyll/commands/new_theme.rb +40 -42
  21. data/lib/jekyll/commands/serve/live_reload_reactor.rb +122 -122
  22. data/lib/jekyll/commands/serve/livereload_assets/livereload.js +1183 -1183
  23. data/lib/jekyll/commands/serve/servlet.rb +202 -202
  24. data/lib/jekyll/commands/serve/websockets.rb +81 -81
  25. data/lib/jekyll/commands/serve.rb +362 -354
  26. data/lib/jekyll/configuration.rb +313 -316
  27. data/lib/jekyll/converter.rb +54 -54
  28. data/lib/jekyll/converters/identity.rb +41 -41
  29. data/lib/jekyll/converters/markdown/kramdown_parser.rb +199 -130
  30. data/lib/jekyll/converters/markdown.rb +113 -113
  31. data/lib/jekyll/converters/smartypants.rb +70 -70
  32. data/lib/jekyll/convertible.rb +257 -254
  33. data/lib/jekyll/deprecator.rb +50 -50
  34. data/lib/jekyll/document.rb +544 -522
  35. data/lib/jekyll/drops/collection_drop.rb +20 -20
  36. data/lib/jekyll/drops/document_drop.rb +70 -69
  37. data/lib/jekyll/drops/drop.rb +293 -215
  38. data/lib/jekyll/drops/excerpt_drop.rb +19 -19
  39. data/lib/jekyll/drops/jekyll_drop.rb +32 -32
  40. data/lib/jekyll/drops/site_drop.rb +66 -66
  41. data/lib/jekyll/drops/static_file_drop.rb +14 -14
  42. data/lib/jekyll/drops/unified_payload_drop.rb +26 -26
  43. data/lib/jekyll/drops/url_drop.rb +140 -132
  44. data/lib/jekyll/entry_filter.rb +121 -110
  45. data/lib/jekyll/errors.rb +20 -20
  46. data/lib/jekyll/excerpt.rb +201 -201
  47. data/lib/jekyll/external.rb +79 -79
  48. data/lib/jekyll/filters/date_filters.rb +110 -110
  49. data/lib/jekyll/filters/grouping_filters.rb +64 -64
  50. data/lib/jekyll/filters/url_filters.rb +98 -68
  51. data/lib/jekyll/filters.rb +535 -454
  52. data/lib/jekyll/frontmatter_defaults.rb +240 -245
  53. data/lib/jekyll/generator.rb +5 -5
  54. data/lib/jekyll/hooks.rb +107 -106
  55. data/lib/jekyll/inclusion.rb +32 -0
  56. data/lib/jekyll/layout.rb +67 -62
  57. data/lib/jekyll/liquid_extensions.rb +22 -22
  58. data/lib/jekyll/liquid_renderer/file.rb +77 -77
  59. data/lib/jekyll/liquid_renderer/table.rb +55 -75
  60. data/lib/jekyll/liquid_renderer.rb +80 -77
  61. data/lib/jekyll/log_adapter.rb +151 -151
  62. data/lib/jekyll/mime.types +866 -866
  63. data/lib/jekyll/page.rb +217 -186
  64. data/lib/jekyll/page_excerpt.rb +25 -0
  65. data/lib/jekyll/page_without_a_file.rb +14 -14
  66. data/lib/jekyll/path_manager.rb +74 -31
  67. data/lib/jekyll/plugin.rb +92 -92
  68. data/lib/jekyll/plugin_manager.rb +115 -115
  69. data/lib/jekyll/profiler.rb +58 -0
  70. data/lib/jekyll/publisher.rb +23 -23
  71. data/lib/jekyll/reader.rb +192 -187
  72. data/lib/jekyll/readers/collection_reader.rb +23 -22
  73. data/lib/jekyll/readers/data_reader.rb +79 -75
  74. data/lib/jekyll/readers/layout_reader.rb +62 -61
  75. data/lib/jekyll/readers/page_reader.rb +25 -24
  76. data/lib/jekyll/readers/post_reader.rb +85 -84
  77. data/lib/jekyll/readers/static_file_reader.rb +25 -24
  78. data/lib/jekyll/readers/theme_assets_reader.rb +52 -51
  79. data/lib/jekyll/regenerator.rb +195 -195
  80. data/lib/jekyll/related_posts.rb +52 -52
  81. data/lib/jekyll/renderer.rb +265 -267
  82. data/lib/jekyll/site.rb +551 -527
  83. data/lib/jekyll/static_file.rb +208 -203
  84. data/lib/jekyll/stevenson.rb +60 -60
  85. data/lib/jekyll/tags/highlight.rb +110 -110
  86. data/lib/jekyll/tags/include.rb +275 -221
  87. data/lib/jekyll/tags/link.rb +42 -41
  88. data/lib/jekyll/tags/post_url.rb +106 -107
  89. data/lib/jekyll/theme.rb +86 -80
  90. data/lib/jekyll/theme_builder.rb +121 -121
  91. data/lib/jekyll/url.rb +167 -164
  92. data/lib/jekyll/utils/ansi.rb +57 -57
  93. data/lib/jekyll/utils/exec.rb +26 -26
  94. data/lib/jekyll/utils/internet.rb +37 -37
  95. data/lib/jekyll/utils/platforms.rb +67 -82
  96. data/lib/jekyll/utils/thread_event.rb +31 -31
  97. data/lib/jekyll/utils/win_tz.rb +75 -75
  98. data/lib/jekyll/utils.rb +367 -367
  99. data/lib/jekyll/version.rb +5 -5
  100. data/lib/jekyll.rb +195 -206
  101. data/lib/site_template/.gitignore +5 -5
  102. data/lib/site_template/404.html +25 -25
  103. data/lib/site_template/_config.yml +55 -55
  104. data/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb +29 -29
  105. data/lib/site_template/about.markdown +18 -18
  106. data/lib/site_template/index.markdown +6 -6
  107. data/lib/theme_template/CODE_OF_CONDUCT.md.erb +74 -74
  108. data/lib/theme_template/Gemfile +4 -4
  109. data/lib/theme_template/LICENSE.txt.erb +21 -21
  110. data/lib/theme_template/README.md.erb +52 -52
  111. data/lib/theme_template/_layouts/default.html +1 -1
  112. data/lib/theme_template/_layouts/page.html +5 -5
  113. data/lib/theme_template/_layouts/post.html +5 -5
  114. data/lib/theme_template/example/_config.yml.erb +1 -1
  115. data/lib/theme_template/example/_post.md +12 -12
  116. data/lib/theme_template/example/index.html +14 -14
  117. data/lib/theme_template/example/style.scss +7 -7
  118. data/lib/theme_template/gitignore.erb +6 -6
  119. data/lib/theme_template/theme.gemspec.erb +16 -19
  120. data/rubocop/jekyll/assert_equal_literal_actual.rb +149 -149
  121. data/rubocop/jekyll/no_p_allowed.rb +23 -23
  122. data/rubocop/jekyll/no_puts_allowed.rb +23 -23
  123. data/rubocop/jekyll.rb +5 -5
  124. metadata +20 -38
data/README.markdown CHANGED
@@ -1,90 +1,86 @@
1
- # [Jekyll](https://jekyllrb.com/)
2
-
3
- [![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
4
- [![Linux Build Status](https://img.shields.io/travis/jekyll/jekyll/master.svg?label=Linux%20build)][travis]
5
- [![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
6
- [![Maintainability](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/maintainability)][codeclimate]
7
- [![Test Coverage](https://api.codeclimate.com/v1/badges/8ba0cb5b17bb9848e128/test_coverage)][coverage]
8
- [![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
9
- [![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
10
- [![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)
11
-
12
- [ruby-gems]: https://rubygems.org/gems/jekyll
13
- [codeclimate]: https://codeclimate.com/github/jekyll/jekyll
14
- [coverage]: https://codeclimate.com/github/jekyll/jekyll/coverage
15
- [hakiri]: https://hakiri.io/github/jekyll/jekyll/master
16
- [travis]: https://travis-ci.org/jekyll/jekyll
17
- [appveyor]: https://ci.appveyor.com/project/jekyll/jekyll/branch/master
18
-
19
- Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](https://pages.github.com), which you can use to host sites right from your GitHub repositories.
20
-
21
- ## Philosophy
22
-
23
- Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
24
-
25
- See: https://jekyllrb.com/philosophy
26
-
27
- ## Getting Started
28
-
29
- * [Install](https://jekyllrb.com/docs/installation/) the gem
30
- * Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
31
- * Take a gander at some existing [Sites](https://github.com/jekyll/jekyll/wiki/sites)
32
- * [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
33
- * Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
34
-
35
- ## Diving In
36
-
37
- * [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
38
- * Learn how [Front Matter](https://jekyllrb.com/docs/front-matter/) works
39
- * Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
40
- * Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
41
- * Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
42
- * Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
43
- * Watch [video tutorials from Giraffe Academy](https://jekyllrb.com/tutorials/video-walkthroughs/)
44
-
45
- ## Need help?
46
-
47
- If you don't find the answer to your problem in our [docs](https://jekyllrb.com/docs/), or in the [troubleshooting section](https://jekyllrb.com/docs/troubleshooting/), ask the [community](https://jekyllrb.com/docs/community/) for help.
48
-
49
- ## Code of Conduct
50
-
51
- In order to have a more open and welcoming community, Jekyll adheres to a
52
- [code of conduct](CODE_OF_CONDUCT.markdown) adapted from the Ruby on Rails code of
53
- conduct.
54
-
55
- Please adhere to this code of conduct in any interactions you have in the
56
- Jekyll community. It is strictly enforced on all official Jekyll
57
- repositories, websites, and resources. If you encounter someone violating
58
- these terms, please let one of our [core team members](https://jekyllrb.com/team/#core-team) know and we will address it as soon as possible.
59
-
60
- ## Credits
61
-
62
- ### Sponsors
63
-
64
- Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
65
-
66
- <a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
67
- <a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
68
- <a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
69
- <a href="https://opencollective.com/jekyll/sponsor/3/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/3/avatar.svg" /></a>
70
- <a href="https://opencollective.com/jekyll/sponsor/4/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/4/avatar.svg" /></a>
71
- <a href="https://opencollective.com/jekyll/sponsor/5/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/5/avatar.svg" /></a>
72
- <a href="https://opencollective.com/jekyll/sponsor/6/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/6/avatar.svg" /></a>
73
- <a href="https://opencollective.com/jekyll/sponsor/7/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/7/avatar.svg" /></a>
74
- <a href="https://opencollective.com/jekyll/sponsor/8/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/8/avatar.svg" /></a>
75
- <a href="https://opencollective.com/jekyll/sponsor/9/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/9/avatar.svg" /></a>
76
-
77
- ### Contributors
78
-
79
- This project exists thanks to all the people who contribute.
80
- <a href="../../graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
81
-
82
- ### Backers
83
-
84
- Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
85
-
86
- <a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
87
-
88
- ## License
89
-
90
- See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.
1
+ # [Jekyll](https://jekyllrb.com/)
2
+
3
+ [![Gem Version](https://img.shields.io/gem/v/jekyll.svg)][ruby-gems]
4
+ [![Linux Build Status](https://github.com/jekyll/jekyll/workflows/Continuous%20Integration/badge.svg)][ci-workflow]
5
+ [![Windows Build status](https://img.shields.io/appveyor/ci/jekyll/jekyll/master.svg?label=Windows%20build)][appveyor]
6
+ [![Security](https://hakiri.io/github/jekyll/jekyll/master.svg)][hakiri]
7
+ [![Backers on Open Collective](https://opencollective.com/jekyll/backers/badge.svg)](#backers)
8
+ [![Sponsors on Open Collective](https://opencollective.com/jekyll/sponsors/badge.svg)](#sponsors)
9
+
10
+ [ruby-gems]: https://rubygems.org/gems/jekyll
11
+ [hakiri]: https://hakiri.io/github/jekyll/jekyll/master
12
+ [ci-workflow]: https://github.com/jekyll/jekyll/actions?query=workflow%3A%22Continuous+Integration%22+branch%3Amaster
13
+ [appveyor]: https://ci.appveyor.com/project/jekyll/jekyll/branch/master
14
+
15
+ Jekyll is a simple, blog-aware, static site generator perfect for personal, project, or organization sites. Think of it like a file-based CMS, without all the complexity. Jekyll takes your content, renders Markdown and Liquid templates, and spits out a complete, static website ready to be served by Apache, Nginx or another web server. Jekyll is the engine behind [GitHub Pages](https://pages.github.com), which you can use to host sites right from your GitHub repositories.
16
+
17
+ ## Philosophy
18
+
19
+ Jekyll does what you tell it to do — no more, no less. It doesn't try to outsmart users by making bold assumptions, nor does it burden them with needless complexity and configuration. Put simply, Jekyll gets out of your way and allows you to concentrate on what truly matters: your content.
20
+
21
+ See: https://jekyllrb.com/philosophy
22
+
23
+ ## Getting Started
24
+
25
+ * [Install](https://jekyllrb.com/docs/installation/) the gem
26
+ * Read up about its [Usage](https://jekyllrb.com/docs/usage/) and [Configuration](https://jekyllrb.com/docs/configuration/)
27
+ * Take a gander at some existing [Sites](https://github.com/jekyll/jekyll/wiki/sites)
28
+ * [Fork](https://github.com/jekyll/jekyll/fork) and [Contribute](https://jekyllrb.com/docs/contributing/) your own modifications
29
+ * Have questions? Check out our official forum community [Jekyll Talk](https://talk.jekyllrb.com/) or [`#jekyll` on irc.freenode.net](https://botbot.me/freenode/jekyll/)
30
+
31
+ ## Diving In
32
+
33
+ * [Migrate](http://import.jekyllrb.com/docs/home/) from your previous system
34
+ * Learn how [Front Matter](https://jekyllrb.com/docs/front-matter/) works
35
+ * Put information on your site with [Variables](https://jekyllrb.com/docs/variables/)
36
+ * Customize the [Permalinks](https://jekyllrb.com/docs/permalinks/) your posts are generated with
37
+ * Use the built-in [Liquid Extensions](https://jekyllrb.com/docs/templates/) to make your life easier
38
+ * Use custom [Plugins](https://jekyllrb.com/docs/plugins/) to generate content specific to your site
39
+ * Watch [video tutorials from Giraffe Academy](https://jekyllrb.com/tutorials/video-walkthroughs/)
40
+
41
+ ## Need help?
42
+
43
+ If you don't find the answer to your problem in our [docs](https://jekyllrb.com/docs/), or in the [troubleshooting section](https://jekyllrb.com/docs/troubleshooting/), ask the [community](https://jekyllrb.com/docs/community/) for help.
44
+
45
+ ## Code of Conduct
46
+
47
+ In order to have a more open and welcoming community, Jekyll adheres to a
48
+ [code of conduct](CODE_OF_CONDUCT.markdown) adapted from the Ruby on Rails code of
49
+ conduct.
50
+
51
+ Please adhere to this code of conduct in any interactions you have in the
52
+ Jekyll community. It is strictly enforced on all official Jekyll
53
+ repositories, websites, and resources. If you encounter someone violating
54
+ these terms, please let one of our [core team members](https://jekyllrb.com/team/#core-team) know and we will address it as soon as possible.
55
+
56
+ ## Credits
57
+
58
+ ### Sponsors
59
+
60
+ Support this project by becoming a sponsor. Your logo will show up in this README with a link to your website. [Become a sponsor!](https://opencollective.com/jekyll#sponsor)
61
+
62
+ <a href="https://opencollective.com/jekyll/sponsor/0/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/0/avatar.svg" /></a>
63
+ <a href="https://opencollective.com/jekyll/sponsor/1/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/1/avatar.svg" /></a>
64
+ <a href="https://opencollective.com/jekyll/sponsor/2/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/2/avatar.svg" /></a>
65
+ <a href="https://opencollective.com/jekyll/sponsor/3/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/3/avatar.svg" /></a>
66
+ <a href="https://opencollective.com/jekyll/sponsor/4/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/4/avatar.svg" /></a>
67
+ <a href="https://opencollective.com/jekyll/sponsor/5/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/5/avatar.svg" /></a>
68
+ <a href="https://opencollective.com/jekyll/sponsor/6/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/6/avatar.svg" /></a>
69
+ <a href="https://opencollective.com/jekyll/sponsor/7/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/7/avatar.svg" /></a>
70
+ <a href="https://opencollective.com/jekyll/sponsor/8/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/8/avatar.svg" /></a>
71
+ <a href="https://opencollective.com/jekyll/sponsor/9/website" target="_blank"><img src="https://opencollective.com/jekyll/sponsor/9/avatar.svg" /></a>
72
+
73
+ ### Contributors
74
+
75
+ This project exists thanks to all the people who contribute.
76
+ <a href="../../graphs/contributors"><img src="https://opencollective.com/jekyll/contributors.svg?width=890&button=false" /></a>
77
+
78
+ ### Backers
79
+
80
+ Thank you to all our backers! 🙏 [Become a backer](https://opencollective.com/jekyll#backer)
81
+
82
+ <a href="https://opencollective.com/jekyll#backers" target="_blank"><img src="https://opencollective.com/jekyll/backers.svg?width=890" /></a>
83
+
84
+ ## License
85
+
86
+ See the [LICENSE](https://github.com/jekyll/jekyll/blob/master/LICENSE) file.
data/exe/jekyll CHANGED
@@ -1,57 +1,57 @@
1
- #!/usr/bin/env ruby
2
- # frozen_string_literal: true
3
-
4
- STDOUT.sync = true
5
-
6
- $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
7
-
8
- require "jekyll"
9
- require "mercenary"
10
-
11
- Jekyll::PluginManager.require_from_bundler
12
-
13
- Jekyll::Deprecator.process(ARGV)
14
-
15
- Mercenary.program(:jekyll) do |p|
16
- p.version Jekyll::VERSION
17
- p.description "Jekyll is a blog-aware, static site generator in Ruby"
18
- p.syntax "jekyll <subcommand> [options]"
19
-
20
- p.option "source", "-s", "--source [DIR]", "Source directory (defaults to ./)"
21
- p.option "destination", "-d", "--destination [DIR]",
22
- "Destination directory (defaults to ./_site)"
23
- p.option "safe", "--safe", "Safe mode (defaults to false)"
24
- p.option "plugins_dir", "-p", "--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]", Array,
25
- "Plugins directory (defaults to ./_plugins)"
26
- p.option "layouts_dir", "--layouts DIR", String,
27
- "Layouts directory (defaults to ./_layouts)"
28
- p.option "profile", "--profile", "Generate a Liquid rendering profile"
29
-
30
- Jekyll::External.require_if_present(Jekyll::External.blessed_gems) do |g, ver_constraint|
31
- cmd = g.split("-").last
32
- p.command(cmd.to_sym) do |c|
33
- c.syntax cmd
34
- c.action do
35
- Jekyll.logger.abort_with "You must install the '#{g}' gem" \
36
- " version #{ver_constraint} to use the 'jekyll #{cmd}' command."
37
- end
38
- end
39
- end
40
-
41
- Jekyll::Command.subclasses.each { |c| c.init_with_program(p) }
42
-
43
- p.action do |args, _|
44
- if args.empty?
45
- Jekyll.logger.error "A subcommand is required."
46
- puts p
47
- abort
48
- else
49
- subcommand = args.first
50
- unless p.has_command? subcommand
51
- Jekyll.logger.abort_with "fatal: 'jekyll #{args.first}' could not" \
52
- " be found. You may need to install the jekyll-#{args.first} gem" \
53
- " or a related gem to be able to use this subcommand."
54
- end
55
- end
56
- end
57
- end
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ STDOUT.sync = true
5
+
6
+ $LOAD_PATH.unshift File.expand_path("../lib", __dir__)
7
+
8
+ require "jekyll"
9
+ require "mercenary"
10
+
11
+ Jekyll::PluginManager.require_from_bundler
12
+
13
+ Jekyll::Deprecator.process(ARGV)
14
+
15
+ Mercenary.program(:jekyll) do |p|
16
+ p.version Jekyll::VERSION
17
+ p.description "Jekyll is a blog-aware, static site generator in Ruby"
18
+ p.syntax "jekyll <subcommand> [options]"
19
+
20
+ p.option "source", "-s", "--source [DIR]", "Source directory (defaults to ./)"
21
+ p.option "destination", "-d", "--destination [DIR]",
22
+ "Destination directory (defaults to ./_site)"
23
+ p.option "safe", "--safe", "Safe mode (defaults to false)"
24
+ p.option "plugins_dir", "-p", "--plugins PLUGINS_DIR1[,PLUGINS_DIR2[,...]]", Array,
25
+ "Plugins directory (defaults to ./_plugins)"
26
+ p.option "layouts_dir", "--layouts DIR", String,
27
+ "Layouts directory (defaults to ./_layouts)"
28
+ p.option "profile", "--profile", "Generate a Liquid rendering profile"
29
+
30
+ Jekyll::External.require_if_present(Jekyll::External.blessed_gems) do |g, ver_constraint|
31
+ cmd = g.split("-").last
32
+ p.command(cmd.to_sym) do |c|
33
+ c.syntax cmd
34
+ c.action do
35
+ Jekyll.logger.abort_with "You must install the '#{g}' gem" \
36
+ " version #{ver_constraint} to use the 'jekyll #{cmd}' command."
37
+ end
38
+ end
39
+ end
40
+
41
+ Jekyll::Command.subclasses.each { |c| c.init_with_program(p) }
42
+
43
+ p.action do |args, _|
44
+ if args.empty?
45
+ Jekyll.logger.error "A subcommand is required."
46
+ puts p
47
+ abort
48
+ else
49
+ subcommand = args.first
50
+ unless p.has_command? subcommand
51
+ Jekyll.logger.abort_with "fatal: 'jekyll #{args.first}' could not" \
52
+ " be found. You may need to install the jekyll-#{args.first} gem" \
53
+ " or a related gem to be able to use this subcommand."
54
+ end
55
+ end
56
+ end
57
+ end
@@ -1,3 +1,3 @@
1
- url: "" # the base hostname & protocol for your site, e.g. http://example.com
2
- baseurl: "" # the subpath of your site, e.g. /blog
3
- title: "" # the name of your site, e.g. ACME Corp.
1
+ url: "" # the base hostname & protocol for your site, e.g. http://example.com
2
+ baseurl: "" # the subpath of your site, e.g. /blog
3
+ title: "" # the name of your site, e.g. ACME Corp.
@@ -1,12 +1,12 @@
1
- <!DOCTYPE html>
2
- <html lang="{{ site.lang | default: "en-US" }}">
3
- <head>
4
- <meta name="viewport" content="width=device-width, initial-scale=1">
5
- <meta charset="utf-8">
6
- <title>{{ page.title }} - {{ site.title }}</title>
7
- <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
8
- </head>
9
- <body>
10
- {{ content}}
11
- </body>
12
- </html>
1
+ <!DOCTYPE html>
2
+ <html lang="{{ site.lang | default: "en-US" }}">
3
+ <head>
4
+ <meta name="viewport" content="width=device-width, initial-scale=1">
5
+ <meta charset="utf-8">
6
+ <title>{{ page.title }} - {{ site.title }}</title>
7
+ <link rel="stylesheet" href="{{ "/assets/css/main.css" | relative_url }}">
8
+ </head>
9
+ <body>
10
+ {{ content }}
11
+ </body>
12
+ </html>
@@ -1,9 +1,9 @@
1
- $backgroundColor: #ffffff;
2
- $bodyColor: #000000;
3
- $bodyFont: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
4
-
5
- body {
6
- background: $backgroundColor;
7
- color: $bodyColor;
8
- font-family: $bodyFont;
9
- }
1
+ $backgroundColor: #ffffff;
2
+ $bodyColor: #000000;
3
+ $bodyFont: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";
4
+
5
+ body {
6
+ background: $backgroundColor;
7
+ color: $bodyColor;
8
+ font-family: $bodyFont;
9
+ }
@@ -1,4 +1,4 @@
1
- ---
2
- ---
3
-
4
- @import "main";
1
+ ---
2
+ ---
3
+
4
+ @import "main";
@@ -1,8 +1,8 @@
1
- ---
2
- layout: default
3
- title: "Happy Jekylling!"
4
- ---
5
-
6
- ## You're ready to go!
7
-
8
- Start developing your Jekyll website.
1
+ ---
2
+ layout: default
3
+ title: "Happy Jekylling!"
4
+ ---
5
+
6
+ ## You're ready to go!
7
+
8
+ Start developing your Jekyll website.