Commit 563ee007 authored by Erik Huelsmann's avatar Erik Huelsmann
Browse files

Remove option to serve locally built output because it depends on python

parent c86dcf09
all: build
cd output; python ../
mkdir -p output/static
# cp -rf content/static/* output/static
......@@ -58,7 +58,6 @@ The Makefile contains various useful commands.
Among them:
* `make` - to generate the site.
* `make serve` - to run a simple site server (needs python)
* `make clean` - to remove the generated files from output directory
### From Lisp ###
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
import os.path
import sys
class MyRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
def do_GET(self):
possible_name = self.path.strip("/")+'.html'
if self.path == '/':
# default routing, instead of "index.html"
self.path = '/index.html'
elif os.path.isfile(possible_name):
# extensionless page serving
self.path = possible_name
return SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
Handler = MyRequestHandler
port = 8000
if len(sys.argv) > 1:
p = int(sys.argv[1])
port = p
except ValueError:
print "port value provided must be an integer"
print "Serving on port {0}".format(port)
server = SocketServer.TCPServer(('', port), Handler)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment