Commit graph

347 commits

Author SHA1 Message Date
Jasper Van der Jeugt
9307ec5263 Ensure "Listening on 0.0.0.0:8000" message is not garbled 2015-01-10 22:16:05 +01:00
Jasper Van der Jeugt
fee73b93ad Fix another dependency cycle issue
Closes #326
2015-01-09 13:14:04 +01:00
Jasper Van der Jeugt
27c3942369 Merge pull request #300 from ohbadiah/master
matchMetadata for examining metadata when defining rules
2015-01-06 13:42:08 +01:00
Daniel P. Wright
b36232e05e Refactor match and matchMetadata code into matchInternal
As per jaspervdj's request in #300, refactor the common code from
match and matchMetadata into a single, unexported function.
2015-01-03 22:55:51 +09:00
Jasper Van der Jeugt
f498a43c64 Fix dependency handling bug
Closes #321
2014-12-28 15:28:45 +01:00
Jasper Van der Jeugt
6f4ccbdc49 Fix dependency handling for snapshots 2014-12-12 16:33:50 +01:00
Jasper Van der Jeugt
3c15d0fd34 Improve rulesExtraDependencies usage 2014-10-28 10:53:35 +01:00
Jasper Van der Jeugt
59b6f01218 Better functions in templates 2014-10-27 12:20:31 +01:00
Nick McAvoy
d0af1024d0 matchMetadata for examining metadata when defining rules 2014-09-16 22:20:11 -04:00
Jasper Van der Jeugt
12dc25de17 Merge pull request #252 from blaenk/mod-time
save modification time with sub-second granularity
2014-05-09 11:51:56 +02:00
Jasper Van der Jeugt
0639a73c24 Merge branch 'master' of github.com:jaspervdj/hakyll 2014-05-09 11:51:12 +02:00
Jorge Israel Peña
d86b4753d4 save modification time with sub-second granularity
Some systems can get the file modification time with sub-second
granularity. However, Hakyll shaves off the sub-seconds, as defined in
the Binary instance of BinaryTime, which poses a problem because when a
file is checked to see if it was modified in `resourceModified`, it
still contains the sub-seconds. This results in a file (almost) always
being considered as having been modified.

Example:

1. First go around, modification time is 3:45.325. This time is saved
   as 3:45.000 (i.e. sub-seconds are shaved off).
2. Second go around, modification time is again read as 3:45.325 and
   compared against the stored time, 3:45.000. 3:45.325 is more recent
   than 3:45.000, so the file is considered to have been modified.

This change prevents the shaving off of sub-seconds. This will naturally
work on systems that don't support sub-second granularity, as that
'field' will simply appear as all zeros.

Closes #250
2014-05-09 02:11:56 -07:00
Jorge Israel Peña
ca44e643a4 Minor refactor of PR #233
OS won't change mid-execution, so lets avoid the unnecessary
check each time `unixFilter` is run.
2014-04-27 15:55:33 -07:00
Jasper Van der Jeugt
8229765cbd Fix tag dependency issue, slightly improve caching 2014-04-11 21:12:01 +02:00
Jasper Van der Jeugt
0b705d7db0 Micro cleanup of pull request #233 2014-03-26 12:09:35 +01:00
Jasper Van der Jeugt
87eafc752f Revert "added gloabl metadata parsing"
This reverts commit e0f45b29b3.

Conflicts:
	src/Hakyll/Core/Provider/Metadata.hs
2014-03-26 12:05:38 +01:00
Jasper Van der Jeugt
157a81b413 Revert "Fix loadGlobalMetadata on Windows"
This reverts commit e71bbd90a8.
2014-03-26 12:05:38 +01:00
Jasper Van der Jeugt
bc1cfc8d5a Revert "Fix root directory in directory-wise metadata and beautify code"
This reverts commit a6ae4eb99d.
2014-03-26 12:05:38 +01:00
Jasper Van der Jeugt
6552dd5bc0 Revert "Track metadata dependencies"
This reverts commit 712ffa39b5.

Conflicts:
	src/Hakyll/Core/Metadata.hs
	src/Hakyll/Core/Rules/Default.hs
2014-03-26 12:05:38 +01:00
Jasper Van der Jeugt
e5446fd401 Revert "Added test case for global metadata"
This reverts commit 46b6f78da8.

Conflicts:
	tests/data/posts/metadata
2014-03-26 12:05:38 +01:00
Jasper Van der Jeugt
3db3933b0b Revert "set internalRules last, so that it can be overrided by rules"
This reverts commit d406db44e3.
2014-03-26 12:05:38 +01:00
Jasper Van der Jeugt
969f2351ef Merge pull request #233 from rekahsoft/master
Fix unixFilter on Windows
2014-03-26 12:05:24 +01:00
chrisdotcode
5af08f807e Add flag to bind on selected host. 2014-03-24 04:50:17 -04:00
Collin J. Doering
da7ae99b12 Fix unixFilter on Windows
On windows, the 'unixFilter' function used window's 'createProcess'
function to create the external process that will filter some String
input. The problem with this is that it is unable to execute batch
stubs (eg. anything created using 'gem install ...') even if its in
$PATH. Anyways a solution to this issue is to execute the batch file
explicitly using 'cmd /c batchfile' but there is no rational way to know
where said batchfile is on the system. My solution is to detect windows
using the System.Info module and then instead of using 'proc' to create
the function, use 'shell' instead which will be able to execute
everything 'proc' can + batch files.

