diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-09-17 20:00:19 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-09-17 20:00:19 +0100 |
commit | 9b32d5f7e013bb1bf802e6f1a321ebabc91f6c8c (patch) | |
tree | 71209d720a26d8d12d361bf1e8ebe0e91e1200da | |
parent | 367189e36ca16e1c6f03be142d7cf347de102055 (diff) | |
download | md-site-9b32d5f7e013bb1bf802e6f1a321ebabc91f6c8c.tar.gz md-site-9b32d5f7e013bb1bf802e6f1a321ebabc91f6c8c.zip |
Added example config. Added jinja2 templates
-rw-r--r-- | config/lighttpd_md.conf | 33 | ||||
-rw-r--r-- | src/templ/article.thtml | 0 | ||||
-rw-r--r-- | src/templ/base.thtml | 29 | ||||
-rw-r--r-- | src/templ/main.thtml | 6 |
4 files changed, 68 insertions, 0 deletions
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 --- /dev/null +++ b/src/templ/article.thtml 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 @@ +<!doctype html> +<html> + <head> + <!-- Latest compiled and minified CSS --> + <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.csss"> + + <!-- Optional theme --> + <link rel="stylesheet" href="/styles/monokai_sublime.css"> + <link rel="stylesheet" href="/styles/main.css"> + <script src="/js/highlight.pack.js"></script> + <script>hljs.initHighlightingOnLoad();</script> + <title>{% block title %}{% endblock %}</title> + <meta charset="UTF-8" /> + </head> + <body> + <nav> + <a href="/index.md" class="headerlink">Main</a>| + <a href="/writeup.md" class="headerlink">WriteUp</a>| + <a href="http://git.main.lv" class="headerlink">Projects</a>| + <a href="telnet://main.lv">BBS</a>| + <a href="/links.md" class="headerlink">Links</a>| + <a href="/about.md" class="headerlink">About</a> + </nav> + <div class="content"> + {% block content %} + {% endblock %} + </div> + </body> +</html> 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 |