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

Commit

Permalink
Merge pull request #4 from lewagon/fix-build-pushing-whole-site-on-gh…
Browse files Browse the repository at this point in the history
…-pages

Fix build pushing whole site on gh pages
  • Loading branch information
ssaunier committed Feb 1, 2016
2 parents bfab4a9 + aaea8fb commit 30a49b5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 4 deletions.
3 changes: 3 additions & 0 deletions config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@

# Or use a different image path
# set :http_prefix, "/Content/images/"
#
require_relative "./lib/build_cleaner"
activate :build_cleaner
end

# Deployment
Expand Down
10 changes: 10 additions & 0 deletions lib/build_cleaner.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
class BuildCleaner < Middleman::Extension

def initialize(app, options_hash={}, &block)
super
FileUtils.rm_rf app.config[:build_dir]
end

end

::Middleman::Extensions.register(:build_cleaner, BuildCleaner)
2 changes: 1 addition & 1 deletion source/_navbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</form>

<!-- Text link -->
<a href="" class="navbar-wagon-item navbar-wagon-link">Contact</a>
<a href="https://www.lewagon.com" class="navbar-wagon-item navbar-wagon-link">Wagon</a>

<!-- Text link -->
<a href="" class="navbar-wagon-item navbar-wagon-link">Team</a>
Expand Down
6 changes: 3 additions & 3 deletions source/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ title: Le Wagon Middleman boilerplate
---

<div class="welcome text-center padded">
<h1>Middleman is Watching</h1>
<h1>Welcome to Middleman</h1>
<p class="doc">
<%= link_to "Read Online Documentation", "http://middlemanapp.com/" %>
</p><!-- .doc -->
</div><!-- .welcome -->
</p>
</div>

0 comments on commit 30a49b5

Please sign in to comment.