Inspired by: http://www.blaenkdenum.com/posts/the-switch-to-hakyll/#scss

Signed-off-by: Collin J. Doering <rekahsoft@gmail.com>
2014-03-23 17:30:29 -04:00
Jasper Van der Jeugt
63107a6f75 Merge pull request #190 from krsch/master
Implemented per-directory metadata support
2014-01-23 01:29:01 -08:00
Alexey Kreshchuk
dbabe0325b Unified code for global and external metadata
Didn't clean up unused code though
2014-01-22 00:11:51 +04:00
Alexey Kreshchuk
d406db44e3 set internalRules last, so that it can be overrided by rules 2014-01-21 23:15:08 +04:00
Jasper Van der Jeugt
b61877bdaa Fix issue with metadataRoute for composed routes 2014-01-03 16:40:15 +01:00
Jasper Van der Jeugt
98d03dfe48 Revert "Throw an error in case of duplicate compilers"
This reverts commit ffbce96607.
2013-12-05 12:27:45 +01:00
Jasper Van der Jeugt
ffbce96607 Throw an error in case of duplicate compilers 2013-11-22 13:56:17 +01:00
Jasper Van der Jeugt
f9a8443d68 Detect change if metadata file is deleted
Closes #191
2013-11-18 12:42:21 +01:00
Alexey Kreshchuk
46b6f78da8 Added test case for global metadata 2013-10-18 01:23:14 +04:00
Alexey Kreshchuk
712ffa39b5 Track metadata dependencies
I had to prepend some Rules to global Rules set. This might be possible
to replaced by a correct Store.set call.
I also had to prepend some Compile rules.
2013-10-16 01:39:04 +04:00
Alexey Kreshchuk
a6ae4eb99d Fix root directory in directory-wise metadata and beautify code 2013-10-15 03:59:16 +04:00
Alexey Kreshchuk
e71bbd90a8 Fix loadGlobalMetadata on Windows 2013-10-12 23:57:17 +04:00
Alexey Kreshchuk
e0f45b29b3 added gloabl metadata parsing 2013-10-11 02:41:27 +04:00
Jorge Israel Peña
999252ece1 add preview port Configuration field
Make it possible to specify the default port to listen on when the
preview server is run. This is useful if another service on the system
already runs on port 8000 (the default), since it's a hassle to keep
providing the port overriding option. For example: ./site preview vs.
./site preview -p 4000
2013-08-29 22:43:57 -07:00
Jasper Van der Jeugt
64569d7b72 Fix versions & metadata loading issue
Closes #171
2013-08-14 00:18:31 +02:00
uu1101
b5803bc7b6 Correct example code: parseGlob ==> fromGlob 2013-06-30 19:21:17 +02:00
Jasper Van der Jeugt
a3c4d06ff9 Merge pull request #162 from uu1101/seq-stderr
Deepseq stderr before closing the handle
2013-06-17 04:43:06 -07:00
Jasper Van der Jeugt
6814ff2e9b Only add teaser when <!--more--> is there 2013-06-17 12:01:22 +02:00
uu1101
a1e778d1e5 Set handle encoding as per locale 2013-06-14 01:02:14 +02:00
uu1101
cf501485b1 Deepseq stderr before closing the handle
Otherwise laziness allows for the handle to be closed withouth receiving the
input. This caused that no error messages were printed when `unixFilter`s
failed.
2013-06-14 00:32:45 +02:00
Jasper Van der Jeugt
e687662ba0 teaserContext -> teaserField 2013-06-06 10:21:18 +02:00
Simonas Kazlauskas
0a818d0725 Deploy should propagate error code
And return 1 if neither deployCommand and deploySite is set.
2013-05-22 15:24:26 +03:00
Jasper Van der Jeugt
d32307aa1c Add partials to template system 2013-05-07 09:28:09 +02:00
Jasper Van der Jeugt
cf138a415b Implement foreach structure 2013-05-06 23:32:25 +02:00
Ivan N. Veselov
946723dc9d Logged dependencies adding for debugging purposes. 2013-05-05 12:58:31 +03:00
Ivan N. Veselov
2651627189 Added "teasers" support to be used in posts index.
Just add "<!-- teaser_end -->" to separate the teaser and the rest of the article and use "$teaser$" key in the template!

Closes issue #35.
2013-05-04 17:26:22 +03:00
Jasper Van der Jeugt
ca80171caf Minor style changes 2013-05-04 15:18:26 +02:00