fixed multiple body include bug

This commit is contained in:
Spocke
2016-11-10 11:45:16 +01:00
parent 8b47247087
commit 992998681e
2 changed files with 8 additions and 4 deletions
+4 -4
View File
@@ -18,13 +18,13 @@
<link href="{{ site.shared_baseurl }}/css/docs.min.css" rel="stylesheet">
<link href="//fast.fonts.net/cssapi/5d4ae438-4aca-4c75-8249-d9486d12b12e.css" rel="stylesheet">
<link href="//afeld.github.io/emoji-css/emoji.css" rel="stylesheet">
{% include_remote {{ site.origin }}/_docs/favicons.html %}
{% include_remote {{ site.origin }}/_docs/favicons.html css="head > *" %}
</head>
<body role="document" data-shared-baseurl="{{ site.shared_baseurl }}" data-baseurl="{{ site.baseurl }}">
{% if page.url contains '/demo/' %}
{% include_remote {{ site.origin }}/_docs/menu_demo.html %}
{% include_remote {{ site.origin }}/_docs/menu_demo.html css="body > *" %}
{% else %}
{% include_remote {{ site.origin }}/_docs/menu.html %}
{% include_remote {{ site.origin }}/_docs/menu.html css="body > *" %}
{% endif %}
<div class="top-bar">
@@ -82,7 +82,7 @@
</div>
</div>
{% include_remote {{ site.origin }}/_docs/footer.html %}
{% include_remote {{ site.origin }}/_docs/footer.html css="body > *" %}
<script src="{{ site.shared_baseurl }}/scripts/common.min.js"></script>
<script src="{{ site.shared_baseurl }}/scripts/docs.min.js"></script>
</body>
+4
View File
@@ -41,6 +41,10 @@ eos
xpath = @params['xpath']
css = @params['css']
# force params to strings
xpath = xpath.to_s if xpath
css = css.to_s if css
if ! html = @@remote_cache["#{@url}_#{xpath}_#{css}"]
# fetch remote file
page = Nokogiri::HTML(open(@url))