Skip to content
This repository has been archived by the owner on Jan 27, 2020. It is now read-only.

Commit

Permalink
include htaccess files if exist
Browse files Browse the repository at this point in the history
  • Loading branch information
themsaid committed Apr 16, 2016
1 parent 325da50 commit 3047eff
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/SiteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class SiteBuilder
* @var array
*/
protected $forceBuild = false;

/**
* SiteBuilder constructor.
*
Expand All @@ -83,7 +83,7 @@ public function __construct(Filesystem $filesystem, Factory $viewFactory, $envir
$this->fileHandler = new BaseHandler($filesystem, $viewFactory);

$this->blogPostHandler = new BlogPostHandler($filesystem, $viewFactory);

$this->forceBuild = $forceBuild;
}

Expand Down Expand Up @@ -117,7 +117,7 @@ public function build()
if ($this->forceBuild) {
$this->filesystem->cleanDirectory(KATANA_CACHE_DIR);
}

$this->handleSiteFiles($otherFiles);

if (@$this->configs['enableBlog']) {
Expand Down Expand Up @@ -196,9 +196,15 @@ private function handleBlogPostsFiles($files)
*/
private function getSiteFiles()
{
return array_filter($this->filesystem->allFiles(KATANA_CONTENT_DIR), function (SplFileInfo $file) {
$files = array_filter($this->filesystem->allFiles(KATANA_CONTENT_DIR), function (SplFileInfo $file) {
return ! Str::startsWith($file->getRelativePathName(), $this->includesDirectory);
});

if ($this->filesystem->exists(KATANA_CONTENT_DIR.'/.htaccess')) {
$files[] = new SplFileInfo(KATANA_CONTENT_DIR.'/.htaccess', '', '.htaccess');
}

return $files;
}

/**
Expand Down

0 comments on commit 3047eff

Please sign in to comment.