diff options
Diffstat (limited to 'src/Hakyll/Core')
-rw-r--r-- | src/Hakyll/Core/Configuration.hs | 5 | ||||
-rw-r--r-- | src/Hakyll/Core/Provider/Internal.hs | 2 | ||||
-rw-r--r-- | src/Hakyll/Core/Provider/Metadata.hs | 5 | ||||
-rw-r--r-- | src/Hakyll/Core/Store.hs | 5 |
4 files changed, 14 insertions, 3 deletions
diff --git a/src/Hakyll/Core/Configuration.hs b/src/Hakyll/Core/Configuration.hs index a4bc90b..f9927de 100644 --- a/src/Hakyll/Core/Configuration.hs +++ b/src/Hakyll/Core/Configuration.hs @@ -69,6 +69,10 @@ data Configuration = Configuration , -- | Use an in-memory cache for items. This is faster but uses more -- memory. inMemoryCache :: Bool + , -- | Override default port for preview server. Default is 8000. + -- One can also override the port as a command line argument: + -- ./site preview -p 1234 + previewPort :: Int } -------------------------------------------------------------------------------- @@ -87,6 +91,7 @@ defaultConfiguration = Configuration , deployCommand = "echo 'No deploy command specified' && exit 1" , deploySite = system . deployCommand , inMemoryCache = True + , previewPort = 8000 } where ignoreFile' path diff --git a/src/Hakyll/Core/Provider/Internal.hs b/src/Hakyll/Core/Provider/Internal.hs index 583c665..d566f3a 100644 --- a/src/Hakyll/Core/Provider/Internal.hs +++ b/src/Hakyll/Core/Provider/Internal.hs @@ -98,7 +98,7 @@ data Provider = Provider providerOldFiles :: Map Identifier ResourceInfo , -- | Underlying persistent store for caching providerStore :: Store - } + } deriving (Show) -------------------------------------------------------------------------------- diff --git a/src/Hakyll/Core/Provider/Metadata.hs b/src/Hakyll/Core/Provider/Metadata.hs index fe2857a..7e4d7ed 100644 --- a/src/Hakyll/Core/Provider/Metadata.hs +++ b/src/Hakyll/Core/Provider/Metadata.hs @@ -44,8 +44,9 @@ loadMetadata p identifier = do return (M.union md emd, body) where - fp = resourceFilePath p identifier - mi = M.lookup identifier (providerFiles p) >>= resourceInfoMetadata + normal = setVersion Nothing identifier + fp = resourceFilePath p identifier + mi = M.lookup normal (providerFiles p) >>= resourceInfoMetadata -------------------------------------------------------------------------------- diff --git a/src/Hakyll/Core/Store.hs b/src/Hakyll/Core/Store.hs index 74d9d2f..5c3667d 100644 --- a/src/Hakyll/Core/Store.hs +++ b/src/Hakyll/Core/Store.hs @@ -50,6 +50,11 @@ data Store = Store -------------------------------------------------------------------------------- +instance Show Store where + show _ = "<Store>" + + +-------------------------------------------------------------------------------- -- | Result of a store query data Result a = Found a -- ^ Found, result |