# HG changeset patch # User Steve Losh <steve@stevelosh.com> # Date 1261006477 18000 # Node ID 81d4da7f81f5eea7ead1007904a154a7568d4d93 Initial commit. diff -r 000000000000 -r 81d4da7f81f5 .hgignore --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,8 @@ +syntax: glob + +.DS_Store +*.pyc +*.log +out +deploy_tmp +.sass-cache diff -r 000000000000 -r 81d4da7f81f5 .venv --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.venv Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,1 @@ +stevelosh-hyde diff -r 000000000000 -r 81d4da7f81f5 content/about/about.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/about/about.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,17 @@ +{% extends "_about.html" %} +{%hyde + title: "About" +%} +{% block article %} + +Hyde is a static website generator using django templates & an "extensible generation engine". + +Read more about Hyde [here:]({{content}}/{{links.introducing_hyde}}) + + +{% endblock %} + + + + + diff -r 000000000000 -r 81d4da7f81f5 content/archives/archives.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/archives/archives.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,5 @@ +{% extends "skeleton/_listing.html" %} +{%hyde + title: "Archives" + exclude: True +%} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 content/archives/firstpost.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/archives/firstpost.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,8 @@ +{% extends "_post.html" %} +{%hyde + title: "Welcome to Hyde!" + created: 2009-03-01 20:19:00 +%} +{% block article %} +Congratulations! You have successfully set up hyde! +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 content/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/content/index.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,5 @@ +{% extends "skeleton/_index.html" %} +{%hyde + title: "Blog Posts" + listing: True +%} diff -r 000000000000 -r 81d4da7f81f5 layout/_about.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/_about.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,14 @@ +{% extends "skeleton/_body.html" %} +{% block content_body %} +<div id="post-content"> +{% filter typogrify %} +{% markdown %} + +{% block article %} + +{% endblock %} + +{% endmarkdown %} +{% endfilter %} +</div> +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/_post.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/_post.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,14 @@ +{% extends "skeleton/_body.html" %} +{% block content_body %} +<div id="post-content"> +{% filter typogrify %} +{% markdown %} +{% article %} +{% block article %} + +{% endblock %} +{% endarticle %} +{% endmarkdown %} +{% endfilter %} +</div> +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_atom.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_atom.xml Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="utf-8"?> +{%spaceless%} +<feed xmlns="http://www.w3.org/2005/Atom"> + <title>{% block title %}{{site.name}} {{page.node.name}}{%endblock%}</title> + {%block self_url %} + <link href="{{page.node.full_url}}/atom.xml" rel="self"/> + {%endblock%} + {%block site_url %} + <link href="{{site.full_url}}"/> + {%endblock%}{%block feed_extra%}{%endblock%} + <updated>{{now|xmldatetime}}</updated> + <id>{{site.full_url}}</id> + {% for node_page in page.node.walk_pages %} + {% ifnotequal node_page page %} + {% if not node_page.listing and not node_page.exclude %} + <entry> + <title>{{node_page.title}}</title> + <author><name>Lakshmi Vyas</name></author> + <link href="{{node_page.full_url}}"/> + <updated>{{node_page.updated|default:node_page.created|xmldatetime}}</updated> + <published>{{node_page.created|xmldatetime}}</published> + <id>{{node_page.full_url}}</id> + {%block entry_extra%}{%endblock%} + <content type="html"> + {%filter force_escape%}{% render_article node_page %}{%endfilter%} + </content> + </entry> + {%endif%} + {%endifnotequal%} + {% endfor %} +</feed> +{%endspaceless%} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_base.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_base.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,27 @@ +{% extends "skeleton/_root.html" %} +{% block all %} +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" + "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> +<head> + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <title>{% block title %}{{site.name}}{% endblock %}</title> + {% block feeds %} + <link href="{{site.url}}/blog/atom.xml" rel="alternate" title="{{site.name}}" type="application/atom+xml"/> + {% endblock %} + {% block css %} + <link rel="stylesheet" href="{{site.url}}/media/css/base.css" type="text/css" media="screen" charset="utf-8"> + {% block extra_css %}{% endblock %}{% endblock %}{% block js %} + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js"></script> + {% block extra_js %}{% endblock %}{% endblock %} +</head> +<body> +{% include "skeleton/_header.html" %} +<div id="content"> + {% block content %}{% endblock %} +</div> +{% include "skeleton/_footer.html" %} +</body> +</html> +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_body.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_body.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,25 @@ +{% extends "skeleton/_base.html" %} +{% block title %}{{site.name}}{% endblock %} +{% block content %} +{% comment %}{% block breadcrumbs %}{% include "skeleton/_breadcrumbs.html"%}{% endblock %}{% endcomment %} +{% block nav %} +<div id="nav"> + <ul> + <a href="{{site.listing_url}}"> + <li{% ifequal page.module site.module %} class="home-selected" {% endifequal %}> + Home + </li> + </a> + {% for module in site.children %} + <a href="{{module.listing_url}}"> + <li{% ifequal page.module module %} class="selected" {% endifequal %}> + {{module.name|unslugify}} + </li> + </a> + {% endfor %} + </ul> +</div> +{% endblock %} +{% block content_header %}{% ifnotequal page.module site.module %}<div class="article title"><h3>{{ page.title }}</h3></div>{% endifnotequal %}{% endblock %} +{% block content_body %}{% endblock %} +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_breadcrumbs.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_breadcrumbs.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,13 @@ +{% extends "skeleton/_root.html" %} +{% block all %} +<ul class="breadcrumbs"> +{% for node in page.node.ancestors %} + <li> + <a href="{{node.listing_url}}">{{node.name|unslugify}}</a> + {% if not forloop.last%}{% block breadcrumb_seperator %} + <span class="separator">></span>{% endblock %}{% endif %} + </li> +{% endfor %} +</ul> + +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_footer.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_footer.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,1 @@ +<div id='footer'> Copyright {{site.name}}. Simple template by <a href="http://exurbia.tumblr.com/">Harry Lachenmayer</a></div> diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_header.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_header.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,5 @@ +<div id="header"> + <a href="{{site.listing_url}}"> + <h1>{{site.name}}</h1> + </a> +</div> diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_index.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,6 @@ +{% extends "skeleton/_body.html" %} +{% block content_body %} +{% for node in page.node.walk %} +{% include "skeleton/_innerindex.html" %} +{% endfor %} +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_innerindex.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_innerindex.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,20 @@ +{% extends "skeleton/_root.html" %} +{% block all %} +{%spaceless%} +{% for list_page in node.pages %} +{% ifnotequal list_page node.listing_page %} +{% if not list_page.exclude %} +<div class="article"> + <div class="title"> + {% with list_page.name_without_extension|remove_date_prefix|unslugify as default_title %} + <h3><a href="{{list_page.url}}">{{list_page.title|default_if_none:default_title }}</a></h3> + {% if list_page.created %}<span>{{list_page.created}}</span>{% endif %} + {%endwith%} + </div> + {% render_article list_page %} +</div> +{%endif%} +{% endifnotequal %} +{% endfor %} +{%endspaceless%} +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_innerlisting.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_innerlisting.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,16 @@ +{% extends "skeleton/_root.html" %} +{% block all %} +{%spaceless%} +<ul id="archives"> + {% for list_page in node.pages %} + {% ifnotequal list_page node.listing_page %} + {% if not list_page.exclude %} + <li class="archives"> + <a href="{{list_page.url}}"> + {% with list_page.name_without_extension|remove_date_prefix|unslugify as default_title %}{{list_page.title|default_if_none:default_title }}{%endwith%} + </a> + </li> + {%endif%}{% endifnotequal %}{% endfor %} +</ul> +{%endspaceless%} +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_listing.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_listing.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,8 @@ +{% extends "skeleton/_body.html"%} +{% block content_body %} +<div id="listing"> +{% for node in page.node.walk %} +{% include "skeleton/_innerlisting.html" %} +{% endfor %} +</div> +{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 layout/skeleton/_root.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/layout/skeleton/_root.html Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,1 @@ +{% block all %}{% endblock %} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 media/css/base.css --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/media/css/base.css Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,128 @@ +* { + margin: 0; + padding: 0; +} + +body { + font-family: Arial, Helvetica, sans-serif; + color: black; + font-size: 1em; + line-height: 2em; +} + +h1 {font-size: 4em; line-height: 72px; font-weight: bold;} +h2 {font-size: 2em; line-height: 2em; font-weight: bold;} +h3 {font-size: 1.5em; line-height: 2em; font-weight: bold;} +h4 {font-size: 1.5em; line-height: 2em; font-weight: bold;} +h5 {font-size: 1em; line-height: 2em; font-weight: bold;} +h6 {font-size: 1em; line-height: 2em; font-weight: normal;} + +a { + text-decoration: none; + font-weight: bold; + color: #111; +} +a:hover { + color: #000; + border-bottom: 2px solid #cc0000; +} +a:visited { + color: #333; + font-style: italic; +} + +ul, ol { + margin-left: 0; + padding-left: 0; +} +li { + margin-bottom: 1em; + margin-left: 1em; + list-style-position: inside; +} + +#header { + height: 10em; +} +#header h1 { + margin: 0; + padding: 1em 0 0 0.5em; + line-height: 0; + font-size: 4em; + color: black; +} +#header h1:hover { + color: #cc0000; +} +#header a:visited { + font-style: normal; +} + +#nav ul { + padding: 0; + margin: 0; +} +#nav ul li { + padding: 0; + margin: 0; + display: inline; + list-style: none; + padding: 0.5em; + margin-right: 5px; + background: black; + color: white; +} +#nav ul li:hover { + border-bottom: 5px solid #cc0000; +} +#nav a { + color: white; + border: none; + font-style: normal; +} + +#content-header { + margin: 1em 0 0 0; +} + +#content { + margin: 0 2em 2em 2em; +} + +ul#archives { + list-style: none; +} +ul#archives li { + font-size: 1.5em; +} + +#footer { + text-align: center; + font-size: 0.6em; +} + +div.article { + margin-top: 2em; +} + +.title { + margin-bottom: 1.67em; + border-bottom: 6px solid #cccccc; +} +.title h3 { + display: inline; + line-height: 1em; +} +.title span { + font-size: 0.67em; + line-height: 1em; + padding: 1em; + float: right; +} +.title a:hover { + border: none; +} +.title a:visited { + color: #111; + font-style: normal; +} \ No newline at end of file diff -r 000000000000 -r 81d4da7f81f5 settings.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/settings.py Wed Dec 16 18:34:37 2009 -0500 @@ -0,0 +1,111 @@ +import os + +ROOT_PATH = os.path.abspath(os.path.dirname(__file__)) + +#Directories +LAYOUT_DIR = os.path.join(ROOT_PATH, 'layout') +CONTENT_DIR = os.path.join(ROOT_PATH, 'content') +MEDIA_DIR = os.path.join(ROOT_PATH, 'media') +DEPLOY_DIR = os.path.join(ROOT_PATH, 'deploy') +TMP_DIR = os.path.join(ROOT_PATH, 'deploy_tmp') +BACKUPS_DIR = os.path.join(ROOT_PATH, 'backups') + +BACKUP = False + +SITE_ROOT = "/" +SITE_WWW_URL = "http://www.yoursite.com" +SITE_NAME = "Hyde" + +#Url Configuration +GENERATE_ABSOLUTE_FS_URLS = False + +# Clean urls causes Hyde to generate urls without extensions. Examples: +# http://example.com/section/page.html becomes +# http://example.com/section/page/, and the listing for that section becomes +# http://example.com/section/ +# The built-in CherryPy webserver is capable of serving pages with clean urls +# without any additional configuration, but Apache will need to use Mod_Rewrite +# to map the clean urls to the actual html files. The HtaccessGenerator site +# post processor is capable of automatically generating the necessary +# RewriteRules for use with Apache. +GENERATE_CLEAN_URLS = False + +# A list of filenames (without extensions) that will be considered listing +# pages for their enclosing folders. +# LISTING_PAGE_NAMES = ['index'] +LISTING_PAGE_NAMES = [] + +# Determines whether or not to append a trailing slash to generated urls when +# clean urls are enabled. +APPEND_SLASH = False + +# {folder : extension : (processors)} +# The processors are run in the given order and are chained. +# Only a lone * is supported as an indicator for folders. Path +# should be specified. No wildcard card support yet. + +# Starting under the media folder. For example, if you have media/css under +# your site root,you should specify just css. If you have media/css/ie you +# should specify css/ie for the folder name. css/* is not supported (yet). + +# Extensions do not support wildcards. + +MEDIA_PROCESSORS = { + '*':{ + '.css':('hydeengine.media_processors.TemplateProcessor', + 'hydeengine.media_processors.YUICompressor',), + '.ccss':('hydeengine.media_processors.TemplateProcessor', + 'hydeengine.media_processors.CleverCSS', + 'hydeengine.media_processors.YUICompressor',), + '.hss':( + 'hydeengine.media_processors.TemplateProcessor', + 'hydeengine.media_processors.HSS', + 'hydeengine.media_processors.YUICompressor',), + '.js':( + 'hydeengine.media_processors.TemplateProcessor', + 'hydeengine.media_processors.YUICompressor',) + } +} + +CONTENT_PROCESSORS = {} + +SITE_POST_PROCESSORS = { + # 'media/js': { + # 'hydeengine.site_post_processors.FolderFlattener' : { + # 'remove_processed_folders': True, + # 'pattern':"*.js" + # } + # } +} + +CONTEXT = { + 'GENERATE_CLEAN_URLS': GENERATE_CLEAN_URLS +} + +FILTER = { + 'include': (".htaccess",), + 'exclude': (".*","*~") +} + + +#Processor Configuration + +# path for YUICompressor, or None if you don't +# want to compress JS/CSS. Project homepage: +# http://developer.yahoo.com/yui/compressor/ +YUI_COMPRESSOR = "./lib/yuicompressor-2.4.1.jar" +#YUI_COMPRESSOR = None + +# path for HSS, which is a preprocessor for CSS-like files (*.hss) +# project page at http://ncannasse.fr/projects/hss +#HSS_PATH = "./lib/hss-1.0-osx" +HSS_PATH = None # if you don't want to use HSS + +#Django settings + +TEMPLATE_DIRS = (LAYOUT_DIR, CONTENT_DIR, TMP_DIR, MEDIA_DIR) + +INSTALLED_APPS = ( + 'hydeengine', + 'django.contrib.webdesign', +)