Commits

John Lenz  committed 9d27b16

Strip off prefix when copying static files

  • Participants
  • Parent commits 14ff95a

Comments (0)

Files changed (3)

     ["favicon.ico"] --> copy
     ["robots.txt"] --> copy
     ["images/**"] --> copy
-    ["static/**"] --> copy
+    ["static/**"] --> copyStatic
     ["js/**"] --> copy
     ["css/*.css"] --> css
     ["templates/*"] --> template
   where
     xs --> f = mapM_ (`match` f) xs
     copy = route idRoute >> compile copyFileCompiler
+    copyStatic = route (gsubRoute "static/*" (const "")) >> compile copyFileCompiler
     css = route (setExtension "css") >> compile compressCssCompiler
     template = compile templateCompiler
 

File robots.txt

-User-agent: *
-Disallow:

File static/robots.txt

+User-agent: *
+Disallow: