Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

match seem to not match files with leading period #560

Closed
changlinli opened this issue Aug 2, 2017 · 2 comments
Closed

match seem to not match files with leading period #560

changlinli opened this issue Aug 2, 2017 · 2 comments

Comments

@changlinli
Copy link

Steps to reproduce:

Make a file called .something with some content in your current file.

Create hakyllExample.hs with the following content.

import Hakyll

main :: IO ()
main = hakyll $ do
    match (fromGlob ".something") $ do
        route idRoute
        compile copyFileCompiler

Nothing is created in _site if you run runhaskell hakyllExample.hs build. Using fromRegex, escaping the period, and fromList all don't seem to work.

Changing ".something" to "something" and changing the filename to something makes it work.

Strangely matches (fromGlob ".something") (fromFilePath ".something") is True.

@jaspervdj
Copy link
Owner

By default, Hakyll ignores all files starting with a .. You can tweak this by changing the configuration.

myConfig = defaultConfiguration {ignore = \_ -> False}  -- Do not ignore anything
main = hakyllWith myConfig $ do
    ...

@changlinli
Copy link
Author

Cool thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants