├── docs ├── CNAME ├── latest_version.txt ├── .gitignore ├── favicon.ico ├── img │ ├── logo-2x.png │ ├── logo-rss.png │ ├── octojekyll.png │ ├── footer-arrow.png │ ├── footer-logo.png │ ├── twitter-card.png │ ├── article-footer.png │ ├── jekyll-sticker.jpg │ └── jekylllayoutconcept.png ├── fonts │ ├── FontAwesome.eot │ ├── FontAwesome.ttf │ └── FontAwesome.woff ├── redirects │ ├── github.html │ └── issues.html ├── css │ └── screen.scss ├── news │ ├── index.html │ └── releases │ │ └── index.html ├── _includes │ ├── docs_contents.html │ ├── docs_option.html │ ├── tutorials_option.html │ ├── tutorials_contents.html │ ├── docs_ul.html │ ├── tutorials_ul.html │ ├── docs_contents_mobile.html │ ├── tutorials_contents_mobile.html │ ├── news_contents_mobile.html │ ├── primary-nav-items.html │ ├── header.html │ ├── footer.html │ ├── news_item.html │ ├── top.html │ ├── news_contents.html │ ├── analytics.html │ └── anchor_links.html ├── _data │ ├── tutorials.yml │ └── docs.yml ├── _layouts │ ├── default.html │ ├── page.html │ ├── news.html │ ├── error.html │ ├── news_item.html │ ├── docs.html │ └── tutorials.html ├── _docs │ ├── migrations.md │ ├── continuous-integration │ │ └── index.md │ ├── drafts.md │ ├── sites.md │ ├── maintaining │ │ └── index.md │ ├── upgrading.md │ ├── support.md │ └── extras.md ├── _posts │ ├── 2016-05-18-jekyll-3-1-5-released.markdown │ ├── 2013-12-09-jekyll-1-4-1-released.markdown │ ├── 2014-11-12-jekyll-2-5-2-released.markdown │ ├── 2013-10-28-jekyll-1-3-0-rc1-released.markdown │ ├── 2016-11-14-jekyll-3-3-1-released.markdown │ ├── 2013-12-16-jekyll-1-4-2-released.markdown │ ├── 2014-07-29-jekyll-2-2-0-released.markdown │ ├── 2016-05-19-jekyll-3-1-6-released.markdown │ ├── 2014-03-24-jekyll-1-5-0-released.markdown │ ├── 2016-04-19-jekyll-3-1-3-released.markdown │ ├── 2016-01-20-jekyll-3-0-2-released.markdown │ ├── 2014-12-22-jekyll-2-5-3-released.markdown │ ├── 2013-09-14-jekyll-1-2-1-released.markdown │ ├── 2015-02-26-introducing-jekyll-talk.markdown │ ├── 2014-03-27-jekyll-1-5-1-released.markdown │ ├── 2013-11-26-jekyll-1-3-1-released.markdown │ ├── 2015-01-20-jekyll-meet-and-greet.markdown │ ├── 2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown │ ├── 2013-06-07-jekyll-1-0-3-released.markdown │ ├── 2016-08-02-jekyll-3-2-1-released.markdown │ ├── 2016-04-26-jekyll-3-0-5-released.markdown │ ├── 2013-07-25-jekyll-1-0-4-released.markdown │ ├── 2013-07-25-jekyll-1-1-2-released.markdown │ ├── 2014-05-08-jekyll-2-0-3-released.markdown │ ├── 2016-04-19-jekyll-3-0-4-released.markdown │ ├── 2014-07-01-jekyll-2-1-1-released.markdown │ ├── 2013-07-24-jekyll-1-1-1-released.markdown │ ├── 2014-12-17-alfredxing-welcome-to-jekyll-core.md │ ├── 2017-07-17-jekyll-3-5-1-released.markdown │ ├── 2015-11-17-jekyll-3-0-1-released.markdown │ ├── 2013-05-06-jekyll-1-0-0-released.markdown │ ├── 2013-05-08-jekyll-1-0-1-released.markdown │ ├── 2013-07-14-jekyll-1-1-0-released.markdown │ ├── 2013-09-06-jekyll-1-2-0-released.markdown │ ├── 2013-05-12-jekyll-1-0-2-released.markdown │ ├── 2016-02-08-jekyll-3-0-3-released.markdown │ ├── 2013-12-07-jekyll-1-4-0-released.markdown │ ├── 2014-01-13-jekyll-1-4-3-released.markdown │ ├── 2017-09-21-jekyll-3-6-0-released.markdown │ ├── 2016-02-19-jekyll-3-1-2-released.markdown │ ├── 2014-11-08-jekyll-2-5-1-released.markdown │ ├── 2016-05-18-jekyll-3-1-4-released.markdown │ ├── 2015-01-24-jekyll-3-0-0-beta1-released.markdown │ ├── 2016-01-28-jekyll-3-1-1-released.markdown │ ├── 2017-08-12-jekyll-3-5-2-released.markdown │ ├── 2014-09-09-jekyll-2-4-0-released.markdown │ └── 2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown ├── _sass │ ├── _font-awesome.scss │ └── _mixins.scss ├── readme.md ├── 404.html ├── community │ └── index.md └── _config.yml ├── test ├── safe_glob_test[ │ └── find_me.txt ├── source │ ├── _includes │ │ ├── tmp │ │ ├── include.html │ │ ├── sig.markdown │ │ └── params.html │ ├── symlink-test │ │ ├── _data │ │ ├── symlinked-dir │ │ └── symlinked-file │ ├── _data │ │ ├── products.yml │ │ ├── languages.yml │ │ ├── categories │ │ │ └── dairy.yaml │ │ ├── categories.01 │ │ │ └── dairy.yaml │ │ ├── members.yaml │ │ └── members.json │ ├── _methods │ │ ├── um_hi.md │ │ ├── with.dots │ │ │ ├── .htaccess │ │ │ └── .gitignore │ │ ├── site │ │ │ ├── initialize.md │ │ │ ├── generate.md │ │ │ └── _dont_include_me_either.md │ │ ├── escape-+ #%20[].md │ │ ├── 3940394-21-9393050-fifif1323-test.md │ │ ├── _do_not_read_me.md │ │ ├── sanitized_path.md │ │ ├── collection │ │ │ └── entries │ │ ├── yaml_with_dots.md │ │ └── configuration.md │ ├── _layouts │ │ ├── simple.html │ │ ├── post │ │ │ └── simple.html │ │ └── default.html │ ├── _sass │ │ └── _grid.scss │ ├── _includes_custom │ │ └── custom.html │ ├── _posts │ │ ├── 2009-06-22-no-yaml.markdown │ │ ├── 2013-03-19-not-a-post.markdown │ │ │ └── .gitkeep │ │ ├── 2011-04-12-text-extension.text │ │ ├── 2013-08-01-mkdn-extension.mkdn │ │ ├── 2014-11-24-Rmd-extension.Rmd │ │ ├── 2009-06-22-empty-yaml.markdown │ │ ├── include_relative │ │ │ ├── rel_include.html │ │ │ └── params.html │ │ ├── 2009-05-18-empty-tag.markdown │ │ ├── 2009-05-18-tag.markdown │ │ ├── 2010-01-08-triple-dash.markdown │ │ ├── 2009-05-18-empty-tags.markdown │ │ ├── 2015-12-27-extra-spaces.markdown │ │ ├── 2009-03-12-hash-#1.markdown │ │ ├── 2014-03-03-yaml-with-dots.md │ │ ├── 2014-01-06-permalink-traversal.md │ │ ├── 2013-01-12-nil-layout.markdown │ │ ├── 2009-01-27-no-category.markdown │ │ ├── 2014-03-22-escape-+ %20[].markdown │ │ ├── 2010-01-16-override-data.markdown │ │ ├── 2008-10-18-foo-bar.markdown │ │ ├── 2013-01-12-no-layout.markdown │ │ ├── 2009-01-27-category.markdown │ │ ├── 2009-01-27-empty-category.markdown │ │ ├── 2009-05-18-tags.markdown │ │ ├── 2008-12-13-include.markdown │ │ ├── 2009-01-27-empty-categories.markdown │ │ ├── 2008-02-02-published.markdown │ │ ├── 2013-05-10-number-category.markdown │ │ ├── 2008-11-21-complex.markdown │ │ ├── 2009-01-27-categories.markdown │ │ ├── 2010-01-09-date-override.markdown │ │ ├── 2015-02-20-extensionless-permalink.markdown │ │ ├── 2010-01-09-time-override.markdown │ │ ├── 2014-07-05-mixed-case-category.markdown │ │ ├── es │ │ │ └── 2008-11-21-nested.markdown │ │ ├── 2016-11-26-special-chars-(+).markdown │ │ ├── 2008-02-02-not-published.markdown │ │ ├── 2014-07-05-another-mixed-case-category.markdown │ │ ├── 2017-2-5-i-dont-like-zeroes.md │ │ ├── 2010-01-09-timezone-override.markdown │ │ ├── 2009-01-27-array-categories.markdown │ │ ├── 2008-12-03-permalinked-post.markdown │ │ ├── 2013-12-20-properties.text │ │ ├── 2013-04-11-custom-excerpt.markdown │ │ ├── 2013-01-02-post-excerpt.markdown │ │ ├── 2015-01-08-post-excerpt-separator.markdown │ │ ├── 2011-04-12-md-extension.md │ │ ├── 2013-07-22-post-excerpt-with-layout.markdown │ │ ├── 2016-08-16-indented-link-references.markdown │ │ ├── 2013-12-17-include-variable-filters.markdown │ │ └── 2014-09-02-relative-includes.markdown │ ├── assets │ │ ├── base.js │ │ └── application.coffee │ ├── css │ │ ├── main.scss │ │ └── screen.css │ ├── _thanksgiving │ │ ├── black-friday.md │ │ └── 2015-11-26-thanksgiving.md │ ├── _with.dots │ │ ├── all.dots │ │ │ └── 2.4.0.md │ │ ├── file.with.dots.md │ │ ├── mit.txt │ │ └── permalink.with.slash.tho.md │ ├── _broken │ │ └── bad_post.md │ ├── _slides │ │ ├── example-slide-5.html │ │ ├── example-slide-1.html │ │ ├── octojekyll.png │ │ ├── example-slide-Upper-Cased.html │ │ ├── example-slide-3.html │ │ ├── example-slide-2.html │ │ ├── non-outputted-slide.html │ │ ├── example-slide-7.md │ │ ├── example-slide-4.html │ │ └── example-slide-6.html │ ├── products.yml │ ├── about.html │ ├── contacts.html │ ├── exploit.md │ ├── _config.dev.toml │ ├── contacts │ │ ├── bar.html │ │ ├── index.html │ │ └── humans.txt │ ├── pgp.key │ ├── environment.html │ ├── info.md │ ├── _urls_differ_by_case_invalid │ │ ├── page1.html │ │ └── page2.html │ ├── _urls_differ_by_case_valid │ │ └── page1.html │ ├── deal.with.dots.html │ ├── dynamic_file.php │ ├── + │ │ ├── %# +.md │ │ └── foo.md │ ├── category │ │ └── _posts │ │ │ └── 2008-09-23-categories.markdown │ ├── _encodings │ │ ├── Unicode16LECRLFandBOM.md │ │ └── UTF8CRLFandBOM.md │ ├── unpublished.html │ ├── properties.html │ ├── win │ │ └── _posts │ │ │ └── 2009-05-24-yaml-linebreak.markdown │ ├── z_category │ │ └── _posts │ │ │ └── 2008-09-23-categories.markdown │ ├── foo │ │ └── _posts │ │ │ └── bar │ │ │ └── 2008-12-12-topical-post.markdown │ ├── .htaccess │ ├── _plugins │ │ └── dummy.rb │ ├── static_files.html │ ├── _drafts │ │ └── draft-properties.text │ ├── _config_folded.yml │ ├── js │ │ └── coffeescript.coffee │ ├── index.html │ └── sitemap.xml ├── fixtures │ ├── test-theme │ │ ├── _symlink │ │ ├── assets │ │ │ ├── img │ │ │ │ ├── another-logo.png │ │ │ │ └── logo.png │ │ │ ├── base.js │ │ │ ├── application.coffee │ │ │ └── style.scss │ │ ├── _sass │ │ │ ├── test-theme-red.scss │ │ │ └── test-theme-black.scss │ │ ├── _layouts │ │ │ └── default.html │ │ ├── _includes │ │ │ └── include.html │ │ └── test-theme.gemspec │ ├── empty_permalink.erb │ ├── front_matter.erb │ ├── broken_front_matter2.erb │ ├── exploit_front_matter.erb │ ├── broken_front_matter1.erb │ ├── broken_front_matter3.erb │ └── test-dependency-theme │ │ └── test-dependency-theme.gemspec ├── simplecov_custom_profile.rb ├── test_data_reader.rb ├── test_site_drop.rb ├── test_ansi.rb ├── test_command.rb ├── test_liquid_renderer.rb ├── test_sass.rb ├── test_liquid_extensions.rb ├── test_rdiscount.rb ├── test_layout_reader.rb ├── test_coffeescript.rb ├── test_excerpt_drop.rb └── test_doctor_command.rb ├── lib ├── theme_template │ ├── _layouts │ │ ├── default.html │ │ ├── page.html │ │ └── post.html │ ├── example │ │ ├── _config.yml.erb │ │ ├── style.scss │ │ ├── _post.md │ │ └── index.html │ ├── gitignore.erb │ ├── Gemfile │ ├── theme.gemspec.erb │ └── LICENSE.txt.erb ├── site_template │ ├── .gitignore │ ├── index.md │ ├── 404.html │ ├── about.md │ └── _posts │ │ └── 0000-00-00-welcome-to-jekyll.markdown.erb └── jekyll │ ├── version.rb │ ├── generator.rb │ ├── drops │ ├── excerpt_drop.rb │ ├── static_file_drop.rb │ ├── collection_drop.rb │ ├── unified_payload_drop.rb │ ├── jekyll_drop.rb │ └── site_drop.rb │ ├── converters │ ├── identity.rb │ ├── smartypants.rb │ └── markdown │ │ └── rdiscount_parser.rb │ ├── utils │ ├── rouge.rb │ ├── exec.rb │ └── internet.rb │ ├── publisher.rb │ ├── readers │ ├── collection_reader.rb │ ├── static_file_reader.rb │ ├── page_reader.rb │ └── theme_assets_reader.rb │ ├── liquid_extensions.rb │ ├── errors.rb │ ├── commands │ ├── help.rb │ ├── new_theme.rb │ └── clean.rb │ ├── tags │ └── link.rb │ ├── liquid_renderer.rb │ ├── related_posts.rb │ ├── liquid_renderer │ └── file.rb │ └── stevenson.rb ├── .jrubyrc ├── script ├── bootstrap ├── cucumber ├── fmt ├── cibuild ├── rubies ├── rubyprof ├── branding ├── default-site ├── proof ├── console ├── test ├── travis ├── stackprof └── vendor-mimes ├── .github ├── first-timers.yml └── SUPPORT.markdown ├── benchmark ├── symbol-to-proc ├── string-concat ├── sequential-assignment ├── proc-call-vs-yield ├── hash-fetch ├── string-replacement ├── flat-map ├── capture-assign.rb ├── end-with-vs-regexp └── file-dir-ensure-trailing-slash ├── .editorconfig ├── .gitignore ├── .codeclimate.yml ├── rake ├── docs.rake └── release.rake ├── features └── highlighting.feature ├── appveyor.yml ├── LICENSE └── .travis.yml /docs/CNAME: -------------------------------------------------------------------------------- 1 | jekyllrb.com 2 | -------------------------------------------------------------------------------- /docs/latest_version.txt: -------------------------------------------------------------------------------- 1 | 3.6.2 2 | -------------------------------------------------------------------------------- /test/safe_glob_test[/find_me.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/source/_includes/tmp: -------------------------------------------------------------------------------- 1 | ../../../tmp/ -------------------------------------------------------------------------------- /test/source/symlink-test/_data: -------------------------------------------------------------------------------- 1 | ../_data -------------------------------------------------------------------------------- /test/fixtures/test-theme/_symlink: -------------------------------------------------------------------------------- 1 | _layouts -------------------------------------------------------------------------------- /test/source/_data/products.yml: -------------------------------------------------------------------------------- 1 | ../products.yml -------------------------------------------------------------------------------- /test/source/_includes/include.html: -------------------------------------------------------------------------------- 1 | included 2 | -------------------------------------------------------------------------------- /test/source/_methods/um_hi.md: -------------------------------------------------------------------------------- 1 | ./site/generate.md -------------------------------------------------------------------------------- /test/source/symlink-test/symlinked-dir: -------------------------------------------------------------------------------- 1 | ../css -------------------------------------------------------------------------------- /test/source/_data/languages.yml: -------------------------------------------------------------------------------- 1 | - java 2 | - ruby 3 | -------------------------------------------------------------------------------- /test/source/_layouts/simple.html: -------------------------------------------------------------------------------- 1 | <<< {{ content }} >>> -------------------------------------------------------------------------------- /test/source/_sass/_grid.scss: -------------------------------------------------------------------------------- 1 | .half { width: 50%; } -------------------------------------------------------------------------------- /test/source/symlink-test/symlinked-file: -------------------------------------------------------------------------------- 1 | ../index.html -------------------------------------------------------------------------------- /lib/theme_template/_layouts/default.html: -------------------------------------------------------------------------------- 1 | {{ content }} 2 | -------------------------------------------------------------------------------- /test/source/_includes_custom/custom.html: -------------------------------------------------------------------------------- 1 | custom_included -------------------------------------------------------------------------------- /test/source/_posts/2009-06-22-no-yaml.markdown: -------------------------------------------------------------------------------- 1 | No YAML. -------------------------------------------------------------------------------- /test/source/_posts/2013-03-19-not-a-post.markdown/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/source/assets/base.js: -------------------------------------------------------------------------------- 1 | alert("From your site."); 2 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | _site/ 2 | *.swp 3 | pkg/ 4 | test/ 5 | .idea/ -------------------------------------------------------------------------------- /test/fixtures/test-theme/assets/img/another-logo.png: -------------------------------------------------------------------------------- 1 | logo.png -------------------------------------------------------------------------------- /test/source/_layouts/post/simple.html: -------------------------------------------------------------------------------- 1 | <<< {{ content }} >>> 2 | -------------------------------------------------------------------------------- /test/source/_methods/with.dots/.htaccess: -------------------------------------------------------------------------------- 1 | I should be copied 2 | -------------------------------------------------------------------------------- /test/source/css/main.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "grid"; -------------------------------------------------------------------------------- /test/source/_methods/with.dots/.gitignore: -------------------------------------------------------------------------------- 1 | I should be copied 2 | -------------------------------------------------------------------------------- /lib/theme_template/example/_config.yml.erb: -------------------------------------------------------------------------------- 1 | theme: <%= theme_name %> 2 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/assets/base.js: -------------------------------------------------------------------------------- 1 | alert("From your theme."); 2 | -------------------------------------------------------------------------------- /test/source/_posts/2011-04-12-text-extension.text: -------------------------------------------------------------------------------- 1 | Best **post** ever 2 | -------------------------------------------------------------------------------- /test/source/_posts/2013-08-01-mkdn-extension.mkdn: -------------------------------------------------------------------------------- 1 | Best **post** ever 2 | -------------------------------------------------------------------------------- /test/source/_posts/2014-11-24-Rmd-extension.Rmd: -------------------------------------------------------------------------------- 1 | Best **post** ever 2 | -------------------------------------------------------------------------------- /lib/site_template/.gitignore: -------------------------------------------------------------------------------- 1 | _site 2 | .sass-cache 3 | .jekyll-metadata 4 | -------------------------------------------------------------------------------- /test/source/_posts/2009-06-22-empty-yaml.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | Empty YAML. -------------------------------------------------------------------------------- /test/source/_posts/include_relative/rel_include.html: -------------------------------------------------------------------------------- 1 | relative_included 2 | -------------------------------------------------------------------------------- /test/source/_thanksgiving/black-friday.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | {{ page.title }} 4 | -------------------------------------------------------------------------------- /.jrubyrc: -------------------------------------------------------------------------------- 1 | backtrace.mask=true 2 | backtrace.color=true 3 | backtrace.style=mri 4 | -------------------------------------------------------------------------------- /test/source/assets/application.coffee: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | alert "From your site." 4 | -------------------------------------------------------------------------------- /script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | script/branding 4 | bundle install -j8 5 | -------------------------------------------------------------------------------- /test/fixtures/empty_permalink.erb: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: '' 3 | --- 4 | Empty Permalink 5 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/_sass/test-theme-red.scss: -------------------------------------------------------------------------------- 1 | .sample { 2 | color: red; 3 | } 4 | -------------------------------------------------------------------------------- /test/source/_includes/sig.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | Tom Preston-Werner 3 | github.com/mojombo 4 | -------------------------------------------------------------------------------- /test/source/_methods/site/initialize.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | Page without title. 5 | -------------------------------------------------------------------------------- /test/source/_with.dots/all.dots/2.4.0.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: v2.4.0 3 | --- 4 | 5 | v2.4.0 -------------------------------------------------------------------------------- /test/source/_with.dots/file.with.dots.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | I'm a file with dots. 5 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/favicon.ico -------------------------------------------------------------------------------- /test/fixtures/front_matter.erb: -------------------------------------------------------------------------------- 1 | --- 2 | test: good 3 | --- 4 | Real content starts here 5 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/_sass/test-theme-black.scss: -------------------------------------------------------------------------------- 1 | .sample { 2 | color: black; 3 | } 4 | -------------------------------------------------------------------------------- /test/source/_broken/bad_post.md: -------------------------------------------------------------------------------- 1 | --- 2 | bad yaml: [ 3 | --- 4 | Real content starts here 5 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-5.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: slide 3 | --- 4 | 5 | Wooot 6 | -------------------------------------------------------------------------------- /test/source/products.yml: -------------------------------------------------------------------------------- 1 | - name: sugar 2 | price: 5.3 3 | - name: salt 4 | price: 2.5 5 | -------------------------------------------------------------------------------- /docs/img/logo-2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/logo-2x.png -------------------------------------------------------------------------------- /lib/theme_template/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {{ content }} 6 | -------------------------------------------------------------------------------- /lib/theme_template/_layouts/post.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | {{ content }} 6 | -------------------------------------------------------------------------------- /lib/theme_template/gitignore.erb: -------------------------------------------------------------------------------- 1 | *.gem 2 | .bundle 3 | .sass-cache 4 | _site 5 | Gemfile.lock 6 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/_layouts/default.html: -------------------------------------------------------------------------------- 1 | default.html from test-theme: {{ content }} 2 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/assets/application.coffee: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | alert "From your theme." 4 | -------------------------------------------------------------------------------- /test/source/_thanksgiving/2015-11-26-thanksgiving.md: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | Happy {{ page.title }} ! 4 | -------------------------------------------------------------------------------- /docs/img/logo-rss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/logo-rss.png -------------------------------------------------------------------------------- /docs/img/octojekyll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/octojekyll.png -------------------------------------------------------------------------------- /test/fixtures/broken_front_matter2.erb: -------------------------------------------------------------------------------- 1 | --- 2 | bad yaml: [ 3 | --- 4 | Real content starts here 5 | -------------------------------------------------------------------------------- /test/source/about.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | permalink: /about/ 4 | --- 5 | 6 | About the site 7 | -------------------------------------------------------------------------------- /test/source/contacts.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact Information 3 | --- 4 | 5 | Contact Information 6 | -------------------------------------------------------------------------------- /test/source/exploit.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /%2e%2e/%2e%2e/%2e%2e/baddie.html 3 | --- 4 | 5 | # Test 6 | -------------------------------------------------------------------------------- /docs/img/footer-arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/footer-arrow.png -------------------------------------------------------------------------------- /docs/img/footer-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/footer-logo.png -------------------------------------------------------------------------------- /docs/img/twitter-card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/twitter-card.png -------------------------------------------------------------------------------- /test/fixtures/test-theme/_includes/include.html: -------------------------------------------------------------------------------- 1 | include.html from test-theme 2 | -------------------------------------------------------------------------------- /test/source/_config.dev.toml: -------------------------------------------------------------------------------- 1 | baseurl = "/you-beautiful-blog-you" 2 | title = "My magnificent site, wut" 3 | -------------------------------------------------------------------------------- /test/source/_methods/escape-+ #%20[].md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll.escape" 3 | --- 4 | 5 | Signs are nice 6 | -------------------------------------------------------------------------------- /test/source/_posts/2009-05-18-empty-tag.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: A Tag 3 | tag: 4 | --- 5 | 6 | Whoa. 7 | -------------------------------------------------------------------------------- /test/source/_posts/2009-05-18-tag.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: A Tag 3 | tag: code 4 | --- 5 | 6 | Whoa. 7 | -------------------------------------------------------------------------------- /test/source/_with.dots/mit.txt: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | I should be output to `/with.dots/mit/index.html`. 5 | -------------------------------------------------------------------------------- /test/source/contacts/bar.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact Information 3 | --- 4 | 5 | Contact Information 6 | -------------------------------------------------------------------------------- /test/source/contacts/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Contact Information 3 | --- 4 | 5 | Contact Information 6 | -------------------------------------------------------------------------------- /test/source/pgp.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | Version: GnuPG/MacGPG2 v2.0.17 (Darwin) 3 | -------------------------------------------------------------------------------- /docs/fonts/FontAwesome.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/fonts/FontAwesome.eot -------------------------------------------------------------------------------- /docs/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /docs/fonts/FontAwesome.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/fonts/FontAwesome.woff -------------------------------------------------------------------------------- /docs/img/article-footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/article-footer.png -------------------------------------------------------------------------------- /docs/img/jekyll-sticker.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/jekyll-sticker.jpg -------------------------------------------------------------------------------- /lib/theme_template/Gemfile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | source "https://rubygems.org" 4 | gemspec 5 | -------------------------------------------------------------------------------- /script/cucumber: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | time ruby -S bundle exec cucumber \ 4 | --format progress "$@" 5 | -------------------------------------------------------------------------------- /test/source/_posts/2010-01-08-triple-dash.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: Foo --- Bar 3 | --- 4 | 5 | Triple the fun! -------------------------------------------------------------------------------- /lib/jekyll/version.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | VERSION = "3.6.0".freeze 5 | end 6 | -------------------------------------------------------------------------------- /test/source/_methods/3940394-21-9393050-fifif1323-test.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "this is a test!" 3 | --- 4 | 5 | wheee 6 | -------------------------------------------------------------------------------- /test/source/_posts/2009-05-18-empty-tags.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: Some Tags 3 | tags: 4 | --- 5 | 6 | Awesome! 7 | -------------------------------------------------------------------------------- /test/source/_posts/2015-12-27-extra-spaces.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | extra: spaces 3 | --- 4 | 5 | Best **post** ever 6 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-1.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Example slide 3 | layout: slide 4 | --- 5 | 6 | Wooot 7 | -------------------------------------------------------------------------------- /docs/img/jekylllayoutconcept.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/docs/img/jekylllayoutconcept.png -------------------------------------------------------------------------------- /docs/redirects/github.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /github.html 3 | redirect_to: https://github.com/jekyll/jekyll 4 | --- 5 | -------------------------------------------------------------------------------- /test/fixtures/exploit_front_matter.erb: -------------------------------------------------------------------------------- 1 | --- 2 | test: !ruby/hash:DoesNotExist {} 3 | --- 4 | Real content starts here 5 | -------------------------------------------------------------------------------- /docs/redirects/issues.html: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /issues.html 3 | redirect_to: https://github.com/jekyll/jekyll/issues 4 | --- 5 | -------------------------------------------------------------------------------- /lib/jekyll/generator.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | Generator = Class.new(Plugin) 5 | end 6 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/assets/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | @import "test-theme-{{ site.theme-color | default: "red" }}"; 4 | -------------------------------------------------------------------------------- /test/source/_posts/2009-03-12-hash-#1.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Hash #1 4 | --- 5 | 6 | Hashes are nice 7 | -------------------------------------------------------------------------------- /test/source/_posts/2014-03-03-yaml-with-dots.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Test Post Where YAML Ends in Dots 3 | ... 4 | 5 | # Test 6 | -------------------------------------------------------------------------------- /test/source/_slides/octojekyll.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/test/source/_slides/octojekyll.png -------------------------------------------------------------------------------- /test/source/environment.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: I'm a Jekyll environment exchequer 3 | --- 4 | 5 | {{ jekyll.environment }} 6 | -------------------------------------------------------------------------------- /test/source/info.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Information 3 | --- 4 | 5 | # Information 6 | 7 | Very important information is here 8 | -------------------------------------------------------------------------------- /test/fixtures/broken_front_matter1.erb: -------------------------------------------------------------------------------- 1 | # Some stuff on the first line 2 | --- 3 | test: good 4 | --- 5 | Real content starts here 6 | -------------------------------------------------------------------------------- /test/fixtures/broken_front_matter3.erb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/test/fixtures/broken_front_matter3.erb -------------------------------------------------------------------------------- /test/source/_methods/_do_not_read_me.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: The unreadable wonder 3 | --- 4 | 5 | Don't read me, you fool! FILTER ME 6 | -------------------------------------------------------------------------------- /test/source/_posts/2014-01-06-permalink-traversal.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /%2e%2e/%2e%2e/%2e%2e/baddie.html 3 | --- 4 | 5 | # Test 6 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-Upper-Cased.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Example Slide 3 | layout: slide 4 | --- 5 | 6 | Cased! 7 | -------------------------------------------------------------------------------- /test/source/_urls_differ_by_case_invalid/page1.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | permalink: /about/ 4 | --- 5 | 6 | About the site 7 | -------------------------------------------------------------------------------- /test/source/_urls_differ_by_case_invalid/page2.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | permalink: /About/ 4 | --- 5 | 6 | About the site 7 | -------------------------------------------------------------------------------- /test/source/_urls_differ_by_case_valid/page1.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: About 3 | permalink: /about/ 4 | --- 5 | 6 | About the site 7 | -------------------------------------------------------------------------------- /test/source/deal.with.dots.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Deal with dots 3 | --- 4 | 5 | Let's test if jekyll deals properly with dots. 6 | -------------------------------------------------------------------------------- /test/source/_data/categories/dairy.yaml: -------------------------------------------------------------------------------- 1 | name: Dairy 2 | products: 3 | - name: cheese 4 | price: 5.3 5 | - name: milk 6 | price: 2.5 -------------------------------------------------------------------------------- /test/source/_posts/2013-01-12-nil-layout.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | title: No layout 4 | --- 5 | 6 | This post has no layout. 7 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-3.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Override permalink 3 | layout: slide 4 | permalink: /slide/3/ 5 | --- 6 | -------------------------------------------------------------------------------- /test/source/dynamic_file.php: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | I'm a Jekyll file! I should be output as dynamic_file.php, no .html to be found. 5 | -------------------------------------------------------------------------------- /test/source/+/%# +.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title : Page name with non-alphabetic character 4 | --- 5 | Line 1 6 | {{ page.title }} 7 | -------------------------------------------------------------------------------- /test/source/_data/categories.01/dairy.yaml: -------------------------------------------------------------------------------- 1 | name: Dairy 2 | products: 3 | - name: cheese 4 | price: 5.5 5 | - name: milk 6 | price: 2.75 7 | -------------------------------------------------------------------------------- /test/source/_posts/2009-01-27-no-category.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Category in YAML 4 | --- 5 | 6 | Best *post* ever 7 | -------------------------------------------------------------------------------- /test/source/_posts/2014-03-22-escape-+ %20[].markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Plus space percent 4 | --- 5 | 6 | Signs are nice 7 | -------------------------------------------------------------------------------- /test/source/contacts/humans.txt: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /contacts/humans/ 3 | --- 4 | 5 | I should be output to `/contacts/humans/index.html`. 6 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/assets/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/test/fixtures/test-theme/assets/img/logo.png -------------------------------------------------------------------------------- /test/source/_methods/site/generate.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Site#generate" 3 | layout: default 4 | --- 5 | 6 | Run your generators! {{ page.layout }} 7 | -------------------------------------------------------------------------------- /test/source/_posts/2010-01-16-override-data.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2010-01-10 13:07:09 3 | tags: A string 4 | --- 5 | 6 | Best **post** ever 7 | -------------------------------------------------------------------------------- /test/source/category/_posts/2008-09-23-categories.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Categories 4 | --- 5 | 6 | Categories _should_ work -------------------------------------------------------------------------------- /test/source/+/foo.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title : Page inside + 4 | permalink: /+/plus+in+url.html 5 | --- 6 | Line 1 7 | {{ page.title }} 8 | -------------------------------------------------------------------------------- /test/source/_encodings/Unicode16LECRLFandBOM.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Adrianotiger/jekyll/master/test/source/_encodings/Unicode16LECRLFandBOM.md -------------------------------------------------------------------------------- /test/source/_methods/site/_dont_include_me_either.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Don't Include Me Either 3 | --- 4 | 5 | Don't include me either. FILTER ME PLZ 6 | -------------------------------------------------------------------------------- /test/source/_posts/2008-10-18-foo-bar.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Foo Bar 4 | --- 5 | 6 | # {{ page.title }} 7 | 8 | Best **post** ever -------------------------------------------------------------------------------- /test/source/_posts/2013-01-12-no-layout.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: I have no layout 3 | --- 4 | 5 | This post will be rendered with the "post" layout. 6 | -------------------------------------------------------------------------------- /test/source/unpublished.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Not published! 4 | published: false 5 | --- 6 | 7 | This should *not* be published! 8 | -------------------------------------------------------------------------------- /test/source/_posts/2009-01-27-category.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Category in YAML 4 | category: foo 5 | --- 6 | 7 | Best *post* ever 8 | -------------------------------------------------------------------------------- /test/source/_posts/2009-01-27-empty-category.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Category in YAML 4 | category: 5 | --- 6 | 7 | Best *post* ever 8 | -------------------------------------------------------------------------------- /test/source/_posts/2009-05-18-tags.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: Some Tags 3 | tags: 4 | - food 5 | - cooking 6 | - pizza 7 | --- 8 | 9 | Awesome! 10 | -------------------------------------------------------------------------------- /test/source/_posts/2008-12-13-include.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Include 4 | --- 5 | 6 | {% include sig.markdown %} 7 | 8 | This _is_ cool 9 | -------------------------------------------------------------------------------- /test/source/_posts/2009-01-27-empty-categories.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Category in YAML 4 | categories: 5 | --- 6 | 7 | Best *post* ever 8 | -------------------------------------------------------------------------------- /test/source/properties.html: -------------------------------------------------------------------------------- 1 | --- 2 | foo: bar 3 | layout: default 4 | permalink: /properties/ 5 | title: Properties Page 6 | --- 7 | 8 | All the properties. 9 | -------------------------------------------------------------------------------- /test/source/win/_posts/2009-05-24-yaml-linebreak.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Test title" 4 | tag: "Ruby" 5 | --- 6 | 7 | This is the content -------------------------------------------------------------------------------- /test/source/_methods/sanitized_path.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll.sanitized_path" 3 | --- 4 | 5 | `{{ page.title }}` is used to make sure your path is in your source. 6 | -------------------------------------------------------------------------------- /test/source/_posts/2008-02-02-published.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Publish 4 | category: publish_test 5 | --- 6 | 7 | This should be published. 8 | -------------------------------------------------------------------------------- /test/source/_posts/2013-05-10-number-category.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Number Category in YAML 4 | category: 2013 5 | --- 6 | 7 | Please make me pass -------------------------------------------------------------------------------- /test/source/_slides/example-slide-2.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Override title 3 | layout: slide 4 | nested: 5 | test1: override1 6 | test2: override2 7 | --- 8 | -------------------------------------------------------------------------------- /test/source/_data/members.yaml: -------------------------------------------------------------------------------- 1 | - name: Jack 2 | age: 27 3 | blog: http://example.com/jack 4 | 5 | - name: John 6 | age: 32 7 | blog: http://example.com/john 8 | -------------------------------------------------------------------------------- /test/source/_methods/collection/entries: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Collection#entries" 3 | --- 4 | 5 | I have no file extension but I should still be a part of the collection. 6 | -------------------------------------------------------------------------------- /test/source/_posts/2008-11-21-complex.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Complex 4 | --- 5 | 6 | url: {{ page.url }} 7 | date: {{ page.date }} 8 | id: {{ page.id }} -------------------------------------------------------------------------------- /test/source/_posts/2009-01-27-categories.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Categories in YAML 4 | categories: foo bar baz 5 | --- 6 | 7 | Best *post* ever 8 | -------------------------------------------------------------------------------- /test/source/_posts/2010-01-09-date-override.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2010-01-10 3 | --- 4 | 5 | Post with a front matter date 6 | 7 | {{ page.date | date_to_string }} 8 | -------------------------------------------------------------------------------- /test/source/_slides/non-outputted-slide.html: -------------------------------------------------------------------------------- 1 | --- 2 | title: Non outputted slide 3 | layout: slide 4 | published: false 5 | --- 6 | 7 | This should not be output 8 | -------------------------------------------------------------------------------- /test/source/_posts/2015-02-20-extensionless-permalink.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ~ 3 | title: Extensionless Permalink 4 | permalink: /:title 5 | --- 6 | 7 | {{ page.url }} 8 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-7.md: -------------------------------------------------------------------------------- 1 | --- 2 | am_i_convertible: yes 3 | permalink: /slides/example-slide-7.php 4 | --- 5 | 6 | Am I convertible? {{ page.am_i_convertible }} 7 | -------------------------------------------------------------------------------- /test/source/z_category/_posts/2008-09-23-categories.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Categories 4 | --- 5 | 6 | Categories _should_ work. Even if ordered after index. -------------------------------------------------------------------------------- /.github/first-timers.yml: -------------------------------------------------------------------------------- 1 | repository: jekyll 2 | labels: 3 | - good first issue 4 | - help-wanted 5 | - first-time-only 6 | template: .github/first-timers-issue-template.md 7 | -------------------------------------------------------------------------------- /test/source/_posts/2010-01-09-time-override.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2010-01-10 13:07:09 3 | --- 4 | 5 | Post with a front matter time 6 | 7 | {{ page.date | date_to_string }} 8 | -------------------------------------------------------------------------------- /test/source/_posts/2014-07-05-mixed-case-category.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Mixed Case Category in YAML 4 | category: MixedCase 5 | --- 6 | 7 | Best *post* ever 8 | -------------------------------------------------------------------------------- /test/source/_posts/es/2008-11-21-nested.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Nested 4 | --- 5 | 6 | url: {{ page.url }} 7 | date: {{ page.date }} 8 | id: {{ page.id }} 9 | -------------------------------------------------------------------------------- /test/source/foo/_posts/bar/2008-12-12-topical-post.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Topical Post 4 | --- 5 | 6 | h1. {{ page.title }} 7 | 8 | This post has a topic. 9 | -------------------------------------------------------------------------------- /test/source/.htaccess: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | --- 4 | ErrorDocument 404 /404.html 5 | ErrorDocument 500 /500.html 6 | {% for post in site.posts %} 7 | # {{ post.url }} 8 | {% endfor %} -------------------------------------------------------------------------------- /docs/css/screen.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | @import "mixins"; 5 | @import "normalize"; 6 | @import "gridism"; 7 | @import "pygments"; 8 | @import "font-awesome"; 9 | @import "style"; 10 | -------------------------------------------------------------------------------- /test/source/_posts/2016-11-26-special-chars-(+).markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Special Characters 4 | --- 5 | 6 | url: {{ page.url }} 7 | date: {{ page.date }} 8 | id: {{ page.id }} -------------------------------------------------------------------------------- /test/source/_with.dots/permalink.with.slash.tho.md: -------------------------------------------------------------------------------- 1 | --- 2 | permalink: /with.dots/permalink.with.slash.tho/ 3 | --- 4 | 5 | I'm a file with dots BUT I have a permalink which ends with a slash. 6 | -------------------------------------------------------------------------------- /test/source/_plugins/dummy.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class Dummy < Generator 5 | priority :high 6 | 7 | def generate(site) end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /test/source/_posts/2008-02-02-not-published.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Not published! 4 | published: false 5 | category: publish_test 6 | --- 7 | 8 | This should *not* be published! 9 | -------------------------------------------------------------------------------- /test/source/_posts/2014-07-05-another-mixed-case-category.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Another Mixed Case Category in YAML 4 | category: Mixedcase 5 | --- 6 | 7 | Best *post* ever 8 | -------------------------------------------------------------------------------- /test/source/_posts/2017-2-5-i-dont-like-zeroes.md: -------------------------------------------------------------------------------- 1 | --- 2 | foo: bar 3 | --- 4 | I have an abbreviated date. Instead of "2017-02-05", I am instead "2017-2-5". 5 | Zeros have always seemed superfluous. 6 | -------------------------------------------------------------------------------- /docs/news/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news 3 | title: News 4 | permalink: /news/ 5 | author: all 6 | --- 7 | 8 | {% for post in site.posts %} 9 | {% include news_item.html %} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /test/source/_posts/2010-01-09-timezone-override.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2010-01-10 13:07:09 +00:00 3 | --- 4 | 5 | Post with a front matter time with timezone 6 | 7 | {{ page.date | date_to_string }} 8 | -------------------------------------------------------------------------------- /test/source/static_files.html: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | {% for file in site.static_files %} 4 | - {{ file.path }} last edited at {{ file.modified_time | date:"%H:%m" }} with extname {{ file.extname }}{% endfor %} 5 | -------------------------------------------------------------------------------- /test/source/_posts/2009-01-27-array-categories.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | title: Array categories in YAML 4 | categories: 5 | - foo 6 | - bar 7 | - baz 8 | --- 9 | 10 | Best *post* ever 11 | -------------------------------------------------------------------------------- /benchmark/symbol-to-proc: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | Benchmark.ips do |x| 5 | x.report('block') { (1..100).map { |i| i.to_s } } 6 | x.report('&:to_s') { (1..100).map(&:to_s) } 7 | end 8 | -------------------------------------------------------------------------------- /test/source/_includes/params.html: -------------------------------------------------------------------------------- 1 | {{include.param}} 2 | 3 | -------------------------------------------------------------------------------- /test/source/_methods/yaml_with_dots.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "YAML with Dots" 3 | whatever: foo.bar 4 | ... 5 | 6 | Use `{{ page.title }}` to build a full configuration for use w/Jekyll. 7 | 8 | Whatever: {{ page.whatever }} 9 | -------------------------------------------------------------------------------- /test/source/_methods/configuration.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll.configuration" 3 | whatever: foo.bar 4 | --- 5 | 6 | Use `{{ page.title }}` to build a full configuration for use w/Jekyll. 7 | 8 | Whatever: {{ page.whatever }} 9 | -------------------------------------------------------------------------------- /test/source/_posts/2008-12-03-permalinked-post.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: Post with Permalink 3 | permalink: my_category/permalinked-post 4 | --- 5 | 6 | h1. {{ page.title }} 7 | 8 | 9 |

Best post ever

-------------------------------------------------------------------------------- /benchmark/string-concat: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | url = "https://jekyllrb.com" 5 | 6 | Benchmark.ips do |x| 7 | x.report('+=') { url += '/' } 8 | x.report('<<') { url << '/' } 9 | end 10 | -------------------------------------------------------------------------------- /test/source/_drafts/draft-properties.text: -------------------------------------------------------------------------------- 1 | --- 2 | categories: foo bar baz 3 | foo: bar 4 | layout: default 5 | tags: ay bee cee 6 | title: Properties Draft 7 | --- 8 | 9 | All the properties. 10 | 11 | Plus an excerpt. 12 | -------------------------------------------------------------------------------- /test/source/_posts/include_relative/params.html: -------------------------------------------------------------------------------- 1 | {{include.param}} 2 | 3 | 8 | -------------------------------------------------------------------------------- /docs/news/releases/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news 3 | title: Releases 4 | permalink: /news/releases/ 5 | author: all 6 | --- 7 | 8 | {% for post in site.categories.release %} 9 | {% include news_item.html %} 10 | {% endfor %} 11 | -------------------------------------------------------------------------------- /test/source/_posts/2013-12-20-properties.text: -------------------------------------------------------------------------------- 1 | --- 2 | categories: foo bar baz MixedCase 3 | foo: bar 4 | layout: default 5 | tags: ay bee cee 6 | title: Properties Post 7 | --- 8 | 9 | All the properties. 10 | 11 | Plus an excerpt. 12 | -------------------------------------------------------------------------------- /test/source/_config_folded.yml: -------------------------------------------------------------------------------- 1 | folded_string: > 2 | This string of text will ignore 3 | newlines till the next key. 4 | foo: bar 5 | clean_folded_string: >- 6 | This string of text will ignore 7 | newlines till the next key. 8 | baz: foo 9 | -------------------------------------------------------------------------------- /test/source/_posts/2013-04-11-custom-excerpt.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ~ 3 | excerpt: 'I can set a custom excerpt' 4 | --- 5 | 6 | This is not my excerpt. 7 | 8 | Neither is this. 9 | 10 | I can use the excerpt: {{page.excerpt}} -------------------------------------------------------------------------------- /script/fmt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | echo "Rubocop $(bundle exec rubocop --version)" 3 | bundle exec rubocop -D $@ 4 | success=$? 5 | if ((success != 0)); then 6 | echo -e "\nTry running \`script/fmt -a\` to automatically fix errors" 7 | fi 8 | exit $success 9 | -------------------------------------------------------------------------------- /test/source/_data/members.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Jack", 4 | "age": 27, 5 | "blog": "http://example.com/jack" 6 | }, 7 | { 8 | "name": "John", 9 | "age": 32, 10 | "blog": "http://example.com/john" 11 | } 12 | ] 13 | -------------------------------------------------------------------------------- /lib/site_template/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | # You don't need to edit this file, it's empty on purpose. 3 | # Edit theme's home layout instead if you wanna make some changes 4 | # See: https://jekyllrb.com/docs/themes/#overriding-theme-defaults 5 | layout: home 6 | --- 7 | -------------------------------------------------------------------------------- /lib/theme_template/example/style.scss: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | // Here, you can test out the Sass/SCSS that you include in your theme. 5 | // Simply `@import` the necessary file(s) to get the proper styles on the site. 6 | // E.g.: 7 | // @import "a-file-from-my-theme"; 8 | -------------------------------------------------------------------------------- /test/source/_posts/2013-01-02-post-excerpt.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ~ 3 | title: Post Excerpt 4 | --- 5 | 6 | First paragraph with [link ref][link]. 7 | 8 | Second paragraph 9 | 10 | --- 11 | 12 | Third paragraph 13 | 14 | [link]: https://jekyllrb.com/ 15 | -------------------------------------------------------------------------------- /docs/_includes/docs_contents.html: -------------------------------------------------------------------------------- 1 |
2 | 8 |
9 | -------------------------------------------------------------------------------- /docs/_includes/docs_option.html: -------------------------------------------------------------------------------- 1 | {% for item in include.items %} 2 | {% assign item_url = item | prepend:"/docs/" | append:"/" %} 3 | {% assign doc = site.docs | where: "url", item_url | first %} 4 | 5 | {% endfor %} 6 | -------------------------------------------------------------------------------- /benchmark/sequential-assignment: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | Benchmark.ips do |x| 5 | x.report('parallel assignment') do 6 | a, b = 1, 2 7 | end 8 | x.report('multi-line assignment') do 9 | a = 1 10 | b = 2 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | charset = utf-8 7 | end_of_line = lf 8 | indent_size = 2 9 | indent_style = space 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | [*.md] 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /docs/_data/tutorials.yml: -------------------------------------------------------------------------------- 1 | - title: Tutorials 2 | tutorials: 3 | - home 4 | - video-walkthroughs 5 | - navigation 6 | - orderofinterpretation 7 | - custom-404-page 8 | - convert-site-to-jekyll 9 | 10 | #- title: Another section 11 | # tutorials: 12 | # - sample 13 | -------------------------------------------------------------------------------- /docs/_layouts/default.html: -------------------------------------------------------------------------------- 1 | {% include top.html %} 2 | 3 | 4 | {% include header.html %} 5 | 6 | {{ content }} 7 | 8 | {% include footer.html %} 9 | {% include anchor_links.html %} 10 | {% include analytics.html %} 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/source/js/coffeescript.coffee: -------------------------------------------------------------------------------- 1 | --- 2 | message: "I knew it!" 3 | --- 4 | 5 | $ -> 6 | list = [1, 2, 3, 4, 5] 7 | square = (x) -> x * x 8 | cube = (x) -> square(x) * x 9 | cubes = (math.cube num for num in list) 10 | 11 | alert "{{ page.message }}" if elvis? 12 | -------------------------------------------------------------------------------- /docs/_includes/tutorials_option.html: -------------------------------------------------------------------------------- 1 | {% for item in include.items %} 2 | {% assign item_url = item | prepend:"/tutorials/" | append:"/" %} 3 | {% assign tutorial = site.tutorials | where: "url", item_url | first %} 4 | 5 | {% endfor %} 6 | -------------------------------------------------------------------------------- /docs/_includes/tutorials_contents.html: -------------------------------------------------------------------------------- 1 |
2 | 10 |
11 | -------------------------------------------------------------------------------- /lib/jekyll/drops/excerpt_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Drops 5 | class ExcerptDrop < DocumentDrop 6 | def layout 7 | @obj.doc.data["layout"] 8 | end 9 | 10 | def excerpt 11 | nil 12 | end 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /benchmark/proc-call-vs-yield: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | def fast 5 | yield 6 | end 7 | 8 | def slow(&block) 9 | block.call 10 | end 11 | 12 | Benchmark.ips do |x| 13 | x.report('yield') { fast { (0..9).to_a } } 14 | x.report('block.call') { slow { (0..9).to_a } } 15 | end 16 | -------------------------------------------------------------------------------- /test/simplecov_custom_profile.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "simplecov" 4 | 5 | SimpleCov.profiles.define "gem" do 6 | add_filter "/test/" 7 | add_filter "/features/" 8 | add_filter "/autotest/" 9 | 10 | add_group "Binaries", "/bin/" 11 | add_group "Libraries", "/lib/" 12 | end 13 | -------------------------------------------------------------------------------- /test/source/_posts/2015-01-08-post-excerpt-separator.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: ~ 3 | title: Post Excerpt Separator 4 | excerpt_separator: "\n---\n" 5 | --- 6 | 7 | First paragraph with [link ref][link]. 8 | 9 | Second paragraph 10 | 11 | --- 12 | 13 | Third paragraph 14 | 15 | [link]: https://jekyllrb.com/ 16 | -------------------------------------------------------------------------------- /test/source/_posts/2011-04-12-md-extension.md: -------------------------------------------------------------------------------- 1 | --- 2 | date: 2011-04-12 13:07:09 3 | --- 4 | 5 | under default configuration, this post should get processed by the identity converter. By changing 6 | textile extension or markdown extension configuration parameters, you should be able to associate 7 | it with either of those converters -------------------------------------------------------------------------------- /docs/_includes/docs_ul.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /docs/_docs/migrations.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Blog migrations 3 | permalink: /docs/migrations/ 4 | --- 5 | 6 | If you’re switching to Jekyll from another blogging system, Jekyll’s importers 7 | can help you with the move. To learn more about importing your site to Jekyll, 8 | visit our [`jekyll-import` docs site](https://import.jekyllrb.com/docs/home/). 9 | -------------------------------------------------------------------------------- /docs/_includes/tutorials_ul.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.gem 2 | *.swp 3 | *~ 4 | .DS_Store 5 | .analysis 6 | .bundle/ 7 | .byebug_history 8 | .jekyll-metadata 9 | .ruby-gemset 10 | .ruby-version 11 | .sass-cache 12 | /test/source/file_name.txt 13 | /vendor 14 | Gemfile.lock 15 | _site/ 16 | bin/ 17 | bbin/ 18 | coverage 19 | gh-pages/ 20 | pkg/ 21 | site/_site/ 22 | test/dest 23 | tmp/* 24 | -------------------------------------------------------------------------------- /benchmark/hash-fetch: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | h = {:bar => 'uco'} 5 | 6 | Benchmark.ips do |x| 7 | x.report('fetch with no block') { h.fetch(:bar, (0..9).to_a) } 8 | x.report('fetch with a block') { h.fetch(:bar) { (0..9).to_a } } 9 | x.report('brackets with an ||') { h[:bar] || (0..9).to_a } 10 | end 11 | -------------------------------------------------------------------------------- /script/cibuild: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | script/branding 4 | 5 | set -e 6 | 7 | if [[ -z "$TEST_SUITE" ]] 8 | then 9 | script/fmt 10 | script/test ci 11 | script/cucumber 12 | script/default-site 13 | elif [[ -x "script/$TEST_SUITE" ]] 14 | then 15 | script/$TEST_SUITE 16 | else 17 | echo "Unknown test suite." 18 | exit 1 19 | fi 20 | -------------------------------------------------------------------------------- /docs/_layouts/page.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | 8 |
9 |
10 |

{{ page.title }}

11 | {{ content }} 12 |
13 |
14 | 15 |
16 | 17 |
18 |
19 | -------------------------------------------------------------------------------- /docs/_layouts/news.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
6 |
7 | 8 | {% include news_contents_mobile.html %} 9 | 10 |
11 | {{ content }} 12 |
13 | 14 | {% include news_contents.html %} 15 | 16 |
17 | 18 |
19 |
20 | -------------------------------------------------------------------------------- /test/fixtures/test-theme/test-theme.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Gem::Specification.new do |s| 4 | s.name = "test-theme" 5 | s.version = "0.1.0" 6 | s.licenses = ["MIT"] 7 | s.summary = "This is a theme used to test Jekyll" 8 | s.authors = ["Jekyll"] 9 | s.files = ["lib/example.rb"] 10 | s.homepage = "https://github.com/jekyll/jekyll" 11 | end 12 | -------------------------------------------------------------------------------- /test/source/_posts/2013-07-22-post-excerpt-with-layout.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: Post Excerpt with Layout 4 | categories: 5 | - bar 6 | - baz 7 | - z_category 8 | - MixedCase 9 | tags: 10 | - first 11 | - second 12 | - third 13 | - jekyllrb.com 14 | --- 15 | 16 | First paragraph with [link ref][link]. 17 | 18 | Second paragraph 19 | 20 | --- 21 | 22 | Third paragraph 23 | 24 | [link]: https://jekyllrb.com/ 25 | -------------------------------------------------------------------------------- /lib/jekyll/drops/static_file_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Drops 5 | class StaticFileDrop < Drop 6 | extend Forwardable 7 | def_delegators :@obj, :name, :extname, :modified_time, :basename 8 | def_delegator :@obj, :relative_path, :path 9 | def_delegator :@obj, :data, :fallback_data 10 | def_delegator :@obj, :type, :collection 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /docs/_includes/docs_contents_mobile.html: -------------------------------------------------------------------------------- 1 |
2 | 10 |
11 | -------------------------------------------------------------------------------- /lib/jekyll/converters/identity.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Converters 5 | class Identity < Converter 6 | safe true 7 | 8 | priority :lowest 9 | 10 | def matches(_ext) 11 | true 12 | end 13 | 14 | def output_ext(ext) 15 | ext 16 | end 17 | 18 | def convert(content) 19 | content 20 | end 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /docs/_docs/continuous-integration/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Continuous Integration 3 | permalink: /docs/continuous-integration/ 4 | --- 5 | 6 | Continuous Integration (CI) enables you to publish your Jekyll generated website with confidence by automating the quality assurance and deployment processes. You can quickly get started using CI with one of the providers below: 7 | 8 | * [Travis CI](travis-ci) 9 | * [CircleCI](circleci) 10 | * [Buddy](buddyworks) 11 | -------------------------------------------------------------------------------- /docs/_includes/tutorials_contents_mobile.html: -------------------------------------------------------------------------------- 1 |
2 | 10 |
11 | -------------------------------------------------------------------------------- /test/test_data_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestDataReader < JekyllUnitTest 6 | context "#sanitize_filename" do 7 | setup do 8 | @reader = DataReader.new(fixture_site) 9 | end 10 | 11 | should "remove evil characters" do 12 | assert_equal "helpwhathaveIdone", @reader.sanitize_filename( 13 | "help/what^&$^#*(!^%*!#haveId&&&&&&&&&one" 14 | ) 15 | end 16 | end 17 | end 18 | -------------------------------------------------------------------------------- /benchmark/string-replacement: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | def str 5 | 'http://baruco.org/2014/some-talk-with-some-amount-of-value' 6 | end 7 | 8 | Benchmark.ips do |x| 9 | x.report('#tr') { str.tr('some', 'a') } 10 | x.report('#gsub') { str.gsub('some', 'a') } 11 | x.report('#gsub!') { str.gsub!('some', 'a') } 12 | x.report('#sub') { str.sub('some', 'a') } 13 | x.report('#sub!') { str.sub!('some', 'a') } 14 | end 15 | -------------------------------------------------------------------------------- /docs/_includes/news_contents_mobile.html: -------------------------------------------------------------------------------- 1 |
2 | 11 |
12 | -------------------------------------------------------------------------------- /test/source/_posts/2016-08-16-indented-link-references.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | --- 3 | 4 | This is the first paragraph. It [has][link_0] [lots][link_1] [of][link_2] 5 | [links][link_3]. 6 | 7 | This is the second paragraph. It has sample code that should not be extracted: 8 | 9 | [fakelink]: www.invalid.com 10 | 11 | And here are the real links: 12 | 13 | [link_0]: www.example.com/0 14 | [link_1]: www.example.com/1 15 | [link_2]: www.example.com/2 16 | [link_3]: www.example.com/3 17 | -------------------------------------------------------------------------------- /test/fixtures/test-dependency-theme/test-dependency-theme.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Gem::Specification.new do |s| 4 | s.name = "test-dependency-theme" 5 | s.version = "0.1.0" 6 | s.licenses = ["MIT"] 7 | s.summary = "This is another theme used to test Jekyll" 8 | s.authors = ["Jekyll"] 9 | s.files = ["lib/example.rb"] 10 | s.homepage = "https://github.com/jekyll/jekyll" 11 | 12 | s.add_runtime_dependency "jekyll_test_plugin" 13 | end 14 | -------------------------------------------------------------------------------- /lib/site_template/404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 | 18 | 19 |
20 |

404

21 | 22 |

Page not found :(

23 |

The requested page could not be found.

24 |
25 | -------------------------------------------------------------------------------- /lib/jekyll/utils/rouge.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Utils 5 | module Rouge 6 | 7 | def self.html_formatter(*args) 8 | Jekyll::External.require_with_graceful_fail("rouge") 9 | if old_api? 10 | ::Rouge::Formatters::HTML.new(*args) 11 | else 12 | ::Rouge::Formatters::HTMLLegacy.new(*args) 13 | end 14 | end 15 | 16 | def self.old_api? 17 | ::Rouge.version.to_s < "2" 18 | end 19 | end 20 | end 21 | end 22 | -------------------------------------------------------------------------------- /script/rubies: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # ----------------------------------------------------------------------------- 3 | # If you send us a ruby then we use that, if you do not then we test with 4 | # whatever we can detect, this way you can run both suites when you test out 5 | # your source, we expect full coverage now, not just MRI. 6 | # ----------------------------------------------------------------------------- 7 | 8 | rubies=() 9 | for r in ruby jruby; do 10 | if which "$r" > /dev/null 2>&1 11 | then 12 | echo $r 13 | fi 14 | done 15 | -------------------------------------------------------------------------------- /script/rubyprof: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | export BENCHMARK=1 4 | 5 | TEST_SCRIPT="Jekyll::Commands::Build.process({'source' => 'site'})" 6 | 7 | RUBY=$(cat < 13 | {% for post in site.posts %} 14 |
  • {{ post.date }} {{ post.title }}
  • 15 | {% endfor %} 16 | 17 | 18 | {% assign first_post = site.posts.first %} 19 |
    20 |

    {{ first_post.title }}

    21 |
    22 | {{ first_post.content }} 23 |
    24 |
    25 | -------------------------------------------------------------------------------- /docs/_posts/2016-05-18-jekyll-3-1-5-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.1.5 Released' 3 | date: 2016-05-18 21:35:27 -0700 4 | author: parkr 5 | version: 3.1.5 6 | categories: [release] 7 | --- 8 | 9 | There's always at least one bug, right? :) 10 | 11 | Hot on the trails of [v3.1.4](/news/2016/05/18/jekyll-3-1-4-released/), we 12 | bring you v3.1.5! It fixes one bug around requiring the `ExcerptDrop`, 13 | which only affects Linux. For the gory details, see [the pull 14 | request for the fix](https://github.com/jekyll/jekyll/pull/4912). 15 | 16 | Happy Jekylling! 17 | -------------------------------------------------------------------------------- /docs/_includes/primary-nav-items.html: -------------------------------------------------------------------------------- 1 | 18 | -------------------------------------------------------------------------------- /docs/_layouts/error.html: -------------------------------------------------------------------------------- 1 | {% include top.html %} 2 | 3 | 4 |
    5 |
    6 |
    7 |

    8 | 9 | Jekyll 10 | Jekyll Logo 11 | 12 |

    13 |
    14 |
    15 |
    16 | 17 | {{ content }} 18 | 19 | {% include anchor_links.html %} 20 | {% include analytics.html %} 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/jekyll/publisher.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class Publisher 5 | def initialize(site) 6 | @site = site 7 | end 8 | 9 | def publish?(thing) 10 | can_be_published?(thing) && !hidden_in_the_future?(thing) 11 | end 12 | 13 | def hidden_in_the_future?(thing) 14 | thing.respond_to?(:date) && !@site.future && thing.date.to_i > @site.time.to_i 15 | end 16 | 17 | private 18 | 19 | def can_be_published?(thing) 20 | thing.data.fetch("published", true) || @site.unpublished 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /test/test_site_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestSiteDrop < JekyllUnitTest 6 | context "a site drop" do 7 | setup do 8 | @site = fixture_site({ 9 | "collections" => ["thanksgiving"], 10 | }) 11 | @site.process 12 | @drop = @site.to_liquid.site 13 | end 14 | 15 | should "respond to `key?`" do 16 | assert @drop.respond_to?(:key?) 17 | end 18 | 19 | should "find a key if it's in the collection of the drop" do 20 | assert @drop.key?("thanksgiving") 21 | end 22 | end 23 | end 24 | -------------------------------------------------------------------------------- /benchmark/flat-map: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | enum = (0..50).to_a 5 | nested = enum.map { |i| [i] } 6 | 7 | def do_thing(blah) 8 | blah * 1 9 | end 10 | 11 | Benchmark.ips do |x| 12 | x.report('.map.flatten with nested arrays') { nested.map { |i| do_thing(i) }.flatten(1) } 13 | x.report('.flat_map with nested arrays') { nested.flat_map { |i| do_thing(i) } } 14 | 15 | x.report('.map.flatten with no nested arrays') { enum.map { |i| do_thing(i) }.flatten(1) } 16 | x.report('.flat_map with no nested arrays') { enum.flat_map { |i| do_thing(i) } } 17 | end 18 | -------------------------------------------------------------------------------- /docs/_includes/header.html: -------------------------------------------------------------------------------- 1 |
    2 | 5 |
    6 | 14 | 17 |
    18 |
    19 | -------------------------------------------------------------------------------- /docs/_posts/2013-12-09-jekyll-1-4-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.4.1 Released' 3 | date: 2013-12-09 20:44:13 -0600 4 | author: mattr- 5 | version: 1.4.1 6 | categories: [release] 7 | --- 8 | 9 | Another quick turnover, anyone? A [critical 10 | bug]({{ site.repository }}/issues/1794) in the reading of 11 | posts snuck itself into the 1.4.0 release. 12 | 13 | To address this issue, we're releasing v1.4.1 of Jekyll so that you can 14 | keep on writing without any problems. 15 | 16 | As always, you can find the full list of fixes in this release in the 17 | [change log](/docs/history/)! 18 | -------------------------------------------------------------------------------- /lib/jekyll/drops/unified_payload_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Drops 5 | class UnifiedPayloadDrop < Drop 6 | mutable true 7 | 8 | attr_accessor :page, :layout, :content, :paginator 9 | attr_accessor :highlighter_prefix, :highlighter_suffix 10 | 11 | def jekyll 12 | JekyllDrop.global 13 | end 14 | 15 | def site 16 | @site_drop ||= SiteDrop.new(@obj) 17 | end 18 | 19 | private 20 | def fallback_data 21 | @fallback_data ||= {} 22 | end 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /lib/jekyll/readers/collection_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class CollectionReader 5 | SPECIAL_COLLECTIONS = %w(posts data).freeze 6 | 7 | attr_reader :site, :content 8 | def initialize(site) 9 | @site = site 10 | @content = {} 11 | end 12 | 13 | # Read in all collections specified in the configuration 14 | # 15 | # Returns nothing. 16 | def read 17 | site.collections.each_value do |collection| 18 | collection.read unless SPECIAL_COLLECTIONS.include?(collection.label) 19 | end 20 | end 21 | end 22 | end 23 | -------------------------------------------------------------------------------- /docs/_posts/2014-11-12-jekyll-2-5-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 2.5.2 Released' 3 | date: 2014-11-12 18:49:08 -0800 4 | author: parkr 5 | version: 2.5.2 6 | categories: [release] 7 | --- 8 | 9 | A very minor release, 2.5.2 fixes a bug with path sanitation that 2.5.1 10 | introduced. It also improves the `post_url` tag such that it checks the 11 | posts' name (e.g. `2014-03-03-my-cool-post`) instead of a compiled time and 12 | name. This fixes issues where posts are created and the day changes based 13 | on timezone discrepancies. 14 | 15 | [Full history here.](/docs/history/) 16 | 17 | Happy Jekylling! 18 | -------------------------------------------------------------------------------- /lib/site_template/about.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: About 4 | permalink: /about/ 5 | --- 6 | 7 | This is the base Jekyll theme. You can find out more info about customizing your Jekyll theme, as well as basic Jekyll usage documentation at [jekyllrb.com](https://jekyllrb.com/) 8 | 9 | You can find the source code for Minima at GitHub: 10 | [jekyll][jekyll-organization] / 11 | [minima](https://github.com/jekyll/minima) 12 | 13 | You can find the source code for Jekyll at GitHub: 14 | [jekyll][jekyll-organization] / 15 | [jekyll](https://github.com/jekyll/jekyll) 16 | 17 | 18 | [jekyll-organization]: https://github.com/jekyll 19 | -------------------------------------------------------------------------------- /benchmark/capture-assign.rb: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require "liquid" 3 | require "benchmark/ips" 4 | 5 | puts "Ruby #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL}" 6 | puts "Liquid #{Liquid::VERSION}" 7 | 8 | template1 = '{% capture foobar %}foo{{ bar }}{% endcapture %}{{ foo }}{{ foobar }}' 9 | template2 = '{% assign foobar = "foo" | append: bar %}{{ foobar }}' 10 | 11 | def render(template) 12 | Liquid::Template.parse(template).render("bar" => "42") 13 | end 14 | 15 | puts render(template1) 16 | puts render(template2) 17 | 18 | Benchmark.ips do |x| 19 | x.report('capture') { render(template1) } 20 | x.report('assign') { render(template2) } 21 | end 22 | -------------------------------------------------------------------------------- /docs/_includes/footer.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /docs/_posts/2013-10-28-jekyll-1-3-0-rc1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.3.0.rc1 Released' 3 | date: 2013-10-28 20:14:39 -0500 4 | author: mattr- 5 | version: 1.3.0.rc1 6 | categories: [release] 7 | --- 8 | 9 | Jekyll 1.3.0 is going to be a big release! In order to make sure we 10 | didn't screw anything up too badly, we're making a release candidate 11 | available for any early adopters who want to give the latest and 12 | greatest code a spin without having to clone a repository from git. 13 | 14 | Please take this prerelease for a spin and [let us 15 | know](https://github.com/jekyll/jekyll/issues/new) if you run into any 16 | issues! 17 | -------------------------------------------------------------------------------- /docs/_posts/2016-11-14-jekyll-3-3-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.3.1 Released' 3 | date: 2016-11-14 14:29:59 -0800 4 | author: parkr 5 | version: 3.3.1 6 | categories: [release] 7 | --- 8 | 9 | Hello! We have a bugfix release of Jekyll hot off the presses for you. Key 10 | fixes to call out: 11 | 12 | 1. Only warn about auto-regeneration issues on Windows instead of disabling 13 | 2. Exclude very specific `vendor/` subdirectories instead of all of `vendor/` 14 | 3. Allow permalink templates to have plaintext underscores 15 | 16 | ..and lots more! Check out the [full history for more](/docs/history/#v3-3-1). 17 | 18 | Happy Jekylling! 19 | -------------------------------------------------------------------------------- /lib/jekyll/liquid_extensions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module LiquidExtensions 5 | 6 | # Lookup a Liquid variable in the given context. 7 | # 8 | # context - the Liquid context in question. 9 | # variable - the variable name, as a string. 10 | # 11 | # Returns the value of the variable in the context 12 | # or the variable name if not found. 13 | def lookup_variable(context, variable) 14 | lookup = context 15 | 16 | variable.split(".").each do |value| 17 | lookup = lookup[value] 18 | end 19 | 20 | lookup || variable 21 | end 22 | 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /docs/_posts/2013-12-16-jekyll-1-4-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.4.2 Released' 3 | date: 2013-12-16 19:48:13 -0500 4 | author: parkr 5 | version: 1.4.2 6 | categories: [release] 7 | --- 8 | 9 | This release fixes [a regression][] where Maruku fenced code blocks were turned 10 | off, instead of the previous default to on. We've added a new default 11 | configuration to our `maruku` config key: `fenced_code_blocks` and set it to 12 | default to `true`. 13 | 14 | If you do not wish to use Maruku fenced code blocks, you may turn this option 15 | off in your site's configuration file. 16 | 17 | [a regression]: https://github.com/jekyll/jekyll/pull/1830 18 | -------------------------------------------------------------------------------- /docs/_posts/2014-07-29-jekyll-2-2-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 2.2.0 Released' 3 | date: 2014-07-29 18:59:13 -0400 4 | author: parkr 5 | version: 2.2.0 6 | categories: [release] 7 | --- 8 | 9 | Jekyll 2.2.0 contains a few key updates: 10 | 11 | 1. A warning will now fire if you specify a layout in any of your pages or 12 | posts that doesn't exist. 13 | 2. Certain Pygments options are now whitelisted in safe mode 14 | 3. Categories in a post's path are now respected (i.e. folders in `_posts` 15 | will now work properly). 16 | 17 | As always, a full list of the updates are on the 18 | [history page](/docs/history/#v2-2-0). Happy Jekylling! 19 | -------------------------------------------------------------------------------- /test/test_ansi.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestAnsi < JekyllUnitTest 6 | context nil do 7 | setup do 8 | @subject = Jekyll::Utils::Ansi 9 | end 10 | 11 | Jekyll::Utils::Ansi::COLORS.each_key do |color| 12 | should "respond_to? #{color}" do 13 | assert @subject.respond_to?(color) 14 | end 15 | end 16 | 17 | should "be able to strip colors" do 18 | assert_equal @subject.strip(@subject.yellow(@subject.red("hello"))), "hello" 19 | end 20 | 21 | should "be able to detect colors" do 22 | assert @subject.has?(@subject.yellow("hello")) 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /docs/_posts/2016-05-19-jekyll-3-1-6-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.1.6 Released' 3 | date: 2016-05-19 12:48:14 -0700 4 | author: parkr 5 | version: 3.1.6 6 | categories: [release] 7 | --- 8 | 9 | Upon releasing 3.1.5 and kicking the tires, we noticed a glaring bug: our 10 | beloved `jsonify` filter doesn't work! With that, our work was cut out for 11 | us and we decided a 3.1.6 was necessary. This release restores sanity to 12 | our object-to-JSON generation in Liquid and we hope you enjoy. 13 | 14 | For the gory details, see [the pull 15 | request](https://github.com/jekyll/jekyll/pull/4914) or [the 16 | changelog](/docs/history/#v3-1-6). 17 | 18 | Happy Jekylling! 19 | -------------------------------------------------------------------------------- /docs/_posts/2014-03-24-jekyll-1-5-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.5.0 Released' 3 | date: 2014-03-24 20:37:59 -0400 4 | author: parkr 5 | version: 1.5.0 6 | categories: [release] 7 | --- 8 | 9 | As work continues on Jekyll 2.0.0, we felt it was important to address two key 10 | issues of Jekyll 1.4.3, namely the `safe_yaml` dependency below 1.0 and the 11 | inability to use Jekyll 1.4.3 on Windows due to a [fun issue with path sanitizing][]. 12 | 13 | For a full changelog, check out our [history][] page. 14 | 15 | Now, back to work on 2.0.0! 16 | 17 | [fun issue with path sanitizing]: https://github.com/jekyll/jekyll/issues/1948 18 | [history]: /docs/history/#v1-5-0 19 | -------------------------------------------------------------------------------- /script/branding: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | echo " ---------------------------------------------------------- " 4 | echo " _ ______ _ __ __ __ _ _ " 5 | echo " | | | ____| | |/ / \ \ / / | | | | " 6 | echo " | | | |__ | ' / \ \_/ / | | | | " 7 | echo " _ | | | __| | < \ / | | | | " 8 | echo " | |__| | | |____ | . \ | | | |____ | |____ " 9 | echo " \____/ |______| |_|\_\ |_| |______| |______| " 10 | echo " " 11 | echo " ---------------------------------------------------------- " 12 | -------------------------------------------------------------------------------- /docs/_posts/2016-04-19-jekyll-3-1-3-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.1.3 Released' 3 | date: 2016-04-19 10:26:16 -0700 4 | author: parkr 5 | version: 3.1.3 6 | categories: [release] 7 | --- 8 | 9 | v3.1.3 is a patch release which fixes the follow two issues: 10 | 11 | - Front matter defaults may not have worked for collection documents and posts due to a problem where they were looked up by their URL rather than their path relative to the site source 12 | - Running `jekyll serve` with SSL enabled was broken due to a bad configuration. 13 | 14 | Both of these issues have been resolved. For more information, check out [the full history](/docs/history/#v3-1-3). 15 | 16 | Happy Jekylling! 17 | -------------------------------------------------------------------------------- /docs/_posts/2016-01-20-jekyll-3-0-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.0.2 Released' 3 | date: 2016-01-20 14:08:18 -0800 4 | author: parkr 5 | version: 3.0.2 6 | categories: [release] 7 | --- 8 | 9 | A crucial bug was found in v3.0.1 which caused invalid post dates to go 10 | unnoticed in the build chain until the error that popped up was unhelpful. 11 | v3.0.2 [throws errors as you'd expect](https://github.com/jekyll/jekyll/issues/4375) 12 | when there is a post like `_posts/2016-22-01-future.md` or a post has an 13 | invalid date like `date: "tuesday"` in their front matter. 14 | 15 | This should make the experience of working with Jekyll just a little 16 | better. 17 | 18 | Happy Jekylling! 19 | -------------------------------------------------------------------------------- /docs/_includes/news_item.html: -------------------------------------------------------------------------------- 1 |
    2 |

    3 | 4 | {{ post.title }} 5 | 6 |

    7 | 12 | 22 |
    23 | {{ post.content }} 24 |
    25 |
    26 | -------------------------------------------------------------------------------- /lib/jekyll/drops/jekyll_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Drops 5 | class JekyllDrop < Liquid::Drop 6 | class << self 7 | def global 8 | @global ||= JekyllDrop.new 9 | end 10 | end 11 | 12 | def version 13 | Jekyll::VERSION 14 | end 15 | 16 | def environment 17 | Jekyll.env 18 | end 19 | 20 | def to_h 21 | @to_h ||= { 22 | "version" => version, 23 | "environment" => environment, 24 | } 25 | end 26 | 27 | def to_json(state = nil) 28 | require "json" 29 | JSON.generate(to_h, state) 30 | end 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /lib/jekyll/utils/exec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "open3" 4 | 5 | module Jekyll 6 | module Utils 7 | module Exec 8 | extend self 9 | 10 | # Runs a program in a sub-shell. 11 | # 12 | # *args - a list of strings containing the program name and arguments 13 | # 14 | # Returns a Process::Status and a String of output in an array in 15 | # that order. 16 | def run(*args) 17 | stdin, stdout, stderr, process = Open3.popen3(*args) 18 | out = stdout.read.strip 19 | err = stderr.read.strip 20 | 21 | [stdin, stdout, stderr].each(&:close) 22 | [process.value, out + err] 23 | end 24 | 25 | end 26 | end 27 | end 28 | -------------------------------------------------------------------------------- /docs/_docs/drafts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Working with drafts 3 | permalink: /docs/drafts/ 4 | --- 5 | 6 | Drafts are posts without a date. They're posts you're still working on and 7 | don't want to publish yet. To get up and running with drafts, create a 8 | `_drafts` folder in your site's root (as described in the [site structure](/docs/structure/) section) and create your 9 | first draft: 10 | 11 | ```text 12 | |-- _drafts/ 13 | | |-- a-draft-post.md 14 | ``` 15 | 16 | To preview your site with drafts, simply run `jekyll serve` or `jekyll build` 17 | with the `--drafts` switch. Each will be assigned the value modification time 18 | of the draft file for its date, and thus you will see currently edited drafts 19 | as the latest posts. 20 | -------------------------------------------------------------------------------- /docs/_layouts/news_item.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: news 3 | --- 4 | 5 |
    6 |

    7 | {{ page.title }} 8 | 9 |

    10 | 15 | 24 |
    25 | {{ content }} 26 |
    27 |
    28 | -------------------------------------------------------------------------------- /docs/_posts/2014-12-22-jekyll-2-5-3-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll Release for the Holidays! v2.5.3 Out' 3 | date: 2014-12-22 09:03:30 -0500 4 | author: parkr 5 | version: 2.5.3 6 | categories: [release] 7 | --- 8 | 9 | Happy Holidays, everyone. 10 | 11 | Jekyll v2.5.3 is a quick patch release, containing some minor fixes. See the 12 | [full history](/docs/history/) for more info. If you notice any problems, 13 | please [let us know]({{ site.repository }}). 14 | 15 | This release also marks the start of Jekyll 3 development. I wrote about it 16 | over on my personal blog: [Jekyll 3 — The Road Ahead](https://byparker.com/blog/2014/jekyll-3-the-road-ahead/). 17 | Feel free to chime in over on GitHub. 18 | 19 | Happy Jekylling! 20 | -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | engines: 2 | fixme: 3 | enabled: false 4 | rubocop: 5 | enabled: true 6 | channel: rubocop-0-49 7 | 8 | exclude_paths: 9 | - .codeclimate.yml 10 | - .gitignore 11 | - .rspec 12 | - .rubocop.yml 13 | - .travis.yml 14 | 15 | - Gemfile.lock 16 | - CHANGELOG.{md,markdown,txt,textile} 17 | - CONTRIBUTING.{md,markdown,txt,textile} 18 | - readme.{md,markdown,txt,textile} 19 | - README.{md,markdown,txt,textile} 20 | - Readme.{md,markdown,txt,textile} 21 | - ReadMe.{md,markdown,txt,textile} 22 | - COPYING 23 | - LICENSE 24 | 25 | - features/**/* 26 | - script/**/* 27 | - docs/**/* 28 | - spec/**/* 29 | - test/**/* 30 | - vendor/**/* 31 | 32 | ratings: 33 | paths: 34 | - lib/**/*.rb 35 | -------------------------------------------------------------------------------- /docs/_layouts/docs.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
    6 |
    7 | 8 | {% include docs_contents_mobile.html %} 9 | 10 |
    11 |
    12 | 15 |

    {{ page.title }}

    16 | {{ content }} 17 | {% include section_nav.html %} 18 |
    19 |
    20 | 21 | {% include docs_contents.html %} 22 | 23 |
    24 | 25 |
    26 |
    27 | -------------------------------------------------------------------------------- /script/default-site: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # Runs the `jekyll new` command and builds the default site as a sanity check 3 | 4 | set -e 5 | 6 | echo "$0: setting up tmp directory" 7 | mkdir -p ./tmp 8 | rm -Rf ./tmp/default-site 9 | 10 | echo "$0: creating new default site" 11 | bundle exec jekyll new tmp/default-site 12 | pushd tmp/default-site 13 | 14 | echo "$0: respecifying the jekyll install location" 15 | ruby -e "contents = File.read('Gemfile'); File.write('Gemfile', contents.sub(/gem \"jekyll\".*\\n/, 'gem \"jekyll\", path: \"../../\"'))" 16 | echo "$0: installing default site dependencies" 17 | BUNDLE_GEMFILE=Gemfile bundle install 18 | echo "$0: building the default site" 19 | BUNDLE_GEMFILE=Gemfile bundle exec jekyll build --verbose 20 | popd 21 | -------------------------------------------------------------------------------- /benchmark/end-with-vs-regexp: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | Benchmark.ips do |x| 5 | path_without_ending_slash = '/some/very/very/long/path/to/a/file/i/like' 6 | x.report('no slash regexp') { path_without_ending_slash =~ /\/$/ } 7 | x.report('no slash end_with?') { path_without_ending_slash.end_with?("/") } 8 | x.report('no slash [-1, 1]') { path_without_ending_slash[-1, 1] == "/" } 9 | end 10 | 11 | Benchmark.ips do |x| 12 | path_with_ending_slash = '/some/very/very/long/path/to/a/file/i/like/' 13 | x.report('slash regexp') { path_with_ending_slash =~ /\/$/ } 14 | x.report('slash end_with?') { path_with_ending_slash.end_with?("/") } 15 | x.report('slash [-1, 1]') { path_with_ending_slash[-1, 1] == "/" } 16 | end 17 | -------------------------------------------------------------------------------- /docs/_posts/2013-09-14-jekyll-1-2-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.2.1 Released' 3 | date: 2013-09-14 20:46:50 -0400 4 | author: parkr 5 | version: 1.2.1 6 | categories: [release] 7 | --- 8 | 9 | Quick turnover, anyone? A [recent incompatibility with Liquid 10 | v2.5.2](https://github.com/jekyll/jekyll/pull/1525) produced a nasty bug in 11 | which `include` tags were not rendered properly within `if` blocks. 12 | 13 | This release also includes a better handling of detached servers (prints pid and 14 | the command for killing the process). **Note**: the `--detach` flag and 15 | `--watch` flags are presently incompatible in 1.2.x. Fix for that coming soon! 16 | 17 | For a full list of the fixes in this release, check out [the change 18 | log](/docs/history/)! 19 | -------------------------------------------------------------------------------- /lib/jekyll/readers/static_file_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class StaticFileReader 5 | attr_reader :site, :dir, :unfiltered_content 6 | def initialize(site, dir) 7 | @site = site 8 | @dir = dir 9 | @unfiltered_content = [] 10 | end 11 | 12 | # Read all the files in // for Yaml header and create a new Page 13 | # object for each file. 14 | # 15 | # dir - The String relative path of the directory to read. 16 | # 17 | # Returns an array of static files. 18 | def read(files) 19 | files.map do |file| 20 | @unfiltered_content << StaticFile.new(@site, @site.source, @dir, file) 21 | end 22 | @unfiltered_content 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/source/_encodings/UTF8CRLFandBOM.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "UTF8CRLFandBOM" 4 | date: 2017-04-05 16:16:01 -0800 5 | categories: bom 6 | --- 7 | This file was created with CR/LFs, and encoded as UTF8 with a BOM 8 | 9 | You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `bundle exec jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. 10 | 11 | To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. 12 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-4.html: -------------------------------------------------------------------------------- 1 | --- 2 | slug: so-what-is-jekyll-exactly 3 | layout: slide 4 | --- 5 | 6 | Jekyll is a simple, blog-aware, static site generator. It takes a template 7 | directory containing raw text files in various formats, runs it through 8 | [Markdown](http://daringfireball.net/projects/markdown/) (or 9 | [Textile](http://redcloth.org/textile)) and 10 | [Liquid](https://help.shopify.com/themes/liquid/basics) 11 | converters, and spits out a complete, ready-to-publish static website suitable 12 | for serving with your favorite web server. Jekyll also happens to be the engine 13 | behind [GitHub Pages](https://pages.github.com/), which means you can use Jekyll 14 | to host your project’s page, blog, or website from GitHub’s servers **for 15 | free**. 16 | -------------------------------------------------------------------------------- /test/test_command.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestCommand < JekyllUnitTest 6 | context "when calling .add_build_options" do 7 | should "add common options" do 8 | cmd = Object.new 9 | mocks_expect(cmd).to receive(:option).at_least(:once) 10 | Command.add_build_options(cmd) 11 | end 12 | end 13 | 14 | context "when calling .process_site" do 15 | context "when fatal error occurs" do 16 | should "exit with non-zero error code" do 17 | site = Object.new 18 | def site.process; raise Jekyll::Errors::FatalException; end 19 | error = assert_raises(SystemExit) { Command.process_site(site) } 20 | refute_equal 0, error.status 21 | end 22 | end 23 | end 24 | end 25 | -------------------------------------------------------------------------------- /rake/docs.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ############################################################################# 4 | # 5 | # Packaging tasks for jekyll-docs 6 | # 7 | ############################################################################# 8 | 9 | namespace :docs do 10 | desc "Release #{docs_name} v#{version}" 11 | task :release => :build do 12 | unless `git branch` =~ %r!^\* master$! 13 | puts "You must be on the master branch to release!" 14 | exit! 15 | end 16 | sh "gem push pkg/#{docs_name}-#{version}.gem" 17 | end 18 | 19 | desc "Build #{docs_name} v#{version} into pkg/" 20 | task :build do 21 | mkdir_p "pkg" 22 | sh "gem build #{docs_name}.gemspec" 23 | sh "mv #{docs_name}-#{version}.gem pkg" 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /test/source/_slides/example-slide-6.html: -------------------------------------------------------------------------------- 1 | --- 2 | slug: Well, so what is Jekyll, then? 3 | layout: slide 4 | --- 5 | 6 | Jekyll is a simple, blog-aware, static site generator. It takes a template 7 | directory containing raw text files in various formats, runs it through 8 | [Markdown](http://daringfireball.net/projects/markdown/) (or 9 | [Textile](http://redcloth.org/textile)) and 10 | [Liquid](https://help.shopify.com/themes/liquid/basics) 11 | converters, and spits out a complete, ready-to-publish static website suitable 12 | for serving with your favorite web server. Jekyll also happens to be the engine 13 | behind [GitHub Pages](https://pages.github.com/), which means you can use Jekyll 14 | to host your project’s page, blog, or website from GitHub’s servers **for 15 | free**. 16 | -------------------------------------------------------------------------------- /test/source/_posts/2013-12-17-include-variable-filters.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: Post 3 | layout: post 4 | include1: include.html 5 | include2: include 6 | include3: INCLUDE 7 | include4: params 8 | include5: clude 9 | --- 10 | 11 | Liquid tests 12 | - 1 {% include {{ page.include1 }} %} 13 | - 2 {% include {{ page.include2 | append: '.html' }} %} 14 | - 3 {% include {{ page.include3 | downcase | append: '.html' }} %} 15 | 16 | Whitespace tests 17 | - 4 {% include {{page.include1}} %} 18 | - 5 {% include {{ page.include1}} %} 19 | - 6 {% include {{ page.include3 | downcase | append: '.html'}} %} 20 | 21 | Parameters test 22 | - 7 {% include {{ page.include4 | append: '.html' }} var1='foo' var2='bar' %} 23 | 24 | Partial variable test 25 | - 8 {% include in{{ page.include5 }}.html %} 26 | -------------------------------------------------------------------------------- /docs/_layouts/tutorials.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: default 3 | --- 4 | 5 |
    6 |
    7 | 8 | {% include tutorials_contents_mobile.html %} 9 | 10 |
    11 |
    12 | 16 |

    {{ page.title }}

    17 | {{ content }} 18 | {% include section_nav_tutorials.html %} 19 |
    20 |
    21 | 22 | {% include tutorials_contents.html %} 23 | 24 |
    25 | 26 |
    27 |
    28 | -------------------------------------------------------------------------------- /lib/jekyll/readers/page_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class PageReader 5 | attr_reader :site, :dir, :unfiltered_content 6 | def initialize(site, dir) 7 | @site = site 8 | @dir = dir 9 | @unfiltered_content = [] 10 | end 11 | 12 | # Read all the files in // for Yaml header and create a new Page 13 | # object for each file. 14 | # 15 | # dir - The String relative path of the directory to read. 16 | # 17 | # Returns an array of static pages. 18 | def read(files) 19 | files.map do |page| 20 | @unfiltered_content << Page.new(@site, @site.source, @dir, page) 21 | end 22 | @unfiltered_content.select { |page| site.publisher.publish?(page) } 23 | end 24 | end 25 | end 26 | -------------------------------------------------------------------------------- /docs/_posts/2015-02-26-introducing-jekyll-talk.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Join the Discussion at Jekyll Talk' 3 | date: 2015-02-26 21:06:51 -0800 4 | author: alfredxing 5 | categories: [community] 6 | --- 7 | 8 | We're super excited to announce the launch of [Jekyll Talk](https://talk.jekyllrb.com), a Discourse forum for anything related to Jekyll! 9 | 10 | The forum was set up by [@envygeeks](https://github.com/envygeeks) to build a community more accessible to Jekyll users and more suitable for general discussion. 11 | 12 | There's already been a lot of interesting topics, including a [site showcase](https://talk.jekyllrb.com/t/showcase-sites-made-using-jekyll/18) and [a poll for Jekyll 3.0 priorities](https://talk.jekyllrb.com/t/poll-installation-priorities-for-3-0/106/9). 13 | 14 | Come join the fun! 15 | -------------------------------------------------------------------------------- /lib/jekyll/errors.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Errors 5 | FatalException = Class.new(::RuntimeError) 6 | 7 | InvalidThemeName = Class.new(FatalException) 8 | 9 | DropMutationException = Class.new(FatalException) 10 | InvalidPermalinkError = Class.new(FatalException) 11 | InvalidYAMLFrontMatterError = Class.new(FatalException) 12 | MissingDependencyException = Class.new(FatalException) 13 | 14 | InvalidDateError = Class.new(FatalException) 15 | InvalidPostNameError = Class.new(FatalException) 16 | PostURLError = Class.new(FatalException) 17 | InvalidURLError = Class.new(FatalException) 18 | InvalidConfigurationError = Class.new(FatalException) 19 | end 20 | end 21 | -------------------------------------------------------------------------------- /script/proof: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Usage: 4 | # script/proof 5 | 6 | set -e 7 | 8 | function msg { 9 | printf "\e[0;37m==> $1\e[0m\n" 10 | } 11 | 12 | IGNORE_HREFS=$(ruby -e 'puts %w{ 13 | Chrononaut 14 | twitter.com 15 | nearlyfreespeech.net 16 | eduardoboucas.com 17 | github.com\/matrix9180 18 | }.map{|h| "/#{h}/"}.join(",")') 19 | SOURCE="docs" 20 | DESTINATION="_site" 21 | 22 | export PROOF=true 23 | export NOKOGIRI_USE_SYSTEM_LIBRARIES=true 24 | 25 | # 1. 26 | msg "Installing..." 27 | bundle install -j8 > /dev/null || bundle install > /dev/null 28 | 29 | # 2. 30 | msg "Building..." 31 | bundle exec jekyll build -s $SOURCE -d $DESTINATION --trace 32 | 33 | # 3. 34 | msg "Proofing..." 35 | time bundle exec htmlproofer ./$DESTINATION --allow-hash-href --url-ignore $IGNORE_HREFS $@ 36 | -------------------------------------------------------------------------------- /docs/_includes/top.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | {% feed_meta %} 8 | 9 | 10 | 11 | 12 | {% seo %} 13 | 17 | 18 | -------------------------------------------------------------------------------- /docs/_sass/_font-awesome.scss: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'FontAwesome'; 3 | src: url('../fonts/FontAwesome.eot?9h6hxj'); 4 | src: url('../fonts/FontAwesome.eot?9h6hxj#iefix') format('embedded-opentype'), 5 | url('../fonts/FontAwesome.woff?9h6hxj') format('woff'), 6 | url('../fonts/FontAwesome.ttf?9h6hxj') format('truetype'), 7 | url('../fonts/FontAwesome.svg?9h6hxj#FontAwesome') format('svg'); 8 | font-weight: normal; 9 | font-style: normal; 10 | } 11 | .fa { 12 | display: inline-block; 13 | font: normal normal normal 14px/1 FontAwesome; 14 | font-size: inherit; 15 | text-rendering: auto; 16 | -webkit-font-smoothing: antialiased; 17 | -moz-osx-font-smoothing: grayscale; 18 | } 19 | .fa-link:before { 20 | content: "\f0c1"; 21 | } 22 | .fa-pencil:before { 23 | content: "\f040"; 24 | } 25 | -------------------------------------------------------------------------------- /docs/readme.md: -------------------------------------------------------------------------------- 1 | # Jekyll docs site 2 | 3 | This directory contains the code for the Jekyll docs site, [jekyllrb.com](https://jekyllrb.com/). 4 | 5 | ## Contributing 6 | 7 | For information about contributing, see the [Contributing page](https://jekyllrb.com/docs/contributing/). 8 | 9 | ## Running locally 10 | 11 | You can preview your contributions before opening a pull request by running from within the directory: 12 | 13 | 1. `bundle install --without test test_legacy benchmark` 14 | 2. `bundle exec rake site:preview` 15 | 16 | It's just a jekyll site, afterall! :wink: 17 | 18 | ## Updating Font Awesome 19 | 20 | 1. Go to 21 | 2. Choose Import Icons and load `icomoon-selection.json` 22 | 3. Choose Generate Font → Download 23 | 4. Copy the font files and adapt the CSS to the paths we use in Jekyll 24 | -------------------------------------------------------------------------------- /docs/_posts/2014-03-27-jekyll-1-5-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.5.1 Released' 3 | date: 2014-03-27 22:43:48 -0400 4 | author: parkr 5 | version: 1.5.1 6 | categories: [release] 7 | --- 8 | 9 | The hawk-eyed [@gregose](https://github.com/gregose) spotted a bug in our 10 | `Jekyll.sanitized_path` code: 11 | 12 | {% highlight ruby %} 13 | > sanitized_path("/tmp/foobar/jail", "..c:/..c:/..c:/etc/passwd") 14 | => "/tmp/foobar/jail/../../../etc/passwd" 15 | {% endhighlight %} 16 | 17 | Well, we can't have that! In 1.5.1, you'll instead see: 18 | 19 | {% highlight ruby %} 20 | > sanitized_path("/tmp/foobar/jail", "..c:/..c:/..c:/etc/passwd") 21 | => "/tmp/foobar/jail/..c:/..c:/..c:/etc/passwd" 22 | {% endhighlight %} 23 | 24 | Luckily not affecting 1.4.x, this fix will make 1.5.0 that much safer for 25 | the masses. Thanks, Greg! 26 | -------------------------------------------------------------------------------- /lib/theme_template/example/_post.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | --- 4 | 5 | Eos eu docendi tractatos sapientem, brute option menandri in vix, quando vivendo accommodare te ius. Nec melius fastidii constituam id, viderer theophrastus ad sit, hinc semper periculis cum id. Noluisse postulant assentior est in, no choro sadipscing repudiandae vix. Vis in euismod delenit dignissim. Ex quod nostrum sit, suas decore animal id ius, nobis solet detracto quo te. 6 | 7 | {% comment %} 8 | Might you have an include in your theme? Why not try it here! 9 | {% include my-themes-great-include.html %} 10 | {% endcomment %} 11 | 12 | No laudem altera adolescens has, volumus lucilius eum no. Eam ei nulla audiam efficiantur. Suas affert per no, ei tale nibh sea. Sea ne magna harum, in denique scriptorem sea, cetero alienum tibique ei eos. Labores persequeris referrentur eos ei. 13 | -------------------------------------------------------------------------------- /lib/theme_template/theme.gemspec.erb: -------------------------------------------------------------------------------- 1 | # coding: utf-8 2 | 3 | Gem::Specification.new do |spec| 4 | spec.name = <%= theme_name.inspect %> 5 | spec.version = "0.1.0" 6 | spec.authors = [<%= user_name.inspect %>] 7 | spec.email = [<%= user_email.inspect %>] 8 | 9 | spec.summary = %q{TODO: Write a short summary, because Rubygems requires one.} 10 | spec.homepage = "TODO: Put your gem's website or public repo URL here." 11 | spec.license = "MIT" 12 | 13 | spec.files = `git ls-files -z`.split("\x0").select { |f| f.match(%r{^(<%= theme_directories.join("|") %>|LICENSE|README)}i) } 14 | 15 | spec.add_runtime_dependency "jekyll", "~> <%= jekyll_version_with_minor %>" 16 | 17 | spec.add_development_dependency "bundler", "~> 1.12" 18 | spec.add_development_dependency "rake", "~> 10.0" 19 | end 20 | -------------------------------------------------------------------------------- /docs/_posts/2013-11-26-jekyll-1-3-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.3.1 Released' 3 | date: 2013-11-26 19:52:20 -0600 4 | author: mattr- 5 | version: 1.3.1 6 | categories: [release] 7 | --- 8 | 9 | Just in time for the US holiday Thanksgiving, we're releasing version 10 | 1.3.1 of Jekyll to address some of the issues seen since the 11 | release of 1.3.0. 12 | 13 | In addition to a couple of other smaller bug fixes, the biggest thing 14 | we've fixed is an issue with the `--watch` option with Ruby 1.8.7. For a 15 | full run-down, visit our [change log](/docs/history/)! 16 | 17 | Thanks to all the people who have contributed to this release! They are 18 | (in alphabetical order): Abhi Yerra, Anatol Broder, Andreas Möller, Greg 19 | Karékinian, Sam Rayner, Santeri Paavolainen, Shigeya Suzuki, Yihang Ho, 20 | albertogg, andrewhavens, maul.esel, and thomasdao 21 | -------------------------------------------------------------------------------- /docs/_posts/2015-01-20-jekyll-meet-and-greet.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll Meet & Greet at GitHub HQ" 3 | date: "2015-01-20 19:23:12 -0800" 4 | author: parkr 5 | categories: [meetup] 6 | --- 7 | 8 | Hey! Our friends at GitHub have agreed to host a Jekyll meet & greet on 9 | **February 5, 2015 at 7pm**. The event will be hosted at 10 | [GitHub's Headquarters](https://goo.gl/maps/Bmy7i) 11 | here in San Francisco, CA. Pizza & beer will be available for those interested, 12 | and there will be much time to sit and chat about all things Jekyll. This would 13 | be an especially good time to get help with bugs you've encountered or to talk 14 | over a potential feature with the core team in attendance. 15 | 16 | A special thanks to [@gjtorikian](https://github.com/gjtorikian) for making this 17 | all possible! You rock. 18 | 19 | We look forward to meeting all you fine folks. Cheers! 20 | -------------------------------------------------------------------------------- /docs/_posts/2014-06-04-jekyll-stickers-1-dollar-stickermule.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Pick Up your $1 Jekyll Sticker' 3 | date: 2014-06-04 15:46:53 -0400 4 | author: parkr 5 | categories: [partners] 6 | --- 7 | 8 | ![Jekyll Sticker](/img/jekyll-sticker.jpg) 9 | 10 | You may have heard that [@cobyism](https://github.com/cobyism)'s excellent 11 | Jekyll logo has been made into a sticker. You may have sat idly by, wishing 12 | that you could have a sticker honoring your beloved Jekyll. 13 | 14 | The StickerMule team says, *"Pine no longer!"* StickerMule has **[discounted the 15 | price of Jekyll stickers down to $1 and are offering free (domestic) 16 | shipping](https://www.stickermule.com/marketplace/825-jekyll-stickers)!** 17 | Go grab one now on the StickerMule marketplace – [they'll look 18 | swell on your favourite hardware.](https://twitter.com/parkr/status/430826309707902976/photo/1) 19 | -------------------------------------------------------------------------------- /test/test_liquid_renderer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestLiquidRenderer < JekyllUnitTest 6 | context "profiler" do 7 | setup do 8 | @site = Site.new(site_configuration) 9 | @renderer = @site.liquid_renderer 10 | end 11 | 12 | should "return a table with profiling results" do 13 | @site.process 14 | 15 | output = @renderer.stats_table 16 | 17 | # rubocop:disable Metrics/LineLength 18 | expected = [ 19 | %r!^Filename\s+|\s+Count\s+|\s+Bytes\s+|\s+Time$!, 20 | %r!^-+\++-+\++-+\++-+$!, 21 | %r!^_posts/2010-01-09-date-override\.markdown\s+|\s+\d+\s+|\s+\d+\.\d{2}K\s+|\s+\d+\.\d{3}$!, 22 | ] 23 | # rubocop:enable Metrics/LineLength 24 | 25 | expected.each do |regexp| 26 | assert_match regexp, output 27 | end 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /script/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require 'pry' 4 | $LOAD_PATH.unshift File.expand_path("../lib", __dir__) 5 | require 'jekyll' 6 | 7 | TEST_DIR = File.expand_path("../test", __dir__) 8 | 9 | def fixture_site(overrides = {}) 10 | Jekyll::Site.new(site_configuration(overrides)) 11 | end 12 | 13 | def build_configs(overrides, base_hash = Jekyll::Configuration::DEFAULTS) 14 | Jekyll::Utils.deep_merge_hashes(base_hash, overrides) 15 | end 16 | 17 | def site_configuration(overrides = {}) 18 | build_configs({ 19 | "source" => source_dir, 20 | "destination" => dest_dir 21 | }, build_configs(overrides)) 22 | end 23 | 24 | def dest_dir(*subdirs) 25 | test_dir('dest', *subdirs) 26 | end 27 | 28 | def source_dir(*subdirs) 29 | test_dir('source', *subdirs) 30 | end 31 | 32 | def test_dir(*subdirs) 33 | File.join(TEST_DIR, *subdirs) 34 | end 35 | 36 | module Jekyll 37 | binding.pry 38 | end 39 | -------------------------------------------------------------------------------- /test/source/_layouts/default.html: -------------------------------------------------------------------------------- 1 | --- 2 | front_matter_var: variable from layout 3 | --- 4 | 6 | 7 | 8 | 9 | 10 | {{ page.title }} 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
    22 |
    23 | Tom Preston-Werner 24 |
    25 | 26 | {{ content }} 27 |
    28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /docs/_posts/2013-06-07-jekyll-1-0-3-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.0.3 Released" 3 | date: "2013-06-07 21:02:13 +0200" 4 | author: parkr 5 | version: 1.0.3 6 | categories: [release] 7 | --- 8 | 9 | v1.0.3 contains some key enhancements and bug fixes: 10 | 11 | - Fail with non-zero exit code when MaRuKu errors ([#1190][]) or Liquid errors ([#1121][]) 12 | - Add support for private gists to `gist` tag ([#1189][]) 13 | - Add `--force` option to `jekyll new` ([#1115][]) 14 | - Fix compatibility with `exclude` and `include` with pre-1.0 Jekyll ([#1114][]) 15 | - Fix pagination issue regarding `File.basename` and `page:num` ([#1063][]) 16 | 17 | See the [History][] page for more information on this release. 18 | 19 | {% assign issue_numbers = "1190|1121|1189|1115|1114|1063" | split: "|" %} 20 | {% for issue in issue_numbers %} 21 | [#{{ issue }}]: {{ site.repository }}/issues/{{ issue }} 22 | {% endfor %} 23 | 24 | [History]: /docs/history/#v1-0-3 25 | -------------------------------------------------------------------------------- /docs/_data/docs.yml: -------------------------------------------------------------------------------- 1 | - title: Getting Started 2 | docs: 3 | - home 4 | - quickstart 5 | - installation 6 | - windows 7 | - usage 8 | - structure 9 | - configuration 10 | 11 | - title: Your Content 12 | docs: 13 | - frontmatter 14 | - posts 15 | - drafts 16 | - pages 17 | - static-files 18 | - variables 19 | - collections 20 | - datafiles 21 | - assets 22 | - migrations 23 | 24 | - title: Customization 25 | docs: 26 | - templates 27 | - includes 28 | - permalinks 29 | - pagination 30 | - plugins 31 | - themes 32 | - extras 33 | 34 | - title: Deployment 35 | docs: 36 | - github-pages 37 | - deployment-methods 38 | - continuous-integration 39 | 40 | - title: Miscellaneous 41 | docs: 42 | - troubleshooting 43 | - sites 44 | - resources 45 | - upgrading/0-to-2 46 | - upgrading/2-to-3 47 | 48 | - title: Meta 49 | docs: 50 | - contributing 51 | - maintaining 52 | - conduct 53 | - history 54 | -------------------------------------------------------------------------------- /rake/release.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ############################################################################# 4 | # 5 | # Packaging tasks 6 | # 7 | ############################################################################# 8 | 9 | desc "Release #{name} v#{version}" 10 | task :release => :build do 11 | current_branch = `git branch`.to_s.strip.match(%r!^\* (.+)$!)[1] 12 | unless current_branch == "master" || current_branch.end_with?("-stable") 13 | puts "You must be on the master branch to release!" 14 | exit! 15 | end 16 | sh "git commit --allow-empty -m 'Release :gem: #{version}'" 17 | sh "git tag v#{version}" 18 | sh "git push origin #{current_branch}" 19 | sh "git push origin v#{version}" 20 | sh "gem push pkg/#{name}-#{version}.gem" 21 | end 22 | 23 | desc "Build #{name} v#{version} into pkg/" 24 | task :build do 25 | mkdir_p "pkg" 26 | sh "gem build #{gemspec_file}" 27 | sh "mv #{gem_file} pkg" 28 | end 29 | -------------------------------------------------------------------------------- /docs/_docs/sites.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Sites using Jekyll 3 | permalink: /docs/sites/ 4 | --- 5 | 6 | It’s interesting to see what designs and features others have come up 7 | with. Below are some Jekyll-powered blogs which were hand-picked for 8 | learning purposes. 9 | 10 | - [Tom Preston-Werner](http://tom.preston-werner.com/) 11 | ([source](https://github.com/mojombo/mojombo.github.io)) 12 | - [GitHub Official Teaching Materials](https://services.github.com/training/) 13 | ([source](https://github.com/github/training-kit)) 14 | - [Rasmus Andersson](https://rsms.me/) 15 | ([source](https://github.com/rsms/rsms.github.com)) 16 | - [MvvmCross](https://mvvmcross.github.io/MvvmCross/) 17 | ([source](https://github.com/MvvmCross/MvvmCross/tree/master/docs)) 18 | 19 | If you would like to explore more examples, you can find a list of sites 20 | and their sources on the ["Sites" page in the Jekyll wiki][jekyll-sites]. 21 | 22 | [jekyll-sites]: {{ site.repository }}/wiki/Sites 23 | -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: error 3 | permalink: /404.html 4 | sitemap: false 5 | --- 6 | 7 |
    8 |
    9 |
    10 |

    Huh. It seems that page is
    Hyde-ing...

    11 |
    12 |
    13 |
    14 | 15 |
    16 |
    17 |
    18 |

    The resource you requested was not found. Here are some links to help you find your way:

    19 | 35 |
    36 |
    37 |
    38 | -------------------------------------------------------------------------------- /docs/_posts/2016-08-02-jekyll-3-2-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.2.1 Released with Fix for Windows' 3 | date: 2016-08-02 13:20:11 -0700 4 | author: parkr 5 | version: 3.2.1 6 | categories: [release] 7 | --- 8 | 9 | Well, 3.2.0 has been a success, but with one fatal flaw: it doesn't work on 10 | Windows! Sorry, Windows users. Hot on the trail of 3.2.0, this release 11 | should squash that :bug:. Sorry about that! 12 | 13 | This release also fixes an issue when using [gem-based themes](/docs/themes/) 14 | where the theme was rejected if it existed behind a symlink. This is a 15 | common setup for the various ruby version managers, and for Ruby installed 16 | via Homebrew. Props to @benbalter for fixing that up. 17 | 18 | Thanks to the contributors for this release: Adam Petrie, Ben Balter, 19 | Daniel Chapman, DirtyF, Gary Ewan Park, Jordon Bedwell, and Parker Moore. 20 | 21 | As always, you can see our full changelog on [the History page](/docs/history/). 22 | 23 | Happy Jekylling! 24 | -------------------------------------------------------------------------------- /test/test_sass.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestSass < JekyllUnitTest 6 | context "importing partials" do 7 | setup do 8 | @site = Jekyll::Site.new(Jekyll.configuration({ 9 | "source" => source_dir, 10 | "destination" => dest_dir, 11 | })) 12 | @site.process 13 | @test_css_file = dest_dir("css/main.css") 14 | end 15 | 16 | should "import SCSS partial" do 17 | assert_equal ".half {\n width: 50%; }\n", File.read(@test_css_file) 18 | end 19 | 20 | should "register the SCSS converter" do 21 | message = "SCSS converter implementation should exist." 22 | assert !!@site.find_converter_instance(Jekyll::Converters::Scss), message 23 | end 24 | 25 | should "register the Sass converter" do 26 | message = "Sass converter implementation should exist." 27 | assert !!@site.find_converter_instance(Jekyll::Converters::Sass), message 28 | end 29 | end 30 | end 31 | -------------------------------------------------------------------------------- /docs/_posts/2016-04-26-jekyll-3-0-5-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.0.5 Released' 3 | date: 2016-04-26 17:40:44 -0700 4 | author: parkr 5 | version: 3.0.5 6 | categories: [release] 7 | --- 8 | 9 | This version fixes a bug affecting only v3.0.4 where autoregeneration was 10 | *always* disabled when running Jekyll locally. This feature is a huge 11 | reason why Jekyll (or any static site generator, for that matter) is a joy 12 | to use. Sorry for the regression! 13 | 14 | If you're using GitHub Pages, [you can follow the progress of the upgrade 15 | on the github/pages-gem repo](https://github.com/github/pages-gem/pull/285). 16 | 17 | As always, our [history doc](/docs/history/#v3-0-5) has links to the pull 18 | requests and issues associated with the release for your perusal. 19 | 20 | We're looking forward to the upcoming release of v3.2 which [has some 21 | excellent goodies](https://github.com/jekyll/jekyll/blob/master/History.markdown#head) 22 | we think you'll love. 23 | 24 | Happy Jekylling! 25 | -------------------------------------------------------------------------------- /docs/_posts/2013-07-25-jekyll-1-0-4-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.0.4 Released" 3 | date: "2013-07-25 09:08:38 +0200" 4 | author: mattr- 5 | version: 1.0.4 6 | categories: [release] 7 | --- 8 | 9 | Version 1.0.4 fixes a minor, but nonetheless important security vulnerability affecting several third-party Jekyll plugins. If your Jekyll site does not use plugins, you may, but are not required to upgrade at this time. 10 | 11 | Community and custom plugins extending the `Liquid::Drop` class may inadvertently disclose some system information such as directory structure or software configuration to users with access to the Liquid templating system. 12 | 13 | We recommend you upgrade to Jekyll v1.0.4 immediately if you use `Liquid::Drop` plugins on your Jekyll site. 14 | 15 | Many thanks for [Ben Balter](https://github.com/benbalter) for alerting us to the problem 16 | and [submitting a patch][1349] so quickly. 17 | 18 | [230]: https://github.com/Shopify/liquid/pull/230 19 | [1349]: {{ site.repository }}/issues/1349 20 | -------------------------------------------------------------------------------- /docs/_posts/2013-07-25-jekyll-1-1-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.1.2 Released" 3 | date: "2013-07-25 09:08:38 +0200" 4 | author: parkr 5 | version: 1.1.2 6 | categories: [release] 7 | --- 8 | 9 | Version 1.1.2 fixes a minor, but nonetheless important security vulnerability affecting several third-party Jekyll plugins. If your Jekyll site does not use plugins, you may, but are not required to upgrade at this time. 10 | 11 | Community and custom plugins extending the `Liquid::Drop` class may inadvertently disclose some system information such as directory structure or software configuration to users with access to the Liquid templating system. 12 | 13 | We recommend you upgrade to Jekyll v1.1.2 immediately if you use `Liquid::Drop` plugins on your Jekyll site. 14 | 15 | Many thanks for [Ben Balter](https://github.com/benbalter) for alerting us to the problem 16 | and [submitting a patch][1349] so quickly. 17 | 18 | [230]: https://github.com/Shopify/liquid/pull/230 19 | [1349]: {{ site.repository }}/issues/1349 20 | -------------------------------------------------------------------------------- /docs/_posts/2014-05-08-jekyll-2-0-3-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 2.0.3 Released' 3 | date: 2014-05-08 22:43:17 -0400 4 | author: parkr 5 | version: 2.0.3 6 | categories: [release] 7 | --- 8 | 9 | Hey again! Just wanted to let you know we've released another version of Jekyll, jam-packed with bug fixes. 10 | 11 | A huge "thank you" is in order for all the folks who have submitted bug reports over the last 2 days — your input is what allows this project to continue. It's always a pain to deal with a MAJOR version bump release, but it's been pretty smooth so far and you have all been nice about the flaws you've found in the tool. Keep filing those reports so we can continue to make Jekyll even better! 12 | 13 | Thank you to the contributors that contributed code to 2.0.1, 2.0.2, and/or 2.0.3: 14 | 15 | Parker Moore, Yi Zeng, Gabe Ortiz, Aaron Broder, Alberto Grespan, gpxl, David Briggs, Kevin Ingersoll, and Troy Swanson. 16 | 17 | As always, check out the [changelog](/docs/history/) for more info. Happy Jekylling! 18 | -------------------------------------------------------------------------------- /docs/_posts/2016-04-19-jekyll-3-0-4-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.0.4 Released' 3 | date: 2016-04-19 10:26:12 -0700 4 | author: parkr 5 | version: 3.0.4 6 | categories: [release] 7 | --- 8 | 9 | v3.0.4 is a patch release which fixes the follow two issues: 10 | 11 | - Front matter defaults may not have worked for collection documents and posts due to a problem where they were looked up by their URL rather than their path relative to the site source 12 | - Configuration for the posts permalink might be borked when a user specified a value for `collections.posts.permalink` directly. This forced the use of `permalink` at the top level, which also affected pages. To configure a permalink _just for posts_, you can do so with: 13 | 14 | {% highlight yaml %} 15 | collections: 16 | posts: 17 | output: true 18 | permalink: /blog/:year/:title/ 19 | {% endhighlight %} 20 | 21 | Both of these issues have been resolved. For more information, check out [the full history](/docs/history/#v3-0-4). 22 | 23 | Happy Jekylling! 24 | -------------------------------------------------------------------------------- /docs/_posts/2014-07-01-jekyll-2-1-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 2.1.1 Released' 3 | date: 2014-07-01 20:16:43 -0400 4 | author: parkr 5 | version: 2.1.1 6 | categories: [release] 7 | --- 8 | 9 | This is a minor release for Jekyll 2.1.0. It fixes a couple bugs and 10 | introduces fixes for a couple security-related issues. 11 | 12 | It covers two security vulnerabilities: 13 | 14 | 1. One in the reading of data 15 | 2. One in the `layouts` setting 16 | 17 | They were identified in Jekyll 1.5.1 and has been confirmed as patched 18 | in this version and the version used by GitHub Pages. If you are in the 19 | business of building Jekyll sites, please ensure you upgrade to 2.1.1 as 20 | soon as possible. 21 | 22 | For more, check out [`jekyll/jekyll#2563`](https://github.com/jekyll/jekyll/pull/2563). 23 | 24 | Additionally, the dependency on Maruku has been loosened and a bug was 25 | fixed with document URLs. 26 | 27 | As always, check out the [full changelog](/docs/history/) for more info! 28 | 29 | Happy Jekylling! 30 | -------------------------------------------------------------------------------- /docs/_posts/2013-07-24-jekyll-1-1-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.1.1 Released" 3 | date: "2013-07-24 22:24:14 +0200" 4 | author: parkr 5 | version: 1.1.1 6 | categories: [release] 7 | --- 8 | 9 | Coming just 10 days after the release of v1.1.0, v1.1.1 is out with a patch for 10 | the nasty excerpt inception bug ([#1339]({{ site.repository }}/issues/1339)) and 11 | non-zero exit codes for invalid commands ([#1338]({{ site.repository 12 | }}/issues/1338)). 13 | 14 | To all those affected by the [strange excerpt bug in v1.1.0]({{ site.repository 15 | }}/issues/1321), I'm sorry. I think we have it all patched up and it should be 16 | deployed to [GitHub Pages](https://pages.github.com/) in the next couple weeks. 17 | Thank you for your patience! 18 | 19 | If you're checking out v1.1.x for the first time, definitely check out [what 20 | shipped with v1.1.0!]({{ site.repository }}/releases/tag/v1.1.0) 21 | 22 | See the [GitHub Release]({{ site.repository }}/releases/tag/v1.1.1) page for 23 | more a more detailed changelog for this release. 24 | -------------------------------------------------------------------------------- /test/test_liquid_extensions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestLiquidExtensions < JekyllUnitTest 6 | context "looking up a variable in a Liquid context" do 7 | class SayHi < Liquid::Tag 8 | include Jekyll::LiquidExtensions 9 | 10 | def initialize(_tag_name, markup, _tokens) 11 | @markup = markup.strip 12 | end 13 | 14 | def render(context) 15 | "hi #{lookup_variable(context, @markup)}" 16 | end 17 | end 18 | Liquid::Template.register_tag("say_hi", SayHi) 19 | setup do 20 | # Parses and compiles the template 21 | @template = Liquid::Template.parse("{% say_hi page.name %}") 22 | end 23 | 24 | should "extract the var properly" do 25 | assert_equal @template.render({ "page" => { "name" => "tobi" } }), "hi tobi" 26 | end 27 | 28 | should "return the variable name if the value isn't there" do 29 | assert_equal @template.render({ "page" => { "title" => "tobi" } }), "hi page.name" 30 | end 31 | end 32 | end 33 | -------------------------------------------------------------------------------- /docs/_posts/2014-12-17-alfredxing-welcome-to-jekyll-core.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Alfred Xing has joined the Jekyll core team' 3 | date: 2014-12-17 11:16:21 -0800 4 | author: parkr 5 | version: alfredxing 6 | categories: [team] 7 | --- 8 | 9 | We're excited to announce that [@alfredxing][] has joined the @jekyll/core 10 | team! 11 | 12 | He hails from Vancouver, BC, Canada, where he is studying Economics and 13 | Computer Science at the [University of British Columbia][]. Alfred popped up in 14 | the issues a few months ago with terrific insights, focus, and humility. 15 | Performance buffs may be pleased to hear incremental regeneration will be 16 | released in a future version of Jekyll -- a significant piece of the 17 | feature written by Alfred. 18 | 19 | Please join me in welcoming Alfred to the Jekyll core team. We're excited 20 | he's agreed to lend his talents to this project. The future is an exciting 21 | place! 22 | 23 | Happy Jekylling! 24 | 25 | [@alfredxing]: https://github.com/alfredxing 26 | [University of British Columbia]: http://www.ubc.ca 27 | -------------------------------------------------------------------------------- /docs/_posts/2017-07-17-jekyll-3-5-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.5.1 Released' 3 | date: 2017-07-17 12:40:37 -0400 4 | author: parkr 5 | version: 3.5.1 6 | categories: [release] 7 | --- 8 | 9 | We've released a few bugfixes in the form of v3.5.1 today: 10 | 11 | - Some plugins stopped functioning properly due to a NoMethodError for `registers` on NilClass. That's been fixed. 12 | - A bug in `relative_url` when `baseurl` is `nil` caused URL's to come out wrong. Squashed. 13 | - Static files' liquid representations should now have all the keys you were expecting when serialized into JSON. 14 | 15 | We apologize for the breakages! We're working diligently to improve how we test our plugins with Jekyll core to prevent breakages in the future. 16 | 17 | More details in [the history](/docs/history/#v3-5-1). Many thanks to all the contributors to Jekyll v3.5.1: Adam Voss, ashmaroli, Ben Balter, Coby Chapple, Doug Beney, Fadhil, Florian Thomas, Frank Taillandier, James, jaybe, Joshua Byrd, Kevin Plattret, & Robert Jäschke. 18 | 19 | Happy Jekylling! 20 | -------------------------------------------------------------------------------- /docs/_posts/2015-11-17-jekyll-3-0-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.0.1 Released' 3 | date: 2015-11-17 22:04:39 -0800 4 | author: parkr 5 | version: 3.0.1 6 | categories: [release] 7 | --- 8 | 9 | Hey, folks! Bunch of bug fixes here. Notables: 10 | 11 | * Only superdirectories of `_posts` will be categories. 12 | * `:title` in permalink templates are now properly cased as before 13 | * `.jekyll-metadata` being erroneously written when not using incremental build. 14 | * Failure in liquid will now always fail the `jekyll` process. 15 | * All hooks should now be properly registered & documented 16 | 17 | And a bunch more changes which you can see over in the 18 | [changelog](/docs/history). 19 | 20 | Thanks to the 17 developers who contributed code and documentation to this 21 | patch release: Alfred Xing, Christian Trosell, Jordan Thornquest, Jordon 22 | Bedwell, Larry Fox, Lawrence Murray, Lewis Cowles, Matt Rogers, Nicole 23 | White, Parker Moore, Paul Robert Lloyd, Sarah Kuehnle, Vincent Wochnik, 24 | Will Norris, XhmikosR, chrisfinazzo, and rebornix. 25 | -------------------------------------------------------------------------------- /docs/_posts/2013-05-06-jekyll-1-0-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.0.0 Released" 3 | date: "2013-05-06 02:12:52 +0200" 4 | author: parkr 5 | version: 1.0.0 6 | categories: [release] 7 | --- 8 | 9 | Hey! After many months of hard work by Jekyll's contributors, we're excited 10 | to announce the first major release of the project in a long while. v1.0.0 is 11 | finally here! While the list of improvements and bug fixes is [quite lengthy][history], 12 | here are the highlights (thanks to [@benbalter](https://twitter.com/BenBalter) for the 13 | examples and for compiling this list): 14 | 15 | - Support for the Gist tag for easily embedding Gists ([example](https://gist.github.com/benbalter/5555251)) 16 | - Automatically generated post excerpts ([example](https://gist.github.com/benbalter/5555369)) 17 | - Save and preview drafts before publishing ([example](https://gist.github.com/benbalter/5555992)) 18 | 19 | Take a look at the [Upgrading][] page in the docs for more detailed information. 20 | 21 | [history]: /docs/history/#v1-0-0 22 | [Upgrading]: /docs/upgrading/ 23 | -------------------------------------------------------------------------------- /features/highlighting.feature: -------------------------------------------------------------------------------- 1 | Feature: Syntax Highlighting 2 | As a hacker who likes to blog 3 | I want to share code snippets in my blog 4 | And make them pretty for all the world to see 5 | 6 | Scenario: highlighting an apache configuration 7 | Given I have an "index.html" file with content: 8 | """ 9 | --- 10 | --- 11 | 12 | {% highlight apache %} 13 | RewriteEngine On 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteCond %{REQUEST_FILENAME} !-d 16 | RewriteRule ^(.*)$ index.php [QSA,L] 17 | {% endhighlight %} 18 | 19 | ```apache 20 | RewriteEngine On 21 | RewriteCond %{REQUEST_FILENAME} !-f 22 | RewriteCond %{REQUEST_FILENAME} !-d 23 | RewriteRule ^(.*)$ index.php [QSA,L] 24 | ``` 25 | """ 26 | And I have a "_config.yml" file with content: 27 | """ 28 | kramdown: 29 | input: GFM 30 | """ 31 | When I run jekyll build 32 | Then I should get a zero exit-status 33 | And I should see "RewriteCond" in "_site/index.html" 34 | -------------------------------------------------------------------------------- /lib/jekyll/commands/help.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Commands 5 | class Help < Command 6 | class << self 7 | def init_with_program(prog) 8 | prog.command(:help) do |c| 9 | c.syntax "help [subcommand]" 10 | c.description "Show the help message, optionally for a given subcommand." 11 | 12 | c.action do |args, _| 13 | cmd = (args.first || "").to_sym 14 | if args.empty? 15 | puts prog 16 | elsif prog.has_command? cmd 17 | puts prog.commands[cmd] 18 | else 19 | invalid_command(prog, cmd) 20 | abort 21 | end 22 | end 23 | end 24 | end 25 | 26 | def invalid_command(prog, cmd) 27 | Jekyll.logger.error "Error:", 28 | "Hmm... we don't know what the '#{cmd}' command is." 29 | Jekyll.logger.info "Valid commands:", prog.commands.keys.join(", ") 30 | end 31 | end 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /test/source/_posts/2014-09-02-relative-includes.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: Post 3 | layout: post 4 | include1: rel_include.html 5 | include2: include_relative/rel_include 6 | include3: rel_INCLUDE 7 | include4: params 8 | include5: clude 9 | --- 10 | 11 | Liquid tests 12 | - 1 {% include_relative include_relative/{{ page.include1 }} %} 13 | - 2 {% include_relative {{ page.include2 | append: '.html' }} %} 14 | - 3 {% include_relative include_relative/{{ page.include3 | downcase | append: '.html' }} %} 15 | 16 | Whitespace tests 17 | - 4 {% include_relative include_relative/{{page.include1}} %} 18 | - 5 {% include_relative include_relative/{{ page.include1}} %} 19 | - 6 {% include_relative include_relative/{{ page.include3 | downcase | append: '.html'}} %} 20 | 21 | Parameters test 22 | - 7 {% include_relative include_relative/{{ page.include4 | append: '.html' }} var1='foo' var2='bar' %} 23 | 24 | Partial variable test 25 | - 8 {% include_relative include_relative/rel_in{{ page.include5 }}.html %} 26 | 27 | Relative to self test: 28 | 29 | - 9 {% include_relative 2014-03-03-yaml-with-dots.md %} 30 | -------------------------------------------------------------------------------- /docs/_docs/maintaining/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Maintaining Jekyll 3 | permalink: /docs/maintaining/ 4 | --- 5 | 6 | **This guide is for Jekyll contributors and maintainers.** These special people contribute to one or more of Jekyll's repositories or help merge the contributions of others. You may find what is written here interesting, but it’s definitely not for everyone. 7 | {: .note .info } 8 | 9 | Hello! This is where we document various processes for maintaining Jekyll. Being a maintainer for any Jekyll project is a big responsibility, so we put together some helpful documentation for various tasks you might do as a maintainer. 10 | 11 | 1. [Affinity teams & their captains](affinity-team-captain/) 12 | 2. [Triaging and issue](triaging-an-issue/) 13 | 3. [Reviewing a pull request](reviewing-a-pull-request/) 14 | 4. [Merging a pull request](merging-a-pull-request/) 15 | 5. [Avoiding burnout](avoiding-burnout/) 16 | 6. [Special Labels](special-labels/) 17 | 18 | Interested in becoming a maintainer? Here is some documentation for **contributors**: 19 | 20 | 1. [Becoming a maintainer](becoming-a-maintainer/) 21 | -------------------------------------------------------------------------------- /lib/jekyll/tags/link.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Tags 5 | class Link < Liquid::Tag 6 | class << self 7 | def tag_name 8 | self.name.split("::").last.downcase 9 | end 10 | end 11 | 12 | def initialize(tag_name, relative_path, tokens) 13 | super 14 | 15 | @relative_path = relative_path.strip 16 | end 17 | 18 | def render(context) 19 | site = context.registers[:site] 20 | 21 | site.each_site_file do |item| 22 | return item.url if item.relative_path == @relative_path 23 | # This takes care of the case for static files that have a leading / 24 | return item.url if item.relative_path == "/#{@relative_path}" 25 | end 26 | 27 | raise ArgumentError, <<-MSG 28 | Could not find document '#{@relative_path}' in tag '#{self.class.tag_name}'. 29 | 30 | Make sure the document exists and the path is correct. 31 | MSG 32 | end 33 | end 34 | end 35 | end 36 | 37 | Liquid::Template.register_tag(Jekyll::Tags::Link.tag_name, Jekyll::Tags::Link) 38 | -------------------------------------------------------------------------------- /docs/_docs/upgrading.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: docs 3 | title: Upgrading 4 | permalink: /docs/upgrading/ 5 | --- 6 | 7 | Upgrading from an older version of Jekyll? Upgrading to a new major version of 8 | Jekyll (e.g. from v2.x to v3.x) may cause some headaches. Take the following 9 | guides to aid your upgrade: 10 | 11 | - [From 0.x to 1.x and 2.x](/docs/upgrading/0-to-2/) 12 | - [From 2.x to 3.x](/docs/upgrading/2-to-3/) 13 | 14 | ## Minor updates 15 | 16 |
    17 |
    Stay Up to Date
    18 |

    We recommend you update Jekyll as often as possible to benefit from 19 | the latest bug fixes. 20 |

    21 |
    22 | 23 | If you followed our setup recommendations and installed [Bundler](http://bundler.io/), run `bundle update jekyll` or simply `bundle update` and all your gems will 24 | update to the latest versions. 25 | 26 | If you don't have Bundler installed, run `gem update jekyll`. 27 | 28 | The procedure is similar [if you use the `github-pages` 29 | gem](https://help.github.com/articles/setting-up-your-github-pages-site-locally-with-jekyll/#keeping-your-site-up-to-date-with-the-github-pages-gem). 30 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | clone_depth: 10 4 | 5 | branches: 6 | only: 7 | - master 8 | - themes 9 | 10 | build: off 11 | 12 | install: 13 | - SET PATH=C:\Ruby%RUBY_FOLDER_VER%\bin;%PATH% 14 | - bundle install --retry 5 --jobs=%NUMBER_OF_PROCESSORS% --clean --path vendor\bundle 15 | 16 | environment: 17 | BUNDLE_WITHOUT: "benchmark:site:development" 18 | matrix: 19 | - RUBY_FOLDER_VER: "24" 20 | TEST_SUITE: "test" 21 | - RUBY_FOLDER_VER: "24" 22 | TEST_SUITE: "cucumber" 23 | - RUBY_FOLDER_VER: "24" 24 | TEST_SUITE: "default-site" 25 | - RUBY_FOLDER_VER: "24-x64" 26 | TEST_SUITE: "test" 27 | - RUBY_FOLDER_VER: "23" 28 | TEST_SUITE: "test" 29 | - RUBY_FOLDER_VER: "22" 30 | TEST_SUITE: "test" 31 | - RUBY_FOLDER_VER: "21" 32 | TEST_SUITE: "test" 33 | 34 | test_script: 35 | - ruby --version 36 | - gem --version 37 | - bundler --version 38 | - bash ./script/cibuild 39 | 40 | cache: 41 | # If one of the files after the right arrow changes, cache will be skipped 42 | - 'vendor\bundle -> appveyor.yml,Gemfile,jekyll.gemspec' 43 | -------------------------------------------------------------------------------- /docs/_posts/2013-05-08-jekyll-1-0-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.0.1 Released" 3 | date: "2013-05-08 23:46:11 +0200" 4 | author: parkr 5 | version: 1.0.1 6 | categories: [release] 7 | --- 8 | 9 | Hot on the trails of v1.0, v1.0.1 is out! Here are the highlights: 10 | 11 | * Add newer `language-` class name prefix to code blocks ([#1037][]) 12 | * Commander error message now preferred over process abort with incorrect args ([#1040][]) 13 | * Do not force use of toc_token when using generate_toc in RDiscount ([#1048][]) 14 | * Make Redcarpet respect the pygments configuration option ([#1053][]) 15 | * Fix the index build with LSI ([#1045][]) 16 | * Don't print deprecation warning when no arguments are specified. ([#1041][]) 17 | * Add missing `` to site template used by `new` subcommand, fixed typos in code ([#1032][]) 18 | 19 | See the [History][] page for more information on this release. 20 | 21 | {% assign issue_numbers = "1037|1040|1048|1053|1045|1041|1032" | split: "|" %} 22 | {% for issue in issue_numbers %} 23 | [#{{ issue }}]: {{ site.repository }}/issues/{{ issue }} 24 | {% endfor %} 25 | 26 | [History]: /docs/history/#v1-0-1 27 | -------------------------------------------------------------------------------- /lib/jekyll/converters/smartypants.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class Kramdown::Parser::SmartyPants < Kramdown::Parser::Kramdown 4 | def initialize(source, options) 5 | super 6 | @block_parsers = [:block_html] 7 | @span_parsers = [:smart_quotes, :html_entity, :typographic_syms, :span_html] 8 | end 9 | end 10 | 11 | module Jekyll 12 | module Converters 13 | class SmartyPants < Converter 14 | safe true 15 | priority :low 16 | 17 | def initialize(config) 18 | Jekyll::External.require_with_graceful_fail "kramdown" 19 | @config = config["kramdown"].dup || {} 20 | @config[:input] = :SmartyPants 21 | end 22 | 23 | def matches(_) 24 | false 25 | end 26 | 27 | def output_ext(_) 28 | nil 29 | end 30 | 31 | def convert(content) 32 | document = Kramdown::Document.new(content, @config) 33 | html_output = document.to_html.chomp 34 | document.warnings.each do |warning| 35 | Jekyll.logger.warn "Kramdown warning:", warning 36 | end 37 | html_output 38 | end 39 | end 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /.github/SUPPORT.markdown: -------------------------------------------------------------------------------- 1 | # Jekyll Support 2 | 3 | ## Getting Help 4 | 5 | **Jekyll's issue tracker is not a support forum.** 6 | 7 | If you're looking for support for Jekyll, there are a lot of options: 8 | 9 | * Read [Jekyll Documentation](https://jekyllrb.com/docs/home/) 10 | * If you have a question about using Jekyll, start a discussion on [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll) 11 | * Chat with Jekyllers — Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc:irc.freenode.net/jekyll) 12 | 13 | There are a bunch of helpful community members on these services that should be willing to point you in the right direction. 14 | 15 | ## Report a bug 16 | 17 | * If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository — First [look for the plugin on rubygems](https://rubygems.org/) then click on the `Homepage` link to access the plugin repository. 18 | * If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new). 19 | 20 | Happy Jekyllin'! 21 | -------------------------------------------------------------------------------- /docs/_posts/2013-07-14-jekyll-1-1-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.1.0 Released" 3 | date: "2013-07-14 19:38:02 +0200" 4 | author: parkr 5 | version: 1.1.0 6 | categories: [release] 7 | --- 8 | 9 | After a month of hard work, the Jekyll core team is excited to announce the release of 10 | Jekyll v1.1.0! This latest release of Jekyll brings some really exciting new additions: 11 | 12 | - Add `docs` subcommand to read Jekyll's docs when offline. ([#1046][]) 13 | - Support passing parameters to templates in `include` tag ([#1204][]) 14 | - Add support for Liquid tags to post excerpts ([#1302][]) 15 | - Fix pagination for subdirectories ([#1198][]) 16 | - Provide better error reporting when generating sites ([#1253][]) 17 | - Latest posts first in non-LSI `related_posts` ([#1271][]) 18 | 19 | See the [GitHub Release][] page for more a more detailed changelog for this release. 20 | 21 | {% assign issue_numbers = "1046|1204|1302|1198|1171|1118|1098|1215|1253|1271" | split: "|" %} 22 | {% for issue in issue_numbers %} 23 | [#{{ issue }}]: {{ site.repository }}/issues/{{ issue }} 24 | {% endfor %} 25 | 26 | [GitHub Release]: {{ site.repository }}/releases/tag/v1.1.0 27 | -------------------------------------------------------------------------------- /docs/_includes/news_contents.html: -------------------------------------------------------------------------------- 1 |
    2 | 33 |
    34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2008-2017 Tom Preston-Werner and Jekyll contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /docs/_includes/analytics.html: -------------------------------------------------------------------------------- 1 | {% if site.gauges_id %} 2 | 3 | 16 | {% endif %} 17 | 18 | {% if site.google_analytics_id %} 19 | 20 | 30 | {% endif %} 31 | -------------------------------------------------------------------------------- /lib/jekyll/converters/markdown/rdiscount_parser.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Converters 5 | class Markdown 6 | class RDiscountParser 7 | def initialize(config) 8 | Jekyll::External.require_with_graceful_fail "rdiscount" 9 | @config = config 10 | @rdiscount_extensions = @config["rdiscount"]["extensions"].map(&:to_sym) 11 | end 12 | 13 | def convert(content) 14 | rd = RDiscount.new(content, *@rdiscount_extensions) 15 | html = rd.to_html 16 | if @config["rdiscount"]["toc_token"] 17 | html = replace_generated_toc(rd, html, @config["rdiscount"]["toc_token"]) 18 | end 19 | html 20 | end 21 | 22 | private 23 | def replace_generated_toc(rd, html, toc_token) 24 | if rd.generate_toc && html.include?(toc_token) 25 | utf8_toc = rd.toc_content 26 | utf8_toc.force_encoding("utf-8") if utf8_toc.respond_to?(:force_encoding) 27 | html.gsub(toc_token, utf8_toc) 28 | else 29 | html 30 | end 31 | end 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /docs/_includes/anchor_links.html: -------------------------------------------------------------------------------- 1 | 34 | -------------------------------------------------------------------------------- /docs/_posts/2013-09-06-jekyll-1-2-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.2.0 Released" 3 | date: "2013-09-06 22:02:41 -0400" 4 | author: parkr 5 | version: 1.2.0 6 | categories: [release] 7 | --- 8 | 9 | After nearly a month and a half of hard work, the Jekyll team is happy to 10 | announce the release of v1.2.0. It's chock full of bug fixes and some 11 | enhancements that we think you'll love. 12 | 13 | Here are a few things we think you'll want to know about this release: 14 | 15 | * Run `jekyll serve --detach` to boot up a WEBrick server in the background. **Note:** you'll need to run `kill [server_pid]` to shut the server down. 16 | * You can now **disable automatically-generated excerpts** if you set `excerpt_separator` to `""`. 17 | * If you're moving around pages and post, you can now check for **URL conflicts** by running `jekyll doctor`. 18 | * If you're a fan of the drafts feature, you'll be happy to know we've added `-D`, a shortened version of `--drafts`. 19 | * Permalinks with special characters should now generate without errors. 20 | * Expose the current Jekyll version as the `jekyll.version` Liquid variable. 21 | 22 | For a full run-down, visit our [change log](/docs/history/)! 23 | -------------------------------------------------------------------------------- /lib/theme_template/LICENSE.txt.erb: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) <%= Time.now.year %> <%= user_name %> 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /test/source/sitemap.xml: -------------------------------------------------------------------------------- 1 | --- 2 | layout: nil 3 | --- 4 | 5 | 7 | 8 | 9 | http://example.com 10 | {{ site.time | date: "%Y-%m-%d" }} 11 | daily 12 | 1.0 13 | 14 | 15 | {% for post in site.posts %} 16 | 17 | http://example.com{{ post.url }}/ 18 | {{ post.date | date: "%Y-%m-%d" }} 19 | monthly 20 | 0.2 21 | 22 | {% endfor %} 23 | 24 | {% for page in site.html_pages %} 25 | 26 | http://example.com{{ page.url }} 27 | {{ site.time | date: "%Y-%m-%d" }} 28 | {% if page.changefreq %}{{ page.changefreq }}{% endif %} 29 | {% if page.priority %}{{ page.priority }}{% endif %} 30 | 31 | {% endfor %} 32 | 33 | -------------------------------------------------------------------------------- /docs/_posts/2013-05-12-jekyll-1-0-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: "Jekyll 1.0.2 Released" 3 | date: "2013-05-12 14:45:00 +0200" 4 | author: parkr 5 | version: 1.0.2 6 | categories: [release] 7 | --- 8 | 9 | v1.0.2 has some key bugfixes that optionally restore some behaviour from pre-1.0 10 | releases, and fix some other annoying bugs: 11 | 12 | * Backwards-compatibilize relative permalinks ([#1081][]) 13 | * Add `jekyll doctor` command to check site for any known compatibility problems ([#1081][]) 14 | * Deprecate old config `server_port`, match to `port` if `port` isn't set ([#1084][]) 15 | * Update pygments.rb and kramdon versions to 0.5.0 and 1.0.2, respectively ([#1061][], [#1067][]) 16 | * Fix issue when post categories are numbers ([#1078][]) 17 | * Add a `data-lang=""` attribute to Redcarpet code blocks ([#1066][]) 18 | * Catching that Redcarpet gem isn't installed ([#1059][]) 19 | 20 | See the [History][] page for more information on this release. 21 | 22 | {% assign issue_numbers = "1059|1061|1066|1067|1078|1081|1084" | split: "|" %} 23 | {% for issue in issue_numbers %} 24 | [#{{ issue }}]: {{ site.repository }}/issues/{{ issue }} 25 | {% endfor %} 26 | 27 | [History]: /docs/history/#v1-0-2 28 | -------------------------------------------------------------------------------- /docs/_posts/2016-02-08-jekyll-3-0-3-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.0.3 Released' 3 | date: 2016-02-08 10:39:08 -0800 4 | author: parkr 5 | version: 3.0.3 6 | categories: [release] 7 | --- 8 | 9 | [GitHub Pages upgraded to Jekyll 3.0.2][1] last week. With a testbed of 10 | over a million sites, this really put Jekyll 3 through the wringer. This 11 | release addresses a handful of bugs that were surfaced as a result. The 12 | fixes: 13 | 14 | * Fix problem where outputting to a folder would have two extensions 15 | * Handle tildes (`~`) in filenames properly 16 | * Fix issue when comparing documents without dates 17 | * Include line numbers in liquid error output 18 | 19 | Read more on the [changelog](/docs/history/#v3-0-3) with links to the 20 | related patches. 21 | 22 | Please keep [submitting bugs][2] as you find them! Please do take a look 23 | [in our various help resources](/help/) before filing a bug and use [our 24 | forum][3] for asking questions and getting help on a specific problem 25 | you're having. 26 | 27 | Happy Jekylling! 28 | 29 | [1]: https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0 30 | [2]: {{ site.repository }}/issues 31 | [3]: https://talk.jekyllrb.com/ 32 | -------------------------------------------------------------------------------- /docs/community/index.md: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | title: JekyllConf 4 | redirect_from: /community/index.html 5 | permalink: /jekyllconf/ 6 | --- 7 | 8 | [JekyllConf](http://jekyllconf.com) is a free, online conference for all things Jekyll hosted by [CloudCannon](http://cloudcannon.com). Each year members of the Jekyll community speak about interesting use cases, tricks they've learned, or meta Jekyll topics. 9 | 10 | ## Featured 11 | 12 | {% assign random = site.time | date: "%s%N" | modulo: site.data.jekyllconf-talks.size %} 13 | {% assign featured = site.data.jekyllconf-talks[random] %} 14 | 15 | {{ featured.topic }} - [{{ featured.speaker }}](https://twitter.com/{{ featured.twitter_handle }}) 16 |
    17 | 18 |
    19 | 20 | {% assign talks = site.data.jekyllconf-talks | group_by: 'year' %} 21 | {% for year in talks reversed %} 22 | ## {{ year.name }} 23 | {% for talk in year.items %} 24 | * [{{ talk.topic }}](https://youtu.be/{{ talk.youtube_id }}) - [{{ talk.speaker }}](https://twitter.com/{{ talk.twitter_handle }}) 25 | {% endfor %} 26 | {% endfor %} 27 | -------------------------------------------------------------------------------- /docs/_sass/_mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | -webkit-box-shadow: $shadow; 3 | -moz-box-shadow: $shadow; 4 | box-shadow: $shadow; 5 | } 6 | 7 | @mixin border-radius($radius...) { 8 | -webkit-border-radius: $radius; 9 | -moz-border-radius: $radius; 10 | border-radius: $radius; 11 | } 12 | 13 | @mixin border-top-left-radius($radius...) { 14 | -webkit-border-top-left-radius: $radius; 15 | -moz-border-radius-topleft: $radius; 16 | border-top-left-radius: $radius; 17 | } 18 | 19 | @mixin border-top-right-radius($radius...) { 20 | -webkit-border-top-right-radius: $radius; 21 | -moz-border-radius-topright: $radius; 22 | border-top-right-radius: $radius; 23 | } 24 | 25 | @mixin transition($transition...) { 26 | -webkit-transition: $transition; 27 | -moz-transition: $transition; 28 | -o-transition: $transition; 29 | transition: $transition; 30 | } 31 | 32 | @mixin user-select($select...) { 33 | -webkit-user-select: $select; /* Chrome all / Safari all */ 34 | -moz-user-select: $select; /* Firefox all */ 35 | -ms-user-select: $select; /* IE 10+ */ 36 | -o-user-select: $select; 37 | user-select: $select; 38 | } 39 | -------------------------------------------------------------------------------- /lib/jekyll/utils/internet.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Utils 5 | module Internet 6 | 7 | # Public: Determine whether the present device has a connection to 8 | # the Internet. This allows plugin writers which require the outside 9 | # world to have a neat fallback mechanism for offline building. 10 | # 11 | # Example: 12 | # if Internet.connected? 13 | # Typhoeus.get("https://pages.github.com/versions.json") 14 | # else 15 | # Jekyll.logger.warn "Warning:", "Version check has been disabled." 16 | # Jekyll.logger.warn "", "Connect to the Internet to enable it." 17 | # nil 18 | # end 19 | # 20 | # Returns true if a DNS call can successfully be made, or false if not. 21 | module_function 22 | def connected? 23 | !dns("example.com").nil? 24 | end 25 | 26 | private 27 | module_function 28 | def dns(domain) 29 | require "resolv" 30 | Resolv::DNS.open do |resolver| 31 | resolver.getaddress(domain) 32 | end 33 | rescue Resolv::ResolvError, Resolv::ResolvTimeout 34 | nil 35 | end 36 | 37 | end 38 | end 39 | end 40 | -------------------------------------------------------------------------------- /docs/_posts/2013-12-07-jekyll-1-4-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.4.0 Released' 3 | date: 2013-12-07 13:55:28 -0600 4 | author: mattr- 5 | version: 1.4.0 6 | categories: [release] 7 | --- 8 | 9 | About a month after the release of Jekyll v1.3.0, we are releasing 10 | Jekyll v1.4.0. This release will be the last non-patch release to support Ruby 11 | 1.8.7 and our next release will be Jekyll 2.0.0. 12 | 13 | Here are a few things we think you'll want to know about this release: 14 | 15 | * TOML is now a supported markup language for config files. 16 | 17 | * Maruku has been updated to 0.7.0 which provides some new features and 18 | a ton of bugfixes over the previous 0.6.x releases. 19 | 20 | * Non-`gem` Plugins are now sorted alphabetically by filename before they're 21 | processed, which can provide a rudimentary way to establish a load order for 22 | plugins. 23 | 24 | For a full run-down, visit our [change log](/docs/history/)! 25 | 26 | As always, Jekyll wouldn't be possible without the contributions from 27 | others in the Jekyll community. We'd like to thank the following people 28 | for contributing to this release: Anatol Broder, David Sawyer, Greg 29 | Karékinian, Jordon Bedwell, Matthew Iversen, Persa Zula, and Yi Zeng. 30 | -------------------------------------------------------------------------------- /test/test_rdiscount.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestRdiscount < JekyllUnitTest 6 | context "rdiscount" do 7 | setup do 8 | if jruby? 9 | then skip( 10 | "JRuby does not perform well with CExt, test disabled." 11 | ) 12 | end 13 | 14 | config = { 15 | "markdown" => "rdiscount", 16 | "rdiscount" => { 17 | "toc_token" => "{:toc}", 18 | "extensions" => %w(smart generate_toc), 19 | }, 20 | } 21 | 22 | @markdown = Converters::Markdown.new config 23 | end 24 | 25 | should "pass rdiscount extensions" do 26 | assert_equal "

    “smart”

    ", @markdown.convert('"smart"').strip 27 | end 28 | 29 | should "render toc" do 30 | toc = <<-TOC 31 | 32 |

    Header 1

    33 | 34 | 35 |

    Header 2

    36 | 37 |

    44 | 45 |

    46 | TOC 47 | assert_equal toc.strip, 48 | @markdown.convert("# Header 1\n\n## Header 2\n\n{:toc}").strip 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /lib/theme_template/example/index.html: -------------------------------------------------------------------------------- 1 | --- 2 | layout: page 3 | --- 4 | 5 | Lorem ipsum dolor sit amet, quo id prima corrumpit pertinacia, id ius dolor dolores, an veri pertinax explicari mea. Agam solum et qui, his id ludus graeco adipiscing. Duis theophrastus nam in, at his vidisse atomorum. Tantas gloriatur scripserit ne eos. Est wisi tempor habemus at, ei graeco dissentiet eos. Ne usu aliquip sanctus conceptam, te vis ignota animal, modus latine contentiones ius te. 6 | 7 | {% for post in site.posts %} 8 |

    {{ post.title }}

    9 |
    {{ post.excerpt }}
    10 | {% endfor %} 11 | 12 | Te falli veritus sea, at molestiae scribentur deterruisset vix, et mea zril phaedrum vulputate. No cum dicit consulatu. Ut has nostro noluisse expetendis, te pro quaeque disputando, eu sed summo omnes. Eos at tale aperiam, usu cu propriae quaestio constituto, sed aperiam erroribus temporibus an. 13 | 14 | Quo eu liber mediocritatem, vix an delectus eleifend, iuvaret suscipit ei vel. Partem invenire per an, mea postulant dissentias eu, ius tantas audire nominavi eu. Dicunt tritani veritus ex vis, mei in case sententiae. At exerci democritum nam, cu lobortis iracundia mei. Alia eligendi consectetuer eu sed, paulo docendi noluisse sit ex. 15 | -------------------------------------------------------------------------------- /docs/_posts/2014-01-13-jekyll-1-4-3-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 1.4.3 Released' 3 | date: 2014-01-13 17:43:32 -0800 4 | author: benbalter 5 | version: 1.4.3 6 | categories: [release] 7 | --- 8 | 9 | Jekyll 1.4.3 contains two **critical** security fixes. If you run Jekyll locally 10 | and do not run Jekyll in "safe" mode (e.g. you do not build Jekyll sites on behalf 11 | of others), you are not affected and are not required to update at this time. 12 | ([See pull request.]({{ site.repository }}/pull/1944)) 13 | 14 | Versions of Jekyll prior to 1.4.3 and greater than 1.2.0 may allow malicious 15 | users to expose the content of files outside the source directory in the 16 | generated output via improper symlink sanitization, potentially resulting in an 17 | inadvertent information disclosure. 18 | 19 | Versions of Jekyll prior to 1.4.3 may also allow malicious users to write 20 | arbitrary `.html` files outside of the destination folder via relative path 21 | traversal, potentially overwriting otherwise-trusted content with arbitrary HTML 22 | or Javascript depending on your server's configuration. 23 | 24 | *Maintainer's note: Many thanks to @gregose and @charliesome for discovering 25 | these vulnerabilities, and to @BenBalter and @alindeman for writing the patch.* 26 | -------------------------------------------------------------------------------- /docs/_docs/support.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Support 3 | permalink: "/docs/support/" 4 | note: This file is autogenerated. Edit /.github/SUPPORT.markdown instead. 5 | --- 6 | 7 | ## Getting Help 8 | 9 | **Jekyll's issue tracker is not a support forum.** 10 | 11 | If you're looking for support for Jekyll, there are a lot of options: 12 | 13 | * Read [Jekyll Documentation](https://jekyllrb.com/docs/home/) 14 | * If you have a question about using Jekyll, start a discussion on [Jekyll Forum](https://talk.jekyllrb.com/) or [StackOverflow](https://stackoverflow.com/questions/tagged/jekyll) 15 | * Chat with Jekyllers — Join [our Gitter channel](https://gitter.im/jekyll/jekyll) or [our IRC channel on Freenode](irc:irc.freenode.net/jekyll) 16 | 17 | There are a bunch of helpful community members on these services that should be willing to point you in the right direction. 18 | 19 | ## Report a bug 20 | 21 | * If you think you've found a bug within a Jekyll plugin, open an issue in that plugin's repository — First [look for the plugin on rubygems](https://rubygems.org/) then click on the `Homepage` link to access the plugin repository. 22 | * If you think you've found a bug within Jekyll itself, [open an issue](https://github.com/jekyll/jekyll/issues/new). 23 | 24 | Happy Jekyllin'! 25 | -------------------------------------------------------------------------------- /script/test: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # Usage: 5 | # script/test 6 | # script/test [ruby|jruby] 7 | # script/test 8 | 9 | if [ -d test/dest ] 10 | then rm -r test/dest 11 | fi 12 | 13 | # ----------------------------------------------------------------------------- 14 | # If you send us a ruby then we use that, if you do not then we test with 15 | # whatever we can detect, this way you can run both suites when you test out 16 | # your source, we expect full coverage now, not just MRI. 17 | # ----------------------------------------------------------------------------- 18 | 19 | if [[ "$1" == "ci" ]] 20 | then 21 | rubies=( 22 | ruby 23 | ) 24 | 25 | shift 26 | elif [[ "$1" == "ruby" ]] || [[ "$1" == "jruby" ]] 27 | then 28 | rubies=( 29 | $1 30 | ) 31 | 32 | shift 33 | else 34 | rubies=($(script/rubies)) 35 | fi 36 | 37 | 38 | for ruby in $rubies; do 39 | if [[ "$ruby" == "jruby" ]] 40 | then 41 | testopts="" 42 | else 43 | testopts="--profile" 44 | fi 45 | 46 | if [[ $# -lt 1 ]] 47 | then 48 | set -x 49 | time $ruby -S bundle exec \ 50 | rake TESTOPTS=$testopts test 51 | else 52 | set -x 53 | time $ruby -S bundle exec ruby -I test \ 54 | "$@" $testops 55 | fi 56 | done 57 | -------------------------------------------------------------------------------- /lib/jekyll/liquid_renderer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "jekyll/liquid_renderer/file" 4 | require "jekyll/liquid_renderer/table" 5 | 6 | module Jekyll 7 | class LiquidRenderer 8 | def initialize(site) 9 | @site = site 10 | Liquid::Template.error_mode = @site.config["liquid"]["error_mode"].to_sym 11 | reset 12 | end 13 | 14 | def reset 15 | @stats = {} 16 | end 17 | 18 | def file(filename) 19 | filename = @site.in_source_dir(filename).sub( 20 | %r!\A#{Regexp.escape(@site.source)}/!, 21 | "" 22 | ) 23 | 24 | LiquidRenderer::File.new(self, filename).tap do 25 | @stats[filename] ||= new_profile_hash 26 | @stats[filename][:count] += 1 27 | end 28 | end 29 | 30 | def increment_bytes(filename, bytes) 31 | @stats[filename][:bytes] += bytes 32 | end 33 | 34 | def increment_time(filename, time) 35 | @stats[filename][:time] += time 36 | end 37 | 38 | def stats_table(n = 50) 39 | LiquidRenderer::Table.new(@stats).to_s(n) 40 | end 41 | 42 | def self.format_error(e, path) 43 | "#{e.message} in #{path}" 44 | end 45 | 46 | private 47 | def new_profile_hash 48 | Hash.new { |hash, key| hash[key] = 0 } 49 | end 50 | end 51 | end 52 | -------------------------------------------------------------------------------- /lib/jekyll/related_posts.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class RelatedPosts 5 | class << self 6 | attr_accessor :lsi 7 | end 8 | 9 | attr_reader :post, :site 10 | 11 | def initialize(post) 12 | @post = post 13 | @site = post.site 14 | Jekyll::External.require_with_graceful_fail("classifier-reborn") if site.lsi 15 | end 16 | 17 | def build 18 | return [] unless site.posts.docs.size > 1 19 | 20 | if site.lsi 21 | build_index 22 | lsi_related_posts 23 | else 24 | most_recent_posts 25 | end 26 | end 27 | 28 | def build_index 29 | self.class.lsi ||= begin 30 | lsi = ClassifierReborn::LSI.new(:auto_rebuild => false) 31 | Jekyll.logger.info("Populating LSI...") 32 | 33 | site.posts.docs.each do |x| 34 | lsi.add_item(x) 35 | end 36 | 37 | Jekyll.logger.info("Rebuilding index...") 38 | lsi.build_index 39 | Jekyll.logger.info("") 40 | lsi 41 | end 42 | end 43 | 44 | def lsi_related_posts 45 | self.class.lsi.find_related(post, 11) 46 | end 47 | 48 | def most_recent_posts 49 | @most_recent_posts ||= (site.posts.docs.reverse - [post]).first(10) 50 | end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /test/test_layout_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestLayoutReader < JekyllUnitTest 6 | context "reading layouts" do 7 | setup do 8 | config = Jekyll::Configuration::DEFAULTS.merge({ "source" => source_dir, 9 | "destination" => dest_dir, }) 10 | @site = fixture_site(config) 11 | end 12 | 13 | should "read layouts" do 14 | layouts = LayoutReader.new(@site).read 15 | assert_equal ["default", "simple", "post/simple"].sort, layouts.keys.sort 16 | end 17 | 18 | context "when no _layouts directory exists in CWD" do 19 | should "know to use the layout directory relative to the site source" do 20 | assert_equal LayoutReader.new(@site).layout_directory, source_dir("_layouts") 21 | end 22 | end 23 | 24 | context "when a _layouts directory exists in CWD" do 25 | setup do 26 | allow(File).to receive(:directory?).and_return(true) 27 | allow(Dir).to receive(:pwd).and_return(source_dir("blah")) 28 | end 29 | 30 | should "know to use the layout directory relative to CWD" do 31 | assert_equal LayoutReader.new(@site).layout_directory, source_dir("blah/_layouts") 32 | end 33 | end 34 | end 35 | end 36 | -------------------------------------------------------------------------------- /lib/jekyll/liquid_renderer/file.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class LiquidRenderer 5 | class File 6 | def initialize(renderer, filename) 7 | @renderer = renderer 8 | @filename = filename 9 | end 10 | 11 | def parse(content) 12 | measure_time do 13 | @template = Liquid::Template.parse(content, :line_numbers => true) 14 | end 15 | 16 | self 17 | end 18 | 19 | def render(*args) 20 | measure_time do 21 | measure_bytes do 22 | @template.render(*args) 23 | end 24 | end 25 | end 26 | 27 | def render!(*args) 28 | measure_time do 29 | measure_bytes do 30 | @template.render!(*args) 31 | end 32 | end 33 | end 34 | 35 | def warnings 36 | @template.warnings 37 | end 38 | 39 | private 40 | 41 | def measure_bytes 42 | yield.tap do |str| 43 | @renderer.increment_bytes(@filename, str.bytesize) 44 | end 45 | end 46 | 47 | def measure_time 48 | before = Time.now 49 | yield 50 | ensure 51 | after = Time.now 52 | @renderer.increment_time(@filename, after - before) 53 | end 54 | end 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /docs/_posts/2017-09-21-jekyll-3-6-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll turns 3.6!' 3 | date: 2017-09-21 16:38:20 -0400 4 | author: parkr 5 | version: 3.6.0 6 | categories: [release] 7 | --- 8 | 9 | Another much-anticipated release of Jekyll. This release comes with it Rouge 2 support, but note you can continue to use Rouge 1 if you'd prefer. We also now require Ruby 2.1.0 as 2.0.x is no longer supported by the Ruby team. 10 | 11 | Otherwise, it's a massive bug-fix release! A few bugs were found and squashed with our `Drop` implementation. We're using the Schwartzian transform to speed up our custom sorting (thanks, Perl community!). We now protect against images that are named like posts and we generally worked on guarding our code to enforce requirements, instead of assuming the input was as expected. 12 | 13 | Please let us know if you find any bugs! You can see [the full history here](/docs/history/#v3-6-0). 14 | 15 | Many thanks to our contributors who helped make this release possible: Aleksander Kuś, André Jaenisch, Antonio Argote, ashmaroli, Ben Balter, Bogdan, Bradley Meck, David Zhang, Florian Thomas, Frank Taillandier, Jordon Bedwell, Joshua Byrd, Kyle Zhao, lymaconsulting, Maciej Bembenista, Matt Sturgeon, Natanael Arndt, Ohad Schneider, Pat Hawks, Pedro Lamas, and Sid Verma. 16 | 17 | As always, Happy Jekylling! 18 | -------------------------------------------------------------------------------- /lib/jekyll/drops/site_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Drops 5 | class SiteDrop < Drop 6 | extend Forwardable 7 | 8 | mutable false 9 | 10 | def_delegator :@obj, :site_data, :data 11 | def_delegators :@obj, :time, :pages, :static_files, :documents, 12 | :tags, :categories 13 | 14 | def [](key) 15 | if @obj.collections.key?(key) && key != "posts" 16 | @obj.collections[key].docs 17 | else 18 | super(key) 19 | end 20 | end 21 | 22 | def key?(key) 23 | (@obj.collections.key?(key) && key != "posts") || super 24 | end 25 | 26 | def posts 27 | @site_posts ||= @obj.posts.docs.sort { |a, b| b <=> a } 28 | end 29 | 30 | def html_pages 31 | @site_html_pages ||= @obj.pages.select do |page| 32 | page.html? || page.url.end_with?("/") 33 | end 34 | end 35 | 36 | def collections 37 | @site_collections ||= @obj.collections.values.sort_by(&:label).map(&:to_liquid) 38 | end 39 | 40 | # return nil for `{{ site.config }}` even if --config was passed via CLI 41 | def config; end 42 | 43 | private 44 | def_delegator :@obj, :config, :fallback_data 45 | end 46 | end 47 | end 48 | -------------------------------------------------------------------------------- /script/travis: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Usage: script/travis [ruby-version [file]] 3 | # Example: script/travis 2.0 test/failing_test.rb 4 | # Example: script/travis 2.3.0 5 | set -e 6 | 7 | mkdir -p vendor/docker 8 | docker rm -fv docker-travis > /dev/null 2>&1 || true 9 | docker run --volume=$(pwd):/home/travis/builds/jekyll/jekyll \ 10 | --workdir=/home/travis/builds/jekyll/jekyll \ 11 | --volume=$(pwd)/vendor/docker:/home/travis/builds/jekyll/jekyll/vendor/bundle \ 12 | --user=travis --name=docker-travis -dit quay.io/travisci/travis-ruby \ 13 | bash > /dev/null 14 | 15 | status=0 16 | if [ $# -eq 2 ]; then 17 | docker exec -it docker-travis bash -ilc " \ 18 | rvm use --install --binary --fuzzy $1 19 | bundle install --path vendor/bundle -j 12 \\ 20 | --without benchmark:site:development 21 | bundle clean 22 | script/test $2 23 | " || status=$? 24 | 25 | elif [ $# -eq 1 ]; then 26 | docker exec -it docker-travis bash -ilc " \ 27 | rvm use --install --binary --fuzzy $1 28 | bundle install --path vendor/bundle -j 12 \\ 29 | --without benchmark:site:development 30 | bundle clean 31 | bundle exec rake 32 | " || status=$? 33 | 34 | else 35 | docker exec -it docker-travis \ 36 | bash -il || status=$? 37 | fi 38 | 39 | docker rm -fv docker-travis > /dev/null 40 | exit $status 41 | -------------------------------------------------------------------------------- /docs/_config.yml: -------------------------------------------------------------------------------- 1 | sass: 2 | style: compressed 3 | 4 | gauges_id: 503c5af6613f5d0f19000027 5 | google_analytics_id: UA-50755011-1 6 | google_site_verification: onQcXpAvtHBrUI5LlroHNE_FP0b2qvFyPq7VZw36iEY 7 | 8 | repository: https://github.com/jekyll/jekyll 9 | 10 | timezone: America/Los_Angeles 11 | 12 | defaults: 13 | - 14 | scope: 15 | path: "_docs" 16 | type: "docs" 17 | values: 18 | layout: "docs" 19 | - 20 | scope: 21 | path: "_posts" 22 | type: "posts" 23 | values: 24 | layout: "news_item" 25 | image: /img/twitter-card.png 26 | 27 | collections: 28 | docs: 29 | permalink: /:collection/:path/ 30 | output: true 31 | posts: 32 | permalink: /news/:year/:month/:day/:title/ 33 | output: true 34 | tutorials: 35 | output: true 36 | 37 | name: Jekyll • Simple, blog-aware, static sites 38 | description: Transform your plain text into static websites and blogs 39 | url: https://jekyllrb.com 40 | 41 | twitter: 42 | username: jekyllrb 43 | 44 | logo: /img/logo-2x.png 45 | 46 | plugins: 47 | - jekyll-avatar 48 | - jekyll-feed 49 | - jekyll-mentions 50 | - jekyll-redirect-from 51 | - jekyll-seo-tag 52 | - jekyll-sitemap 53 | - jemoji 54 | 55 | exclude: 56 | - .gitignore 57 | - CNAME 58 | - icomoon-selection.json 59 | - readme.md 60 | -------------------------------------------------------------------------------- /test/test_coffeescript.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestCoffeeScript < JekyllUnitTest 6 | context "converting CoffeeScript" do 7 | setup do 8 | External.require_with_graceful_fail("jekyll-coffeescript") 9 | @site = fixture_site 10 | @site.process 11 | @test_coffeescript_file = dest_dir("js/coffeescript.js") 12 | @js_output = <<-JS 13 | (function() { 14 | $(function() { 15 | var cube, cubes, list, num, square; 16 | list = [1, 2, 3, 4, 5]; 17 | square = function(x) { 18 | return x * x; 19 | }; 20 | cube = function(x) { 21 | return square(x) * x; 22 | }; 23 | cubes = (function() { 24 | var i, len, results; 25 | results = []; 26 | for (i = 0, len = list.length; i < len; i++) { 27 | num = list[i]; 28 | results.push(math.cube(num)); 29 | } 30 | return results; 31 | })(); 32 | if (typeof elvis !== "undefined" && elvis !== null) { 33 | return alert("I knew it!"); 34 | } 35 | }); 36 | 37 | }).call(this); 38 | JS 39 | end 40 | 41 | should "write a JS file in place" do 42 | assert_exist @test_coffeescript_file 43 | end 44 | 45 | should "produce JS" do 46 | assert_equal @js_output, File.read(@test_coffeescript_file) 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /docs/_posts/2016-02-19-jekyll-3-1-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.1.2 Released!' 3 | date: 2016-02-19 15:24:00 -0800 4 | author: parkr 5 | version: 3.1.2 6 | categories: [release] 7 | --- 8 | 9 | Happy Friday from sunny California! Today, we're excited to announce the release of Jekyll v3.1.2, which comes with some crucial bug fixes: 10 | 11 | * If a syntax error is encountered by Liquid, it will now print the line number. 12 | * A nasty war between symbols and strings in our configuration hash caused kramdown syntax highlighting to break. That has been resolved; you stand victorious! 13 | * A tilde at the beginning of a filename will no longer crash Jekyll. 14 | * The `titleize` filter mistakenly dropped words that were already capitalized. Fixed! 15 | * Permalinks which end in a slash will now always output as a folder with an `index.html` inside. 16 | 17 | Nitty-gritty details, like always, are available in the [history](/docs/history/). 18 | 19 | Thanks to those who contributed to this release: Alfred Xing, atomicules, bojanland, Brenton Horne, Carlos Garcés, Cash Costello, Chris, chrisfinazzo, Daniel Schildt, Dean Attali, Florian Thomas, Jordon Bedwell, Juuso Mikkonen, Katya Demidova, lonnen, Manabu Sakai, Michael Lee, Michael Lyons, Mitesh Shah, Nicolas Hoizey, Parker Moore, Pat Hawks, Prayag Verma, Robert Martin, Suriyaa Kudo, and toshi. 20 | -------------------------------------------------------------------------------- /script/stackprof: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require "bundler/setup" 4 | require "json" 5 | require "stackprof" 6 | require File.expand_path("../lib/jekyll", __dir__) 7 | 8 | MODE = ARGV.first || "cpu" 9 | PROF_OUTPUT_FILE = File.expand_path("../tmp/stackprof-#{MODE}-#{Time.now.strftime("%Y%m%d%H%M")}.dump", __dir__) 10 | 11 | puts "Stackprof Mode: #{MODE}" 12 | 13 | unless File.exist?(PROF_OUTPUT_FILE) 14 | StackProf.run( 15 | mode: MODE.to_sym, 16 | interval: 100, 17 | raw: true, 18 | out: PROF_OUTPUT_FILE 19 | ) do 20 | puts "GC Stats:", JSON.pretty_generate(GC.stat) 21 | GC.disable 22 | 23 | Jekyll::Commands::Build.process({'source' => 'docs'}) 24 | 25 | puts 'GC Stats:' 26 | GC.start(full_mark: true, immediate_sweep: false) 27 | puts JSON.pretty_generate(GC.stat) 28 | end 29 | end 30 | 31 | options = { 32 | sort: true, 33 | limit: 30, 34 | format: :text, 35 | } 36 | 37 | # You can also do other things. Examples: 38 | # https://github.com/tmm1/stackprof/blob/master/bin/stackprof 39 | report = StackProf::Report.new(Marshal.load(IO.binread(PROF_OUTPUT_FILE))) 40 | report.print_text( 41 | options[:sort], 42 | options[:limit], 43 | options[:select_files], 44 | options[:reject_files], 45 | options[:select_names], 46 | options[:reject_names] 47 | ) 48 | 49 | puts "Results stored in #{PROF_OUTPUT_FILE}" 50 | -------------------------------------------------------------------------------- /docs/_posts/2014-11-08-jekyll-2-5-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 2.5.1 Released' 3 | date: 2014-11-09 09:47:52 -0800 4 | author: parkr 5 | version: 2.5.1 6 | categories: [release] 7 | --- 8 | 9 | Hot on the heels of v2.5.0, this release brings relief to our Windows 10 | users. It includes a fix for a 2.5.0 path sanitation change that has been 11 | confirmed to work on Windows. 12 | 13 | To our Windows users: while we don't officially support Windows, we don't 14 | wish to impede your normal use of Jekyll at all. Our lack of full support 15 | for Windows is due to our lack of a Windows machine for development testing 16 | (no one on the core team has a Windows machine upon which to test new 17 | release candidates), not due to any malice or willful oversight. If you 18 | come to us with an issue, we are more than happy to work through it with 19 | you to come to a solution that works for all platforms. Along those lines, 20 | we have created a [**Windows Test Force**][] (WTF) which is a group of Jekyll 21 | users dedicated to making sure all future releases work on Windows *before* 22 | they're released so we don't have this issue again. A special thanks goes 23 | out to the initial WTF team members, XhmikosR, Julian Thilo, Pedro Rogério, 24 | and Alfred Xing. 25 | 26 | Happy Jekylling! 27 | 28 | [**Windows Test Force**]: https://github.com/jekyll/jekyll/issues/3069 29 | -------------------------------------------------------------------------------- /lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb: -------------------------------------------------------------------------------- 1 | --- 2 | layout: post 3 | title: "Welcome to Jekyll!" 4 | date: <%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %> 5 | categories: jekyll update 6 | --- 7 | You’ll find this post in your `_posts` directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run `jekyll serve`, which launches a web server and auto-regenerates your site when a file is updated. 8 | 9 | To add new posts, simply add a file in the `_posts` directory that follows the convention `YYYY-MM-DD-name-of-post.ext` and includes the necessary front matter. Take a look at the source for this post to get an idea about how it works. 10 | 11 | Jekyll also offers powerful support for code snippets: 12 | 13 | {% highlight ruby %} 14 | def print_hi(name) 15 | puts "Hi, #{name}" 16 | end 17 | print_hi('Tom') 18 | #=> prints 'Hi, Tom' to STDOUT. 19 | {% endhighlight %} 20 | 21 | Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk]. 22 | 23 | [jekyll-docs]: https://jekyllrb.com/docs/home 24 | [jekyll-gh]: https://github.com/jekyll/jekyll 25 | [jekyll-talk]: https://talk.jekyllrb.com/ 26 | -------------------------------------------------------------------------------- /test/source/css/screen.css: -------------------------------------------------------------------------------- 1 | /*****************************************************************************/ 2 | /* 3 | /* Common 4 | /* 5 | /*****************************************************************************/ 6 | 7 | /* Global Reset */ 8 | 9 | * { 10 | margin: 0; 11 | padding: 0; 12 | } 13 | 14 | html, body { 15 | height: 100%; 16 | } 17 | 18 | body { 19 | background-color: white; 20 | font: 13.34px helvetica, arial, clean, sans-serif; 21 | *font-size: small; 22 | text-align: center; 23 | } 24 | 25 | h1, h2, h3, h4, h5, h6 { 26 | font-size: 100%; 27 | } 28 | 29 | h1 { 30 | margin-bottom: 1em; 31 | } 32 | 33 | p { 34 | margin: 1em 0; 35 | } 36 | 37 | a { 38 | color: #00a; 39 | } 40 | 41 | a:hover { 42 | color: black; 43 | } 44 | 45 | a:visited { 46 | color: #a0a; 47 | } 48 | 49 | table { 50 | font-size: inherit; 51 | font: 100%; 52 | } 53 | 54 | /*****************************************************************************/ 55 | /* 56 | /* Site 57 | /* 58 | /*****************************************************************************/ 59 | 60 | .site { 61 | font-size: 110%; 62 | text-align: justify; 63 | width: 40em; 64 | margin: 3em auto 2em auto; 65 | line-height: 1.5em; 66 | } 67 | 68 | .title { 69 | color: #a00; 70 | font-weight: bold; 71 | margin-bottom: 2em; 72 | } 73 | 74 | .site .meta { 75 | color: #aaa; 76 | } -------------------------------------------------------------------------------- /test/test_excerpt_drop.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | 5 | class TestExcerptDrop < JekyllUnitTest 6 | context "an excerpt drop" do 7 | setup do 8 | @site = fixture_site 9 | @site.read 10 | @doc = @site.docs_to_write.find { |d| !d.data["layout"].nil? } 11 | @doc_drop = @doc.to_liquid 12 | @excerpt = @doc.data["excerpt"] 13 | @excerpt_drop = @excerpt.to_liquid 14 | end 15 | 16 | should "have the right thing" do 17 | assert @doc.is_a? Jekyll::Document 18 | assert @doc_drop.is_a? Jekyll::Drops::DocumentDrop 19 | assert @excerpt.is_a? Jekyll::Excerpt 20 | assert @excerpt_drop.is_a? Jekyll::Drops::ExcerptDrop 21 | end 22 | 23 | should "not have an excerpt" do 24 | assert_nil @excerpt.data["excerpt"] 25 | assert @excerpt_drop.class.invokable? "excerpt" 26 | assert_nil @excerpt_drop["excerpt"] 27 | end 28 | 29 | should "inherit the layout for the drop but not the excerpt" do 30 | assert_nil @excerpt.data["layout"] 31 | assert_equal @excerpt_drop["layout"], @doc_drop["layout"] 32 | end 33 | 34 | should "be inspectable" do 35 | refute_empty @excerpt_drop.inspect 36 | end 37 | 38 | should "inherit values from the document" do 39 | assert_equal @excerpt_drop.keys.sort, @doc_drop.keys.sort 40 | end 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /script/vendor-mimes: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # Vendors the MIME type config from the mime-db list 3 | # usage: script/vendor-mimes 4 | 5 | require 'json' 6 | require 'open-uri' 7 | 8 | config = File.expand_path "../lib/jekyll/mime.types", __dir__ 9 | 10 | # Create an array of vendored mimetype => [extensions] 11 | mimes = {} 12 | json = open('https://raw.githubusercontent.com/jshttp/mime-db/master/db.json').read 13 | data = JSON.parse(json) 14 | data.reject! { |mime, meta| meta["extensions"].nil? || meta["extensions"].empty? } 15 | data.each do |mime, meta| 16 | # Normalize extensions and mime-types 17 | mime = mime.downcase.strip 18 | extensions = meta["extensions"].map { |e| e.downcase.strip }.compact 19 | 20 | # If a given extension is listed multiple times, prefer the first one listed 21 | extensions.reject! { |extension| mimes.values.flatten.include?(extension) } 22 | 23 | next if extensions.empty? 24 | mimes[mime] = [] if mimes[mime].nil? 25 | mimes[mime].concat extensions 26 | end 27 | 28 | strlen = mimes.keys.max_by(&:length).length 29 | output = "" 30 | output << "# Woah there. Do not edit this file directly.\n" 31 | output << "# This file is generated automatically by script/vendor-mimes.\n\n" 32 | mimes = mimes.sort_by { |k,v| k } 33 | output << mimes.map { |mime,extensions| "#{mime.ljust(strlen)} #{extensions.join(" ")}" }.join("\n") 34 | 35 | File.write(config, output) 36 | -------------------------------------------------------------------------------- /docs/_posts/2016-05-18-jekyll-3-1-4-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.1.4 "Stability Sam" Released' 3 | date: 2016-05-18 16:50:37 -0700 4 | author: parkr 5 | version: 3.1.4 6 | categories: [release] 7 | --- 8 | 9 | Hey Jekyllites! 10 | 11 | Today, we released v3.1.4 in an effort to bring more stability to the v3.1.x series. This bugfix release consists of: 12 | 13 | * A fix for `layout` in Liquid where values would carry over from one document to the next 14 | * A fix for `layout` in Liquid where a parent layout (e.g. `default` or `base`) would overwrite the metadata of the child layout (e.g. `post` or `special`). 15 | * A fix where `page.excerpt` referencing its excerpt would cause an infinite loop of recursive horror. 16 | * We added `Configuration.from` and the great permalink fix from [v3.0.4](/news/2016/04/19/jekyll-3-0-4-released/) to the v3.1.x series 17 | * `site.collections` in Liquid is now sorted alphabetically by label, so `docs` shows up before `posts` reliably. 18 | 19 | The fixes for `layout` may not be seamless for everyone, but we believe they will be the "right thing to do" going forward. 20 | 21 | We are alwawys striving to make Jekyll more straight-forward to use. Please do open an issue if you believe an aspect of Jekyll's user experience isn't up to par. 22 | 23 | For a full history of our changes, [see the changelog](/docs/history/#v3-1-4). 24 | 25 | As always, Happy Jekylling! 26 | -------------------------------------------------------------------------------- /lib/jekyll/commands/new_theme.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "erb" 4 | 5 | class Jekyll::Commands::NewTheme < Jekyll::Command 6 | class << self 7 | def init_with_program(prog) 8 | prog.command(:"new-theme") do |c| 9 | c.syntax "new-theme NAME" 10 | c.description "Creates a new Jekyll theme scaffold" 11 | c.option "code_of_conduct", \ 12 | "-c", "--code-of-conduct", \ 13 | "Include a Code of Conduct. (defaults to false)" 14 | 15 | c.action do |args, opts| 16 | Jekyll::Commands::NewTheme.process(args, opts) 17 | end 18 | end 19 | end 20 | 21 | # rubocop:disable Metrics/AbcSize 22 | def process(args, opts) 23 | if !args || args.empty? 24 | raise Jekyll::Errors::InvalidThemeName, "You must specify a theme name." 25 | end 26 | 27 | new_theme_name = args.join("_") 28 | theme = Jekyll::ThemeBuilder.new(new_theme_name, opts) 29 | if theme.path.exist? 30 | Jekyll.logger.abort_with "Conflict:", "#{theme.path} already exists." 31 | end 32 | 33 | theme.create! 34 | Jekyll.logger.info "Your new Jekyll theme, #{theme.name.cyan}," \ 35 | " is ready for you in #{theme.path.to_s.cyan}!" 36 | Jekyll.logger.info "For help getting started, read #{theme.path}/README.md." 37 | end 38 | # rubocop:enable Metrics/AbcSize 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /docs/_posts/2015-01-24-jekyll-3-0-0-beta1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.0.0.beta1 Released' 3 | date: 2015-01-24 00:42:31 -0800 4 | author: parkr 5 | version: 3.0.0.beta1 6 | categories: [release] 7 | --- 8 | 9 | Hey! 10 | 11 | Exciting news! First beta for Jekyll 3 is out. Check out the [sizable 12 | changelog](https://github.com/jekyll/jekyll/blob/v3.0.0.beta1/History.markdown#head) 13 | to get a feel for what changes are afoot. Key features: 14 | 15 | 1. **Speed.** Jekyll now features incremental regeneration and greatly 16 | improved problematic code that caused slow-downs. 17 | 2. Gobs of bugfixes and customization. 18 | 3. Uniformity and sanity to Jekyll extensions of Liquid. 19 | 20 | To install just run: 21 | 22 | {% highlight shell %} 23 | $ gem install jekyll --pre 24 | {% endhighlight %} 25 | 26 | Future versions will include [some awesome new 27 | features](https://github.com/jekyll/jekyll/issues/3324) that we haven't 28 | built yet. If you see one you want to tackle, submit a PR & you'll be 29 | featured in the Jekyll 3.0 release post as a contributor to that epic 30 | release. 31 | 32 | Please file bugs as you encounter them, being sure to include your version 33 | of Ruby, the Jekyll version, and (if possible) a link to your site so we 34 | can reproduce. 35 | 36 | If you think there's room for improvement in the UX, also do let us know. 37 | We're always looking to make Jekyll easier to use! 38 | 39 | Happy Jekylling! 40 | -------------------------------------------------------------------------------- /docs/_posts/2016-01-28-jekyll-3-1-1-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.1.1 Released' 3 | date: 2016-01-28 17:21:50 -0800 4 | author: parkr 5 | version: 3.1.1 6 | categories: [release] 7 | --- 8 | 9 | This release squashes a few bugs :bug: :bug: :bug: noticed by a few 10 | wonderful Jekyll users: 11 | 12 | * If your `permalink` ended with a `/`, your URL didn't have any extension, 13 | even if you wanted one 14 | * We now strip the BOM by default per Ruby's `IO.open`. 15 | * `page.dir` will not always end in a slash. 16 | 17 | We also updated our [Code of Conduct](/docs/conduct/) to the latest version of 18 | the Contributor Covenant. The update includes language to ensure that the 19 | reporter of the incident remains confidential to non-maintainers and that 20 | all complaints will result in an appropriate response. I care deeply about 21 | Jekyll's community and will do everything in my power to ensure it is a 22 | welcoming community. Feel free to reach out to me directly if you feel 23 | there is a way we can improve the community for everyone! If you're 24 | interested in more details, [there is a diff for 25 | that](https://github.com/ContributorCovenant/contributor_covenant/blob/v1_4/diffs/1_3_vs_1_4.patch). 26 | 27 | See links to the PR's on [the history page](/docs/history/#v3-1-1). 28 | 29 | Thanks to Jordon Bedwell, chrisfinazzo, Kroum Tzanev, David Celis, and 30 | Alfred Xing for their commits on this latest release! :sparkles: 31 | 32 | Happy Jekylling! 33 | -------------------------------------------------------------------------------- /test/test_doctor_command.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require "helper" 4 | require "jekyll/commands/doctor" 5 | 6 | class TestDoctorCommand < JekyllUnitTest 7 | context "URLs only differ by case" do 8 | setup do 9 | clear_dest 10 | end 11 | 12 | should "return success on a valid site/page" do 13 | @site = Site.new(Jekyll.configuration({ 14 | "source" => File.join(source_dir, "/_urls_differ_by_case_valid"), 15 | "destination" => dest_dir, 16 | })) 17 | @site.process 18 | output = capture_stderr do 19 | ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) 20 | assert_equal false, ret 21 | end 22 | assert_equal "", output 23 | end 24 | 25 | should "return warning for pages only differing by case" do 26 | @site = Site.new(Jekyll.configuration({ 27 | "source" => File.join(source_dir, "/_urls_differ_by_case_invalid"), 28 | "destination" => dest_dir, 29 | })) 30 | @site.process 31 | output = capture_stderr do 32 | ret = Jekyll::Commands::Doctor.urls_only_differ_by_case(@site) 33 | assert_equal true, ret 34 | end 35 | assert_includes output, "Warning: The following URLs only differ by case. "\ 36 | "On a case-insensitive file system one of the URLs will be overwritten by the "\ 37 | "other: #{dest_dir}/about/index.html, #{dest_dir}/About/index.html" 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /lib/jekyll/stevenson.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class Stevenson < ::Logger 5 | def initialize 6 | @progname = nil 7 | @level = DEBUG 8 | @default_formatter = Formatter.new 9 | @logdev = $stdout 10 | @formatter = proc do |_, _, _, msg| 11 | msg.to_s 12 | end 13 | end 14 | 15 | def add(severity, message = nil, progname = nil) 16 | severity ||= UNKNOWN 17 | @logdev = logdevice(severity) 18 | 19 | if @logdev.nil? || severity < @level 20 | return true 21 | end 22 | progname ||= @progname 23 | if message.nil? 24 | if block_given? 25 | message = yield 26 | else 27 | message = progname 28 | progname = @progname 29 | end 30 | end 31 | @logdev.puts( 32 | format_message(format_severity(severity), Time.now, progname, message) 33 | ) 34 | true 35 | end 36 | 37 | # Log a +WARN+ message 38 | def warn(progname = nil, &block) 39 | add(WARN, nil, progname.yellow, &block) 40 | end 41 | 42 | # Log an +ERROR+ message 43 | def error(progname = nil, &block) 44 | add(ERROR, nil, progname.red, &block) 45 | end 46 | 47 | def close 48 | # No LogDevice in use 49 | end 50 | 51 | private 52 | 53 | def logdevice(severity) 54 | if severity > INFO 55 | $stderr 56 | else 57 | $stdout 58 | end 59 | end 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /lib/jekyll/commands/clean.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | module Commands 5 | class Clean < Command 6 | class << self 7 | def init_with_program(prog) 8 | prog.command(:clean) do |c| 9 | c.syntax "clean [subcommand]" 10 | c.description "Clean the site " \ 11 | "(removes site output and metadata file) without building." 12 | 13 | add_build_options(c) 14 | 15 | c.action do |_, options| 16 | Jekyll::Commands::Clean.process(options) 17 | end 18 | end 19 | end 20 | 21 | def process(options) 22 | options = configuration_from_options(options) 23 | destination = options["destination"] 24 | metadata_file = File.join(options["source"], ".jekyll-metadata") 25 | sass_cache = ".sass-cache" 26 | 27 | remove(destination, :checker_func => :directory?) 28 | remove(metadata_file, :checker_func => :file?) 29 | remove(sass_cache, :checker_func => :directory?) 30 | end 31 | 32 | def remove(filename, checker_func: :file?) 33 | if File.public_send(checker_func, filename) 34 | Jekyll.logger.info "Cleaner:", "Removing #{filename}..." 35 | FileUtils.rm_rf(filename) 36 | else 37 | Jekyll.logger.info "Cleaner:", "Nothing to do for #{filename}." 38 | end 39 | end 40 | end 41 | end 42 | end 43 | end 44 | -------------------------------------------------------------------------------- /lib/jekyll/readers/theme_assets_reader.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module Jekyll 4 | class ThemeAssetsReader 5 | attr_reader :site 6 | def initialize(site) 7 | @site = site 8 | end 9 | 10 | def read 11 | return unless site.theme && site.theme.assets_path 12 | 13 | Find.find(site.theme.assets_path) do |path| 14 | next if File.directory?(path) 15 | if File.symlink?(path) 16 | Jekyll.logger.warn "Theme reader:", "Ignored symlinked asset: #{path}" 17 | else 18 | read_theme_asset(path) 19 | end 20 | end 21 | end 22 | 23 | private 24 | def read_theme_asset(path) 25 | base = site.theme.root 26 | dir = File.dirname(path.sub("#{site.theme.root}/", "")) 27 | name = File.basename(path) 28 | 29 | if Utils.has_yaml_header?(path) 30 | append_unless_exists site.pages, 31 | Jekyll::Page.new(site, base, dir, name) 32 | else 33 | append_unless_exists site.static_files, 34 | Jekyll::StaticFile.new(site, base, "/#{dir}", name) 35 | end 36 | end 37 | 38 | def append_unless_exists(haystack, new_item) 39 | if haystack.any? { |file| file.relative_path == new_item.relative_path } 40 | Jekyll.logger.debug "Theme:", 41 | "Ignoring #{new_item.relative_path} in theme due to existing file " \ 42 | "with that path in site." 43 | return 44 | end 45 | 46 | haystack << new_item 47 | end 48 | end 49 | end 50 | -------------------------------------------------------------------------------- /docs/_posts/2017-08-12-jekyll-3-5-2-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll 3.5.2 Released' 3 | date: 2017-08-12 16:31:40 -0400 4 | author: parkr 5 | version: 3.5.2 6 | categories: [release] 7 | --- 8 | 9 | 3.5.2 is out with 6 great bug fixes, most notably one which should dramatically speed up generation of your site! In testing #6266, jekyllrb.com generation when from 18 seconds down to 8! Here is the full line-up of fixes: 10 | 11 | * Backport #6266 for v3.5.x: Memoize the return value of `Document#url` (#6301) 12 | * Backport #6247 for v3.5.x: kramdown: symbolize keys in-place (#6303) 13 | * Backport #6281 for v3.5.x: Fix `Drop#key?` so it can handle a nil argument (#6288) 14 | * Backport #6280 for v3.5.x: Guard against type error in `absolute_url` (#6287) 15 | * Backport #6273 for v3.5.x: delegate `StaticFile#to_json` to `StaticFile#to_liquid` (#6302) 16 | * Backport #6226 for v3.5.x: `Reader#read_directories`: guard against an entry not being a directory (#6304 17 | 18 | A [full history](/docs/history/#v3-5-2) is available for your perusal. As always, please file bugs if you encounter them! Opening a pull request with a failing test for your expected behaviour is the easiest way for us to address the issue since we have a reproducible example to test again. Short of that, please fill out our issue template to the best of your ability and we'll try to get to it quickly! 19 | 20 | Many thanks to our contributors without whom this release could not be 21 | possible: Ben Balter & Kyle Zhao. 22 | 23 | Happy Jekylling! 24 | -------------------------------------------------------------------------------- /benchmark/file-dir-ensure-trailing-slash: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | require 'benchmark/ips' 3 | 4 | # For this pull request, which changes Page#dir 5 | # https://github.com/jekyll/jekyll/pull/4403 6 | 7 | FORWARD_SLASH = '/'.freeze 8 | 9 | def pre_pr(url) 10 | url[-1, 1] == FORWARD_SLASH ? url : File.dirname(url) 11 | end 12 | 13 | def pr(url) 14 | if url.end_with?(FORWARD_SLASH) 15 | url 16 | else 17 | url_dir = File.dirname(url) 18 | url_dir.end_with?(FORWARD_SLASH) ? url_dir : "#{url_dir}/" 19 | end 20 | end 21 | 22 | def envygeeks(url) 23 | return url if url.end_with?(FORWARD_SLASH) || url == FORWARD_SLASH 24 | 25 | url = File.dirname(url) 26 | url == FORWARD_SLASH ? url : "#{url}/" 27 | end 28 | 29 | # Just a slash 30 | Benchmark.ips do |x| 31 | path = '/' 32 | x.report("pre_pr:#{path}") { pre_pr(path) } 33 | x.report("pr:#{path}") { pr(path) } 34 | x.report("envygeeks:#{path}") { pr(path) } 35 | x.compare! 36 | end 37 | 38 | # No trailing slash 39 | Benchmark.ips do |x| 40 | path = '/some/very/very/long/path/to/a/file/i/like' 41 | x.report("pre_pr:#{path}") { pre_pr(path) } 42 | x.report("pr:#{path}") { pr(path) } 43 | x.report("envygeeks:#{path}") { pr(path) } 44 | x.compare! 45 | end 46 | 47 | # No trailing slash 48 | Benchmark.ips do |x| 49 | path = '/some/very/very/long/path/to/a/file/i/like/' 50 | x.report("pre_pr:#{path}") { pre_pr(path) } 51 | x.report("pr:#{path}") { pr(path) } 52 | x.report("envygeeks:#{path}") { pr(path) } 53 | x.compare! 54 | end 55 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | bundler_args: --without benchmark:site:development 2 | script: script/cibuild 3 | cache: bundler 4 | language: ruby 5 | sudo: false 6 | 7 | rvm: 8 | - &ruby1 2.4.2 9 | - &ruby2 2.3.5 10 | - &ruby3 2.2.8 11 | - &ruby4 2.1.10 12 | - &jruby jruby-9.1.13.0 13 | 14 | matrix: 15 | include: 16 | - rvm: *ruby1 17 | env: TEST_SUITE=test ROUGE=1.11.1 18 | - rvm: *ruby1 19 | env: TEST_SUITE=fmt 20 | - rvm: *ruby1 21 | env: TEST_SUITE=default-site 22 | - rvm: *ruby1 23 | env: ROUGE_VERSION=1.11.1 # runs everything with this version 24 | exclude: 25 | - rvm: *jruby 26 | env: TEST_SUITE=cucumber 27 | 28 | env: 29 | matrix: 30 | - TEST_SUITE=test 31 | - TEST_SUITE=cucumber 32 | branches: 33 | only: 34 | - master 35 | - themes 36 | - /*-stable/ 37 | 38 | notifications: 39 | slack: 40 | secure: "\ 41 | dNdKk6nahNURIUbO3ULhA09/vTEQjK0fNbgjVjeYPEvROHgQBP1cIP3AJy8aWs8rl5Yyow4Y\ 42 | GEilNRzKPz18AsFptVXofpwyqcBxaCfmHP809NX5PHBaadydveLm+TNVao2XeLXSWu+HUNAY\ 43 | O1AanCUbJSEyJTju347xCBGzESU=\ 44 | " 45 | 46 | addons: 47 | code_climate: 48 | repo_token: 49 | secure: "\ 50 | mAuvDu+nrzB8dOaLqsublDGt423mGRyZYM3vsrXh4Tf1sT+L1PxsRzU4gLmcV27HtX2Oq9\ 51 | DA4vsRURfABU0fIhwYkQuZqEcA3d8TL36BZcGEshG6MQ2AmnYsmFiTcxqV5bmlElHEqQuT\ 52 | 5SUFXLafgZPBnL0qDwujQcHukID41sE=\ 53 | " 54 | # regular test configuration 55 | after_success: 56 | - bundle exec codeclimate-test-reporter 57 | 58 | before_install: 59 | - gem update --system 60 | -------------------------------------------------------------------------------- /docs/_docs/extras.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Extras 3 | permalink: /docs/extras/ 4 | --- 5 | 6 | There are a number of (optional) extra features that Jekyll supports that you 7 | may want to install, depending on how you plan to use Jekyll. 8 | 9 | ## Web Highlights and Commenting 10 | 11 | Register your site with [txtpen](https://txtpen.com). Then append 12 | 13 | ```html 14 | 15 | ``` 16 | 17 | to your template files in `/_layout` folder. 18 | 19 | ## Math Support 20 | 21 | Kramdown comes with optional support for LaTeX to PNG rendering via [MathJax](https://www.mathjax.org) within math blocks. See the Kramdown documentation on [math blocks](http://kramdown.gettalong.org/syntax.html#math-blocks) and [math support](http://kramdown.gettalong.org/converter/html.html#math-support) for more details. MathJax requires you to include JavaScript or CSS to render the LaTeX, e.g. 22 | 23 | ```html 24 | 25 | ``` 26 | 27 | For more information about getting started, check out [this excellent blog post](http://gastonsanchez.com/visually-enforced/opinion/2014/02/16/Mathjax-with-jekyll/). 28 | 29 | ## Alternative Markdown Processors 30 | 31 | See the Markdown section on the [configuration page](/docs/configuration/#markdown-options) for instructions on how to use and configure alternative Markdown processors, as well as how to create [custom processors](/docs/configuration/#custom-markdown-processors). 32 | -------------------------------------------------------------------------------- /docs/_posts/2014-09-09-jekyll-2-4-0-released.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'A Wild Jekyll 2.4.0 Appeared!' 3 | date: 2014-09-09 21:10:33 -0700 4 | author: parkr 5 | version: 2.4.0 6 | categories: [release] 7 | --- 8 | 9 | Well, lookie here! A new release of Jekyll! v2.4.0 contains lots of goodies, including some brilliant new additions: 10 | 11 | - A new `relative_include` Liquid tag ([#2870]({{ site.repository }}/issues/2870)) 12 | - Render Liquid in CoffeeScript files ([#2830]({{ site.repository }}/issues/2830)) 13 | - Add 4 new array Liquid filters: `push`, `pop`, `shift`, and `unshift` ([#2895]({{ site.repository }}/pull/2895)) 14 | - Auto-enable watch on 'serve' ([#2858]({{ site.repository }}/issues/2858)). No more `-w`! 15 | - Add `:title` and `:name` to collection URL template fillers ([#2864]({{ site.repository }}/issues/2864) & [#2799]({{ site.repository }}/issues/2799)) 16 | - Add support for CSV files in the `_data` directory ([#2761]({{ site.repository }}/issues/2761)) 17 | - Add `inspect` liquid filter ([#2867]({{ site.repository }}/issues/2867)) 18 | - Add a `slugify` Liquid filter ([#2880]({{ site.repository }}/issues/2880)) 19 | 20 | Some other wunderbar bug fixes in there as well. Check out the [full changelog](/docs/history/) for the whole scoop. 21 | 22 | As always, many thanks to our amazing contributors who made this release possible: Chris Frederick, Garen Torikian, James Smith, Ruslan Korolev, Joel Glovier, Michael Kühnel, Minn Soe, Pat Hawks, Peter deHaan, Shu Uesugi, TJ, Zhuochun, Alfred Xing, nitoyon, Anatol Broder, Faruk AYDIN, Frederic Hemberger, and Gordon Gao. Thank you!! 23 | 24 | Happy Jekylling! 25 | -------------------------------------------------------------------------------- /docs/_posts/2014-06-28-jekyll-turns-21-i-mean-2-1-0.markdown: -------------------------------------------------------------------------------- 1 | --- 2 | title: 'Jekyll Turns 21! Err... I mean 2.1.0.' 3 | date: 2014-06-28 17:26:59 -0400 4 | author: parkr 5 | version: 2.1.0 6 | categories: [release] 7 | --- 8 | 9 | Jekyll's finally [legal to drink in the States](https://en.wikipedia.org/wiki/Legal_drinking_age). 10 | And he's done a lot of learning in the process! Here are some of the new 11 | things to look forward to: 12 | 13 | - Uses the latest Liquid version (2.6.1) (#2495) 14 | - Set front matter defaults for collections (#2419) 15 | - Set a collection-specific URL template (#2418) 16 | - `pygments.rb` 0.6.0! (#2504) 17 | - `.json` files in `_data` (#2369) 18 | - Allow subdirectories in `_data` (#2395) 19 | - Add support for `hl_lines` in `highlight` tag (#2532) 20 | - Post categories now merge with directory, front matter, and defaults (#2373) 21 | - New `--skip_initial_build` flag for `jekyll serve` (#2477) 22 | - A bajilion bug fixes and site updates! 23 | 24 | Let's go party! 25 | 26 | *Check out the [full changelog](/docs/history/#v2-1-0) for more.* 27 | 28 | Many thanks to these 37 contributors for the 2.1.0 release: 29 | 30 | Alberto Grespan, Alessandro Lorenzi, Alex Medearis, Alfred Xing, Anatol Broder, Ben, Ben Balter, Bud Parr, Chezou, Denilson Figueiredo de Sá, Denilson Sá, Ivan Tse, Jens Nazarenus, Jesse Shawl, Jordon Bedwell, Josh Davis, János Rusiczki, Marc Ransome, Mathieu Bruyen, Matt Rogers, Parker Moore, Pat Hawks, Paul Henry, Peter Rhoades, Philipp Rudloff, Quinn Shanahan, Renaud Martinet, Rob Murray, Rodrigo Dumont, Simon Sarris, Terry, Terry Schmidt, Tomer Cohen, XhmikosR, Yihang Ho, jaybe@jekyll, and mikecole. 31 | --------------------------------------------------------------------------------