writePageSetIgnore
  :: (FilePath -> Bool)
  -> FilePath
  -> Site
  -> SiteTemplates
  -> Page
  -> Action ()
writePageSetIgnore ignore destDir site templates page = do
  resources <- getDirectoryFiles (_pageSourceDir page) ["//*"]
  void . forP (filter (not . ignore) resources) $ \resource ->
    copyFileChanged (_pageSourceDir page </> resource)
                    (destDir </> pageUrl site page </> resource)

  -- This comes second in case there was an "index.html"
  -- hanging around in the page source directory
  -- (which might happen during local development of a page).
  writeFileChanged
    (destDir </> pageUrl site page </> "index.html")
    (T.unpack (fullContent site templates page))
writePageSetIgnore
  :: (FilePath -> Bool)
  -> FilePath
  -> Site
  -> SiteTemplates
  -> Page
  -> Action ()
writePageSetIgnore ignore destDir site templates page = do
  resources <- getDirectoryFiles (_pageSourceDir page) ["//*"]
  void . forP (filter (not . ignore) resources) $ \resource ->
    copyFileChanged (_pageSourceDir page </> resource)
                    (destDir </> pageUrl site page </> resource)

  -- This comes second in case there was an "index.html"
  -- hanging around in the page source directory
  -- (which might happen during local development of a page).
  writeFileChanged
    (destDir </> pageUrl site page </> "index.html")
    (T.unpack (fullContent site templates page))
writePageSetIgnore ignore destDir site templates page = do
  resources <- getDirectoryFiles (_pageSourceDir page) ["//*"]
  void . forP (filter (not . ignore) resources) $ \resource ->
    copyFileChanged (_pageSourceDir page </> resource)
                    (destDir </> pageUrl site page </> resource)

  -- This comes second in case there was an "index.html"
  -- hanging around in the page source directory
  -- (which might happen during local development of a page).
  writeFileChanged
    (destDir </> pageUrl site page </> "index.html")
    (T.unpack (fullContent site templates page))