Skip to content

Commit 55b3c6d

Browse files
author
Michael Haberler
committed
add support for livereload if Jekyll environment=development
use this gist for trying it: https://gist.github.com/mhaberler/ede68eae275c38a5364734c065a1b9c0 the serve.sh script has no place here - remove
1 parent 2ecc201 commit 55b3c6d

File tree

5 files changed

+11
-29
lines changed

5 files changed

+11
-29
lines changed

_config_devel.yml

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# this will include livereload support in the rendered HTML
2+
# see _includes/livreload.html
3+
4+
environment: development

_includes/head.html

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<!-- <link rel="alternate" type="application/rss+xml" title="Jekyll • Simple, blog-aware, static sites - Feed" href="/feed.xml"> -->
99

1010
{% include analytics.html %}
11+
{% include livereload.html %}
1112

1213
<link rel="alternate" type="application/atom+xml" title="Recent commits to Machinekit's master branch" href="{{ site.repository }}/commits/master.atom">
1314
<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans' rel='stylesheet' type='text/css'>

_includes/livereload.html

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{% if jekyll.environment == "development" %}
2+
<script src="{{site.lrmethod}}://{{site.lrhost}}:35729/livereload.js"></script>
3+
{% endif %}

index.html

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
overview: true
55
---
66

7+
{% include livereload.html %}
8+
79
<section class="features">
810
<div class="grid">
911
<div class="unit one-third">
@@ -58,4 +60,4 @@ <h2>Things.</h2>
5860
</td>
5961
<td bgcolor="#FFFFFF" style="width:30%;"></td>
6062
</tr>
61-
</table
63+
</table

scripts/serve.sh

-28
This file was deleted.

0 commit comments

Comments
 (0)