From 9b32d5f7e013bb1bf802e6f1a321ebabc91f6c8c Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Thu, 17 Sep 2015 20:00:19 +0100 Subject: Added example config. Added jinja2 templates --- config/lighttpd_md.conf | 33 +++++++++++++++++++++++++++++++++ src/templ/article.thtml | 0 src/templ/base.thtml | 29 +++++++++++++++++++++++++++++ src/templ/main.thtml | 6 ++++++ 4 files changed, 68 insertions(+) create mode 100644 config/lighttpd_md.conf create mode 100644 src/templ/article.thtml create mode 100644 src/templ/base.thtml create mode 100644 src/templ/main.thtml diff --git a/config/lighttpd_md.conf b/config/lighttpd_md.conf new file mode 100644 index 0000000..6c99922 --- /dev/null +++ b/config/lighttpd_md.conf @@ -0,0 +1,33 @@ +server.modules = ( + "mod_access", + "mod_accesslog", + "mod_alias", + #"mod_compress", + "mod_cgi", + "mod_fastcgi", + "mod_redirect", + "mod_rewrite", + "mod_proxy", + #"mod_vhost" +) + + +server.port = 8080 +server.username = "xxx" +server.groupname = "xxx" +server.document-root = "/srv/http/md" +server.errorlog = "/tmp/error_md.log" +dir-listing.activate = "enable" +index-file.names = ( "index.md" ) +mimetype.assign = ( + ".md" => "text/html", + ".html" => "text/html", + ".txt" => "text/plain", + ".css" => "text/css", + ".js" => "application/x-javascript", + ".gif" => "image/gif", + ".png" => "image/png", + "" => "application/octet-stream" + ) +cgi.assign = (".md" => "/home/fam/prog/python/mdsite/md.py") + diff --git a/src/templ/article.thtml b/src/templ/article.thtml new file mode 100644 index 0000000..e69de29 diff --git a/src/templ/base.thtml b/src/templ/base.thtml new file mode 100644 index 0000000..49bcc5b --- /dev/null +++ b/src/templ/base.thtml @@ -0,0 +1,29 @@ + + + + + + + + + + + + {% block title %}{% endblock %} + + + + +
+ {% block content %} + {% endblock %} +
+ + diff --git a/src/templ/main.thtml b/src/templ/main.thtml new file mode 100644 index 0000000..e875d3c --- /dev/null +++ b/src/templ/main.thtml @@ -0,0 +1,6 @@ +{% extends "base.thtml" %} + +{% block content %} +{{ block }} + +{% endblock %} \ No newline at end of file -- cgit v1.2.3