Commit Graph

764 Commits

Author SHA1 Message Date
Mike Bland 250b6ebb7e Adapt StaticFile for collections, config defaults
This enables files such as images and PDFs to show up in the same relative
output directory as other HTML and Markdown documents in the same collection.

It also enables static files to be hidden using defaults from _config.yml in
the same way that other documents in the same collection and directories may
be hidden using `published: false`.
2015-06-29 19:58:27 -04:00
Parker Moore 8b44a7bb42 Merge pull request #3762 from fw42/liquid_profiler
Merge pull request 3762
2015-06-16 10:21:33 -07:00
Jordon Bedwell 137efdc9f4 Fix: #3738; Move code wrapper from div to figure. 2015-06-10 15:20:44 -05:00
Rafael Picanço e84a7aadee fixing typo on line 31
- front matter
2015-06-08 13:24:53 -03:00
Florian Weingarten 7bc9e1aae6 Add byte counter 2015-06-07 16:49:22 +00:00
Florian Weingarten 1e9163fdf4 Liquid profiler 2015-06-07 16:38:05 +00:00
Jordon Bedwell e9215ec047 Merge pull request #3732 from jekyll/fix-frontmatter-defaults
Fix it so that 'blog.html' matches 'blog.html'
2015-06-06 06:30:43 -05:00
Alfred Xing bba7870f8b Merge pull request #3717 from alfredxing/regenerator-handle-deleted-files
Merge pull request 3717
2015-05-31 11:10:42 -07:00
Jordon Bedwell 14ed5cc954 Fix it so that 'blog.html' matches 'blog.html' 2015-05-25 02:07:21 -05:00
Alfred Xing a2ee820609 Regenerator: handle deleted/renamed/moved dependencies
Should fix #3716
2015-05-19 22:47:58 -07:00
Florian Weingarten 87400f2155 regression test for corrupted marshal file 2015-05-19 20:00:50 +00:00
Florian Weingarten 3474481043 Marshal metadata 2015-05-18 14:02:43 +00:00
Jordon Bedwell f054bae503 Add support for JRuby, it was easier than assumed. 2015-05-15 07:10:22 -05:00
Jim Meyer 4302604c89 remove non-essential with() statement 2015-04-18 23:36:12 -07:00
Jim Meyer 9c03fc3f27 Set logging to debug when verbose flag is set
Adds Jekyll::LogAdapter#adjust_verbosity which ensures that --quiet
always wins.
2015-04-18 16:57:57 -07:00
Jordon Bedwell a682ca1600 Merge pull request #3658 from jekyll/fix-jekyll-minitest-rspec-mocks
Create #mock_expects that goes directly to RSpec Mocks.
2015-04-14 15:15:02 -05:00
Parker Moore 0072865512 Merge pull request #3629 from justinweiss/lsi_search_on_posts
Merge pull request 3629
2015-04-14 13:13:24 -07:00
Jordon Bedwell f26cdd8da4 Create #mock_expects that goes directly to RSpec Mocks. 2015-04-14 14:20:55 -05:00
Parker Moore 00aa2955d8 generated site tests: put the static file mod time through a date filter 2015-04-14 11:52:26 -07:00
Parker Moore dead70724e Fix expectation for StaticFile#to_liquid in tests. 2015-04-14 11:52:26 -07:00
Alfred Xing 4f06ba7884 Remove Maruku-specific tests 2015-04-14 10:58:47 -07:00
Parker Moore bf98004843 Merge pull request #3608 from nickburlett/patch/incremental-build
Merge pull request 3608
2015-04-10 16:51:56 -04:00
Parker Moore f86727c45a DRY up the StaticFile tests a bit. #3633. 2015-04-10 16:24:45 -04:00
Martijn den Hoedt 28a1d2445e Added tests for Jekyll:StaticFile 2015-04-01 17:15:44 +02:00
Justin Weiss fa435fae94 Use `Jekyll::Post`s for both LSI indexing and lookup.
When looking for related posts, Jekyll was indexing `Jekyll::Post`
objects, but finding related posts based on `Jekyll::Post#content`. This
caused two problems:

1. Ruby 2.2 will warn on == if <=> throws an exception (and future Ruby
versions will surface that exception). Because `String`s can't be
compared with `Jekyll::Post`s, this warning was appearing all the time
while searching for related posts.

2. LSI won't return a post itself when searching for related posts. But
LSI could never tell that we were searching on a post, since Jekyll
passed post content, not a post object. With this fix, we can remove the
`- [post]` from `Jekyll::RelatedPosts#find_related`.

This is a more accurate fix for #3484.
2015-03-29 23:43:55 -07:00
Jordon Bedwell f75346c799 Merge pull request #3614 from nickburlett/patch/incremental-build-dest-missing
Incremental build if destination file missing
2015-03-28 19:26:01 -05:00
Nicholas Burlett 8f4194eea5 Clean up regeneration missing-destination checks
Use easier-to-follow checks for missing-destinations in the regenerator.
2015-03-24 21:21:37 -07:00
Parker Moore e7d0b6c5a5 Merge pull request #3545 from delftswa2014/site_extract_readers
Merge pull request 3545
2015-03-23 19:53:07 -07:00
Nicholas Burlett d39d0cea19 Create 'tmp' dir for test_tags if it doesn't exist
Rather than use script/test to create the tmp directory, create it in a setup block for the appropriate context in the `TestTags` test.
2015-03-22 22:52:16 -07:00
Nicholas Burlett d4b8f0d9dd Process metadata for all dependencies
When adding a dependency, also add the dependency to the metadata hash.

