Commit graph

548 commits

Author SHA1 Message Date
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
Simonas Kazlauskas
766060ed78 Use OS threads for watch on Windows 2014-03-04 21:22:35 +02:00
Andres Loeh
21585c18f3 hakyll check: return exit code of 0 on success
The old test returns an exit code of 1 whenever the number of
errors is >= 0, which should always be the case. The fix replaces
this with a test whether the number of errors is strictly > 0.
2014-02-11 11:07:43 +01:00
Jasper Van der Jeugt
251c019e9e Don't cache pandocCompilerWithTransform, refactor 2014-01-28 11:04:28 +01:00
Jasper Van der Jeugt
ca20400712 Merge pull request #215 from co-dan/pandoc-transf
Added the `pandocCompilerWithTransformM` function
2014-01-28 01:59:40 -08:00
Dan
84ba953ed3 Typo in Pandoc.hs 2014-01-26 10:14:04 +03:00
Daniil Frumin
8a29542ee6 Added the pandocCompilerWithTransformM function 2014-01-24 14:55:32 +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
677cca0578 Add IsString instance for Template
Closes #150
2014-01-19 21:25:18 +01:00
Daniil Frumin
99c464d08f Fix escaped quotes + wording 2014-01-19 23:31:40 +04:00
Daniil Frumin
60f0043471 Documentation for the template macros 2014-01-19 23:20:47 +04:00
Daniil Frumin
52d49c4360 Haddocks for field, constField, bodyField, and titleField in Web.Template.Context 2014-01-12 23:56:49 +04:00
Daniil Frumin
cacac208ef Added documentation for 'Context' and 'defaultField' 2014-01-11 23:42:34 +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
Jasper Van der Jeugt
808353bce4 Enable Pandoc highlighting by default 2013-09-29 17:52:58 +02:00
Jorge Israel Peña
a590a9a57f updated to work with pandoc 1.12
Pandoc 1.12 decouples citeproc-hs from itself, so there is no longer a
Text.Pandoc.Biblio module in Pandoc. Further, citeproc-hs depends on
pandoc-types 1.10 but Pandoc 1.12 depends on pandoc-types 1.12. To
alleviate these issues, pandoc-citeproc was created which includes a
copy of the citeproc-hs source made to be compatible, since the
developer of citeproc-hs is apparently MIA.

pandoc-citeproc is a separate module that handles the mixture of
citeproc-hs and Pandoc. It includes `processCites` in Text.CSL.Pandoc,
which is the new name of what used to be `processBiblio` from
Text.Pandoc.Biblio

Most of these changes are seamless, consisting of simple name changes in
both functions and modules. However, a more direct change in the
Hakyll API itself is that `readPandocBiblio`'s second parameter, the
CSL, is now mandatory, i.e. not of type Maybe. This is to reflect the
same change in the underlying processing function from Text.CSL.Pandoc,
`processCites`, where the Style argument is now mandatory, and the style
is derived from the CSL.

See the old function:

    processBiblio :: Maybe Style -> [Reference] -> Pandoc -> Pandoc

Compared to the new one:

    processCites :: Style -> [Reference] -> Pandoc -> Pandoc

Sources:

* http://hackage.haskell.org/packages/archive/pandoc/1.11.1/doc/html/Text-Pandoc-Biblio.html
* http://hackage.haskell.org/packages/archive/pandoc-citeproc/0.1/doc/html/Text-CSL-Pandoc.html

Similarly, there is no longer a `readerReferences` field in the reader
options structure.
2013-09-18 22:38:54 +02:00
Saeid Al-Wazzan
a796988a16 Fix incorrect output of toSiteRoot on Windows.
toSiteRoot uses splitPath, joinPath, and takeDirectory from the
System.FilePath module. On Windows systems, the implementation of
joinPath will build up a path using the Windows path separator "\\".

We don't want this behavior since the paths we are working with
are always URLs, so we force POSIX behavior for System.FilePath.
2013-09-16 01:17:38 +03: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
Eric Stolten
866a282f19 * Preview now shows the deprecation message and calls watch.
* Details on how to disable the server in the command description.
2013-08-28 13:11:44 -04:00
Eric Stolten
f01b641649 1. Added the WATCH_SERVER flag that is enabled by default
1. Added an argument to watch, --no-server which will disable the embedded server.
1. Added a deprecation message to the preview mode
2013-08-25 22:49:50 -04:00
Eric Stolten
fbc43b3a04 Merge branch 'upstream-master' 2013-08-20 22:03:04 -04:00
Eric Stolten
f14f52040a Added a watch command that will continually poll for changes and rebuild them. 2013-08-20 21:59:39 -04:00
Jasper Van der Jeugt
5679681ac1 Change type: metadataField :: Context a
Closes #175
2013-08-16 11:48:26 +02:00
Jasper Van der Jeugt
64569d7b72 Fix versions & metadata loading issue
Closes #171
2013-08-14 00:18:31 +02:00
Jasper Van der Jeugt
faa90283bf Explode when using mapContext over ListField 2013-08-13 01:38:18 +02:00
Jasper Van der Jeugt
fad9134fd4 Add functionField again 2013-08-10 16:19:23 +02:00
Jasper Van der Jeugt
ab0aebb3c3 Add mapContext again 2013-08-05 12:25:55 +02:00
Marc-Antoine Perennou
82a38a742a check: unescape internal uris
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2013-07-07 19:02:21 +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
Simonas Kazlauskas
72ed15e174 Make toUri sanitise all characters needed 2013-06-16 15:11:04 +03:00
Jasper Van der Jeugt
537e72333f Sanitize URLs in toUrl
Closes #163
2013-06-15 20:15:33 +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
Jasper Van der Jeugt
0409d6110c Merge pull request #155 from blaenk/win32-preview-fix
fix preview functionality on windows
2013-05-24 00:47:06 -07:00
Jorge Israel Peña
294c48ea48 finish incomplete comment 2013-05-22 17:28:32 -07:00
Jorge Israel Peña
e987485e2d add max-retries to waitOpen and gracefully handle remove/delete events 2013-05-22 17:06:17 -07: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