Hey folks,
I’m building a site with middleman 4.2 and my links worn’t work properly. For example:
http://www.mydomain.com/faq.html works fine. Then after visiting that page and clicking the home link I get the following:
http://www.mydomain.com/www.mydomain.com
Not only that but my other links on the toolbar disappear. I’m using bootstrap 3. It works fine in dev.
Toggle navigation
<%= image_tag 'my_logo_text.png',style: "display: inline-block;" %>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><%= link_to 'FAQ', '/faq.html' %></li>
<li><%= link_to 'Customer Access', '/customer', target: '_new' %></li>
</ul>
</div><!-- /.navbar-collapse -->
Layout:
<!doctype html>
<!-- Use title if it's in the page YAML frontmatter -->
<title><%= current_page.data.title || "My Site" %></title>
<%= stylesheet_link_tag "site" %>
<%= javascript_include_tag "site" %>
<!-- Latest compiled and minified CSS -->
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<div class='container'>
<div> </div>
<%= partial 'navbar' %>
<%= partial 'carousel/carousel' %>
<div> </div>
<div class="panel panel-default">
<div class="panel-heading-custom"><%= current_page.data.title %></div>
<div class="panel-body">
<%= yield %>
</div>
<div class="panel-footer panel-footer-custom">My Domain - Copyright © 2017</div>
</div>
</div>