Addresses part 1 of #3591. Prior to this fix, the regnerator only paid attention the mtime of the first dependency it checked, so for posts/pages with N multiple dependencies (i.e., every layout file used to render them), it continues to regenerate the post/page approximately N times, at which point it's seen all of the dependencies.
2015-03-22 13:33:12 -07:00
Nicholas Burlett 706007ead9 Incrementally regenerate missing destination file
Addresses the third point of #3591, in which the incremental regenerator doesn't notice that destination files have gone missing.
2015-03-21 19:25:02 -07:00
Nicholas Burlett e770a080a7 Regenerator cache clearing tests
Two tests for the regenerator cache clearing changes:

1. Intrusively test that the regnerator.clear_cache actually clears the cache ( in test/test_regenerator.rb )
2. Test that incremental building regenerates files that have changed that previously were unchanged ( in test/test_site.rb )
2015-03-19 09:41:05 -07:00
Martin Rogalla 324748a5a6 Added corrections as suggested by @parkr.
- Replaced occurrences of #array += with concat
   operations.(performance)
 - Corrected alignment.
 - Removed rebase artifact.

Signed-off-by: Martin Rogalla <martin@martinrogalla.com>
2015-03-19 14:56:46 +01:00
Jordon Bedwell c6d62828ba Remove loader.rb and utilize "modernize" script/test. Fixes: #3573 2015-03-15 10:08:27 -05:00
Arthur Neves 67ba8ad0cb Use rspec-mock instead of rr 2015-03-06 20:13:07 -05:00
Martin Jorn Rogalla 00cdcbc184 Separated some more readers from the main reader.rb file.
- Draft Reader
 - Collection Reader
 - Page Reader
 - Post Reader
 - Static File Reader

Fixed references and ran tests.

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-06 17:20:25 +01:00
Martin Jorn Rogalla bebd80342e Extracted draft, post reader into external classes.
Organized the draft, post and layout reader into the *readers* classes.
Fixed all references and ran tests.

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-06 12:39:50 +01:00
Matt Rogers 02e98f238e Merge pull request #3520 from delftswa2014/sort-null 2015-03-05 14:35:40 -06:00
Martin Jorn Rogalla 4b8e3cfdbd Moved the in_(source/dest)_dir back to site.rb.
After carefully looking at these two methods, as of right now they do not
belong in the reader, as they should also be used by the writer. Thus the
decision was made to move them back into the class containing the source
and dest fields, site.rb.

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-05 13:34:46 +01:00
ChaYoung You 7806f9ed52 Replace `File.exists?` with `File.exist?`
`File.exists?` is deprecated method. See
http://ruby-doc.org//core-2.2.0/File.html#exists-3F-method.
2015-03-05 18:21:52 +09:00
Martin Jorn Rogalla 2857350df1 Extracted `read_directories` from site.rb into reader.rb
- Extracted
  - Updated References
  - Ran Tests

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com
2015-03-04 20:51:26 +01:00
Martin Jorn Rogalla a4adeb446b Extracted `read_posts` from site.rb into reader.rb
- Extracted
  - Updated References
  - Ran Tests

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-04 20:22:37 +01:00
Martin Jorn Rogalla ddfecb0f53 Extracted `read_data_file` from site.rb into reader.rb
- Extracted
 - Updated References
 - Ran Tests

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-04 19:55:54 +01:00
Martin Jorn Rogalla 05bbcddb29 Extracted `filter_entries` from site.rb into reader.rb
- Extracted
 - Updated References
 - Ran Tests

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-04 19:46:10 +01:00
Martin Jorn Rogalla bb9d43dff5 Extracted `in_source_dir` from site.rb and into reader.rb.
Extracted `in_source_dir` from site.rb into reader.rb.
Updated all the references and tests.

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-04 19:16:03 +01:00
Will Norris 0d1586a5c4 Improved permalinks for pages and collections
This updates the default permalink style for pages and collections to
match the site-wide 'permalink' setting.  If the permalink setting
contains a trailing slash, either explicitly or by being set to
':pretty', then pages and collections permalinks will contain trailing
slashes by default as well.  Similarly, if the permalink setting
contains a trailing ':output_ext', so will pages and collections.  If
the permalink setting contains neither a trailing slash or extension,
neither will pages or collections.

This impacts only the default permalink structure for pages and
collections.  Permalinks set in the frontmatter of an individual page
take precedence, as does the permalink setting for a specific
collection.

Fixes #2691
2015-03-04 09:38:23 -08:00
Will Norris 669c803912 always include file extension on destination files
This ensures that destination files for HTML posts, pages and
collections always include the proper file extension (as defined by
output_ext) regardless of permalink structure.  This allows for URLs
that contain no extension or trailing slash to still result in proper
destination files with .html extensions.

Because this change relies so heavily on output_ext accurately
identifying the extension of the destination file, this change also
removes the feature test that tested support for permalinks with a .htm
extension.  In order to support alternate file extensions, a future
patch or plugin will need to modify the output_ext value, at which point
everything else should work as expected.
2015-03-02 21:20:54 -08:00
Martin Jorn Rogalla 92a9582733 Corrected error message as suggested by @parkr.
Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-01 11:16:08 +01:00
Martin Jorn Rogalla 78af3c5018 Improved clarity of sort nil input error message.
Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-01 09:51:59 +01:00
Martin Jorn Rogalla 0565308ce6 Added test to check on nil input for sort filter.
- Added a test to check if the sort filter will raise the correct
   exception on given nil input.
 - Improved error message and used "nil" consistently.

Signed-off-by: Martin Jorn Rogalla <martin@martinrogalla.com>
2015-03-01 09:40:32 +01:00