Commit Graph

35 Commits

Author SHA1 Message Date
Anatoliy Yastreb 0f74db4131 rubocop: move mtimes cache hash to class variable 2016-06-16 23:12:01 +03:00
Anatoliy Yastreb 7a933893db rubocop: fix code style 2016-06-16 13:14:50 +03:00
surrim 9be387ef6f readded "env=prod"-condition 2016-03-25 19:42:53 +01:00
surrim 64d5e3dfd3 removed "env=prod"-condition 2016-03-11 19:26:16 +01:00
surrim 52eb60e171 use copy_entry only in safe mode 2016-03-11 18:45:40 +01:00
surrim 46bdaa49dc using FileUtils.copy_entry instead of FileUtils.cp to allow symlinks 2016-03-05 23:31:16 +01:00
Pat Hawks af9ec6831d
Rubocop: Style/ElseAlignment
- Align else with if
Rubocop: Lint/EndAlignment
 - Align end with if
2016-01-04 11:23:06 -08:00
Pat Hawks 13c980c896 Rubocop: Style/TrailingComma 2016-01-04 11:08:31 -08:00
Pat Hawks fd8fdd87d3
Rubocop: Style/RegexpLiteral 2016-01-03 17:10:39 -08:00
Pat Hawks 2530a8cdfc
Rubocop: Style/HashSyntax
- Use hash rockets syntax
2016-01-03 15:49:22 -08:00
Pat Hawks fb0457bf3d
Rubocop: Style/AndOr
- Use && instead of and
 - Use || instead of or
2016-01-03 15:30:26 -08:00
Pat Hawks 31dd0ebed5
Rubocop: Style/EmptyLiteral
- Use array literal [] instead of Array.new
 - Use hash literal {} instead of Hash.new
2016-01-03 14:39:01 -08:00
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 ff3edbc16b static files mtime liquid should return a Time obj 2015-04-14 11:52:25 -07:00
Parker Moore f14af82da5 static_file: extract extname in initializer and save as variable. #3632 2015-04-10 16:31:19 -04:00
Martijn den Hoedt f0cac685de removed unused method StaticFile::extname 2015-04-01 12:57:49 +02:00
Alfred Xing fe5f0d124c Move all regenerate? checking to Regenerator 2015-01-18 11:05:06 -08:00
Sylvester Keil 60921132c6 Preserve original mtime when copying static files 2015-01-12 13:00:35 +01:00
Parker Moore 0eb2796a66 Sort static files just once.
Ref: #2075.
2014-12-26 22:23:45 -05:00
Alfred Xing dc30114605 Use site.in_source_dir 2014-11-23 16:16:19 -08:00
Parker Moore 2ee8d690c4 More conversion of Jekyll.sanitized_path ~> site.in_(source|dest)_dir 2014-11-03 22:16:48 -08:00
Parker Moore 3762878381 Correctly access the StaticFile's site variable. 2014-11-03 22:16:47 -08:00
Parker Moore 9cbc24fce5 More safety. 🔒 2014-11-03 22:16:47 -08:00
Parker Moore 10cc45fc45 Add StaticFile#destination_rel_dir 2014-08-12 18:07:13 -04:00
Parker Moore 530e049d2d Read in static files info `collection.files` as `StaticFile`s. 2014-08-12 15:59:45 -04:00
Simon Sarris 74f0f27d18 Before copying file, explicitly remove the old one
On Windows, FileUtils.cp(path, dest_path) will fail with a Permission
Denied if the dest_path already exists and is read-only. People have
complained about this since at least 2008.

This lets `jekyll build` work without error in Windows when one or more
read-only files exist.

This change will accommodate users of Team Foundation, which uses the
read-only flag for for source control status. (dumb, I know, but but a
real problem)
2014-06-19 18:25:00 -04:00
Parker Moore 8ad4dd332a Don't fail if any of the path objects are nil.
Fixes #2325
2014-05-07 14:01:36 -04:00
Parker Moore e0166682da Sort the static files by relative path before sending to liquid 2014-02-19 14:02:03 -05:00
Parker Moore e3dd908d55 Add StaticFile#to_liquid['extname'] :) 2014-02-19 13:55:58 -05:00
Parker Moore b5a398bdff Add StaticFile#to_liquid and StaticFile#relative_path 2014-02-19 13:35:13 -05:00
Tom Bell 517e6f81d3 Remove new lines between module and class 2013-01-20 00:00:49 +00:00
Tom Preston-Werner 82bd83fe7f More TomDoc and formatting cleanup. 2011-05-08 23:40:35 -07:00
Stefan Schüßler 5b680f8dd8 remove orphaned files in destination 2010-12-01 18:04:50 +01:00
Antonin Hildebrand f91954be76 optimization: write static file to the destination only if source file timestamp differs
Also make sure static files get regenerated when they are missing in destination.

This is useful in --server --auto mode when it reduces disk/cpu load and also plays nice with xrefresh-server (which was my main motivation) -> soft CSS refresh works again!
2010-06-20 08:02:16 +02:00
Kris Brown 0cb1ebcda1 split process handling into phases to allow pages to have access to full and complete site payload and added some test improvements 2010-01-05 17:05:44 +00:00