From 26678401b7cb0e04787614556a3aeb58fae172d5 Mon Sep 17 00:00:00 2001 From: Kartik Arora Date: Sun, 31 Jul 2016 20:33:11 +0530 Subject: [PATCH] New scripts to serve across lan (#184) * New scripts to server across lan * Updated README.md --- .gitignore | 1 + README.md | 14 ++++++++++---- scripts/serve-lan | 4 ++++ scripts/serve-lan-production | 4 ++++ 4 files changed, 19 insertions(+), 4 deletions(-) create mode 100644 scripts/serve-lan create mode 100644 scripts/serve-lan-production diff --git a/.gitignore b/.gitignore index a9adbc9..aac0add 100755 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ test/ _deploy/* Rakefile .jekyll-metadata +/.idea/ \ No newline at end of file diff --git a/README.md b/README.md index 18d963a..26fc7b7 100755 --- a/README.md +++ b/README.md @@ -87,15 +87,21 @@ The theme contains documentation in the form of [blog posts](https://panossakkos First, you need to install jekyll and the dependencies of { Personal } by running: -```` +```shell ./scripts/install -```` +``` Then, you can build and serve your website by simply running: -```` +```shell ./scripts/serve-production -```` +``` + +To serve across lan (requires su to forward the port 4000 over lan): + +```shell +./scripts/serve-lan-production +``` ## Wiki diff --git a/scripts/serve-lan b/scripts/serve-lan new file mode 100644 index 0000000..1e872ac --- /dev/null +++ b/scripts/serve-lan @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo iptables -I INPUT -p tcp --dport 4000 -j ACCEPT +jekyll serve --watch --host "0.0.0.0" --baseurl "" diff --git a/scripts/serve-lan-production b/scripts/serve-lan-production new file mode 100644 index 0000000..ccbc119 --- /dev/null +++ b/scripts/serve-lan-production @@ -0,0 +1,4 @@ +#!/bin/bash + +sudo iptables -I INPUT -p tcp --dport 4000 -j ACCEPT +JEKYLL_ENV=production jekyll serve --host "0.0.0.0" --baseurl ""