Skip to content
Browse files

Goodbye site_init directory.

  • Loading branch information...
1 parent d2c2fe9 commit 5e147dcdb2f09639fe7586876803390e4f7d4d9e @douglatornell douglatornell committed
Showing with 3 additions and 3,632 deletions.
  1. +0 −1 MANIFEST.in
  2. +0 −140 blogofile/site_init/__init__.py
  3. +0 −109 blogofile/site_init/_config.py
  4. +0 −4 blogofile/site_init/bare/_config.py
  5. +0 −34 blogofile/site_init/blog_templates/_templates/blog/atom.mako
  6. +0 −17 blogofile/site_init/blog_templates/_templates/blog/chronological.mako
  7. +0 −10 blogofile/site_init/blog_templates/_templates/blog/permapage.mako
  8. +0 −27 blogofile/site_init/blog_templates/_templates/blog/post.mako
  9. +0 −4 blogofile/site_init/blog_templates/_templates/blog/post_excerpt.mako
  10. +0 −35 blogofile/site_init/blog_templates/_templates/blog/rss.mako
  11. +0 −59 blogofile/site_init/blog_unit_test/_config.py
  12. +0 −2 blogofile/site_init/blog_unit_test/_filters/filter_to_override.py
  13. +0 −8 blogofile/site_init/blog_unit_test/_posts/001 - post #1.markdown
  14. +0 −8 blogofile/site_init/blog_unit_test/_posts/002 - post #2.markdown
  15. +0 −28 blogofile/site_init/blog_unit_test/_posts/003 - post #3 - unicode test - 日本語 test.markdown
  16. +0 −9 blogofile/site_init/blog_unit_test/_posts/004 - post #4.markdown
  17. +0 −7 blogofile/site_init/blog_unit_test/_posts/005 - post #5.textile
  18. +0 −7 blogofile/site_init/blog_unit_test/_posts/006 - post #6.rst
  19. +0 −9 blogofile/site_init/blog_unit_test/_posts/007 - post #7.markdown
  20. +0 −3 blogofile/site_init/blog_unit_test/_posts/008 - post with no yaml.markdown
  21. +0 −8 blogofile/site_init/blog_unit_test/_posts/009 - post with no title.markdown
  22. +0 −7 blogofile/site_init/blog_unit_test/_posts/010 - post with no date.markdown
  23. +0 −8 blogofile/site_init/blog_unit_test/_posts/011 - post with no permalink.markdown
  24. +0 −9 blogofile/site_init/blog_unit_test/_posts/013 - post with no filter.markdown
  25. +0 −8 blogofile/site_init/blog_unit_test/_posts/014 - title has question mark.markdown
  26. +0 −11 blogofile/site_init/blog_unit_test/_posts/015 - unpublished draft.markdown
  27. +0 −5 blogofile/site_init/blog_unit_test/_templates/base.mako
  28. +0 −26 blogofile/site_init/blog_unit_test/_templates/footer.mako
  29. +0 −10 blogofile/site_init/blog_unit_test/_templates/head.mako
  30. +0 −10 blogofile/site_init/blog_unit_test/_templates/header.mako
  31. +0 −33 blogofile/site_init/blog_unit_test/_templates/site.mako
  32. +0 −32 blogofile/site_init/blog_unit_test/filter_test.html.mako
  33. +0 −13 blogofile/site_init/blog_unit_test/index.html.mako
  34. +0 −1 blogofile/site_init/blog_unit_test/jinja2_test.html.jinja2
  35. +0 −14 blogofile/site_init/blog_unit_test/markdown_test.html.markdown
  36. +0 −20 blogofile/site_init/blogofile_com.py
  37. +0 −60 blogofile/site_init/jinja2_test/_config.py
  38. +0 −6 blogofile/site_init/jinja2_test/_posts/001 - post 1.markdown
  39. +0 −6 blogofile/site_init/jinja2_test/_posts/002 - post 2.markdown
  40. +0 −6 blogofile/site_init/jinja2_test/_posts/003 - post 3.markdown
  41. +0 −6 blogofile/site_init/jinja2_test/_posts/004 - post 4.markdown
  42. +0 −28 blogofile/site_init/jinja2_test/_posts/006 - Unicode Test.markdown
  43. +0 −47 blogofile/site_init/jinja2_test/_posts/007 - markdown features.markdown
  44. +0 −27 blogofile/site_init/jinja2_test/_posts/008 - syntax highlight.markdown
  45. +0 −19 blogofile/site_init/jinja2_test/_posts/009 - unpublished draft.markdown
  46. +0 −25 blogofile/site_init/jinja2_test/_templates/footer.jinja2
  47. +0 −10 blogofile/site_init/jinja2_test/_templates/head.jinja2
  48. +0 −10 blogofile/site_init/jinja2_test/_templates/header.jinja2
  49. +0 −30 blogofile/site_init/jinja2_test/_templates/site.jinja2
  50. +0 −13 blogofile/site_init/jinja2_test/index.html.jinja2
  51. +0 −56 blogofile/site_init/simple_blog/_config.py
  52. +0 −6 blogofile/site_init/simple_blog/_posts/001 - post 1.markdown
  53. +0 −6 blogofile/site_init/simple_blog/_posts/002 - post 2.markdown
  54. +0 −6 blogofile/site_init/simple_blog/_posts/003 - post 3.markdown
  55. +0 −6 blogofile/site_init/simple_blog/_posts/004 - post 4.markdown
  56. +0 −28 blogofile/site_init/simple_blog/_posts/006 - Unicode Test.markdown
  57. +0 −47 blogofile/site_init/simple_blog/_posts/007 - markdown features.markdown
  58. +0 −27 blogofile/site_init/simple_blog/_posts/008 - syntax highlight.markdown
  59. +0 −19 blogofile/site_init/simple_blog/_posts/009 - unpublished draft.markdown
  60. +0 −5 blogofile/site_init/simple_blog/_templates/base.mako
  61. +0 −26 blogofile/site_init/simple_blog/_templates/footer.mako
  62. +0 −10 blogofile/site_init/simple_blog/_templates/head.mako
  63. +0 −8 blogofile/site_init/simple_blog/_templates/header.mako
  64. +0 −33 blogofile/site_init/simple_blog/_templates/site.mako
  65. +0 −13 blogofile/site_init/simple_blog/index.html.mako
  66. +0 −32 blogofile/site_init/simple_blog_html5/404.html
  67. +0 −71 blogofile/site_init/simple_blog_html5/_config.py
  68. +0 −485 blogofile/site_init/simple_blog_html5/_htaccess
  69. +0 −6 blogofile/site_init/simple_blog_html5/_posts/000 - filler1.markdown
  70. +0 −6 blogofile/site_init/simple_blog_html5/_posts/000 - filler2.markdown
  71. +0 −6 blogofile/site_init/simple_blog_html5/_posts/000 - filler3.markdown
  72. +0 −6 blogofile/site_init/simple_blog_html5/_posts/000 - filler4.markdown
  73. +0 −6 blogofile/site_init/simple_blog_html5/_posts/001 - post 1.markdown
  74. +0 −47 blogofile/site_init/simple_blog_html5/_posts/002 - post 2.markdown
  75. +0 −19 blogofile/site_init/simple_blog_html5/_posts/003 - unpublished draft.markdown
  76. +0 −28 blogofile/site_init/simple_blog_html5/_posts/007 - unicode test.markdown
  77. +0 −16 blogofile/site_init/simple_blog_html5/_posts/008 - post 8 - syntax highlight.markdown
  78. +0 −62 blogofile/site_init/simple_blog_html5/_site/css/pygments_murphy.css
  79. +0 −2 blogofile/site_init/simple_blog_html5/_templates/base.mako
  80. +0 −34 blogofile/site_init/simple_blog_html5/_templates/blog/atom.mako
  81. +0 −16 blogofile/site_init/simple_blog_html5/_templates/blog/chronological.mako
  82. +0 −10 blogofile/site_init/simple_blog_html5/_templates/blog/permapage.mako
  83. +0 −42 blogofile/site_init/simple_blog_html5/_templates/blog/post.mako
  84. +0 −4 blogofile/site_init/simple_blog_html5/_templates/blog/post_excerpt.mako
  85. +0 −35 blogofile/site_init/simple_blog_html5/_templates/blog/rss.mako
  86. +0 −30 blogofile/site_init/simple_blog_html5/_templates/body_scripts.mako
  87. +0 −22 blogofile/site_init/simple_blog_html5/_templates/footer.mako
  88. +0 −18 blogofile/site_init/simple_blog_html5/_templates/head.mako
  89. +0 −23 blogofile/site_init/simple_blog_html5/_templates/header.mako
  90. +0 −17 blogofile/site_init/simple_blog_html5/_templates/sidebar.mako
  91. +0 −37 blogofile/site_init/simple_blog_html5/_templates/site.mako
  92. +0 −4 blogofile/site_init/simple_blog_html5/_templates/theme.mako
  93. +0 −25 blogofile/site_init/simple_blog_html5/crossdomain.xml
  94. +0 −374 blogofile/site_init/simple_blog_html5/css/grid.css
  95. +0 −7 blogofile/site_init/simple_blog_html5/css/handheld.css
  96. +0 −141 blogofile/site_init/simple_blog_html5/css/style.css
  97. BIN blogofile/site_init/simple_blog_html5/favicon.ico
  98. BIN blogofile/site_init/simple_blog_html5/img/apple-touch-icon.png
  99. +0 −19 blogofile/site_init/simple_blog_html5/index.html.mako
  100. +0 −169 blogofile/site_init/simple_blog_html5/js/jquery.tweet.js
  101. +0 −13 blogofile/site_init/simple_blog_html5/js/libs/dd_belatedpng.js
  102. +0 −16 blogofile/site_init/simple_blog_html5/js/libs/jquery-1.5.1.min.js
  103. +0 −2 blogofile/site_init/simple_blog_html5/js/libs/modernizr-1.7.min.js
  104. +0 −9 blogofile/site_init/simple_blog_html5/js/plugins.js
  105. +0 −12 blogofile/site_init/simple_blog_html5/js/site.js
  106. +0 −5 blogofile/site_init/simple_blog_html5/robots.txt
  107. +0 −427 blogofile/site_init/simple_blog_html5/themes/theme1/style.css
  108. +3 −4 setup.py
View
1 MANIFEST.in
@@ -2,5 +2,4 @@ include README.rst
include CHANGES.txt
include LICENSE.txt
include requirements/*.txt
-include blogofile/site_init/*.zip
recursive-include converters *.py
View
140 blogofile/site_init/__init__.py
@@ -1,140 +0,0 @@
-import os
-import pkgutil
-import zipfile
-import io
-import logging
-import shutil
-import imp
-import traceback
-from .. import __version__ as bf_version
-
-logger = logging.getLogger("blogofile.site_init")
-
-from .. import util
-
-available_sites = [
- # (name of site, description, module)
- ("bare", "A blank site with no blog", "bare"),
- ("simple_blog", "A (very) simple blog with no theme", "simple_blog"),
- ("simple_blog_html5", "A simple blog with HTML5 boilerplate", "simple_blog_html5"),
- ("jinja2_test", "A site based on jinja2 templates", "jinja2_test"),
- ("blog_unit_test", "Blog unit tests (not for end users)", "blog_unit_test")
- ]
-
-#These are hidden site templates that are not shown in the list shown in help
-hidden_sites = [
- ]
-
-extra_features = {
- }
-
-all_sites = list(available_sites)
-all_sites.extend(hidden_sites)
-
-site_modules = dict((x[0], x[2]) for x in all_sites)
-
-def zip_site_init():
- """Zip up all of the subdirectories of site_init
-
- This function should only be called by setuptools
- """
- try:
- curdir = os.getcwd()
- root = os.path.join(curdir, "blogofile", "site_init")
- for d in os.listdir(root):
- if d == '__pycache__':
- continue
- d = os.path.join(root, d)
- if os.path.isdir(d):
- os.chdir(root)
- zf = d + ".zip"
- z = zipfile.ZipFile(zf, "w")
- os.chdir(d)
- for dirpath, dirnames, filenames in os.walk(os.curdir):
- if len(filenames) == 0:
- #This is an empty directory, add it anyway:
- z.writestr(zipfile.ZipInfo(dirpath+"/"), '')
- for fn in filenames:
- z.write(os.path.join(dirpath, fn))
- z.close()
- finally:
- os.chdir(curdir)
-
-def do_help(): #pragma: no cover
- print("For example, create a simple site with a blog and no theme:\n")
- print(" blogofile init simple_blog\n")
-
-def import_site_init(feature):
- """Copy a site_init template to the build dir.
-
- site_init templates can be of four forms:
- 1) A directory
- 2) A zip file
- 3) A .py file
- 4) A function and args tuple
- Directories are usually used in development,
- whereas zip files are used in production.
- .py files and functions are special in that they control how to initialize a site,
- for example, pulling from a git repository."""
- #If the directory exists, just use that.
- if type(feature) == tuple:
- feature[0](**feature[1])
- return
- path = os.path.join(os.path.split(__file__)[0], feature)
- if os.path.isdir(path):
- logger.info("Initializing site from directory: " + path)
- for root, dirs, files in os.walk(path):
- for fn in files:
- if fn.startswith("."):
- continue
- fn = os.path.join(root, fn)
- dst_fn = fn.replace(path + os.path.sep,"")
- dst_dir = os.path.split(dst_fn)[0]
- util.mkdir(dst_dir)
- shutil.copyfile(fn, dst_fn)
- #If a .py file exists, run with that:
- elif os.path.isfile(path) and path.endswith(".py"):
- mod = imp.load_source("mod", path)
- mod.do_init()
- #Otherwise, load it from the zip file
- else:
- try:
- zip_data = pkgutil.get_data("blogofile.site_init", feature + ".zip")
- except IOError:
- raise
- else:
- logger.info("Initializing feature from zip file: {0}".format(feature))
- zip_file = zipfile.ZipFile(io.BytesIO(zip_data))
- for name in zip_file.namelist():
- if name.endswith('/'):
- util.mkdir(name)
- else:
- util.mkdir(os.path.split(name)[0])
- f = open(name, 'wb')
- f.write(zip_file.read(name))
- f.close()
- #Recursively import child features of this feature
- try:
- child_features = extra_features[feature]
- except KeyError:
- pass
- else:
- for child_feature in child_features:
- import_site_init(child_feature)
-
-def do_init(args):
- if not args.SITE_TEMPLATE:
- do_help()
- else:
- if args.SITE_TEMPLATE not in [x[0] for x in all_sites]:
- do_help()
- return
- if len(os.listdir(args.src_dir)) > 0 :
- print(("This directory is not empty, will not attempt to " \
- "initialize here : {0}".format(args.src_dir)))
- return
-
- print(("Initializing the {0} site template...".format(
- args.SITE_TEMPLATE)))
- template = site_modules[args.SITE_TEMPLATE]
- import_site_init(template)
View
109 blogofile/site_init/_config.py
@@ -1,109 +0,0 @@
-######################################################################
-# This is the main Blogofile configuration file.
-# www.Blogofile.com
-#
-# This is the canonical _config.py with every single default setting.
-#
-# Don't edit this file directly; create your own _config.py (from
-# scratch or using 'blogofile init') and your settings will override
-# these defaults.
-#
-######################################################################
-
-######################################################################
-# Basic Settings
-# (almost all sites will want to configure these settings)
-######################################################################
-## site.url -- Your site's full URL
-# Your "site" is the same thing as your _site directory.
-# If you're hosting a blogofile powered site as a subdirectory of a larger
-# non-blogofile site, then you would set the site_url to the full URL
-# including that subdirectory: "http://www.yoursite.com/path/to/blogofile-dir"
-site.url = "http://www.example.com"
-
-## site.author -- Your name, the author of the website.
-# This is optional. If set to anything other than None, the
-# simple_blog template creates a meta tag for the site author.
-site.author = None
-
-######################################################################
-# Advanced Settings
-######################################################################
-# Use hard links when copying files. This saves disk space and shortens
-# the time to build sites that copy lots of static files.
-# This is turned off by default though, because hard links are not
-# necessarily what every user wants.
-site.use_hard_links = False
-#Warn when we're overwriting a file?
-site.overwrite_warning = True
-# These are the default ignore patterns for excluding files and dirs
-# from the _site directory
-# These can be strings or compiled patterns.
-# Strings are assumed to be case insensitive.
-site.file_ignore_patterns = [
- # All files that start with an underscore
- ".*/_.*",
- # Emacs autosave files
- ".*/#.*",
- # Emacs/Vim backup files
- ".*~$",
- # Vim swap files
- ".*/\..*\.swp$",
- # VCS directories
- ".*/\.(git|hg|svn|bzr)$",
- # Git and Mercurial ignored files definitions
- ".*/.(git|hg)ignore$",
- # CVS dir
- ".*/CVS$",
- ]
-
-from blogofile.template import MakoTemplate, JinjaTemplate, \
- MarkdownTemplate, RestructuredTextTemplate, TextileTemplate
-#The site base template filename:
-site.base_template = "site.mako"
-#Template engines mapped to file extensions:
-templates.engines = HC(
- mako = MakoTemplate,
- jinja = JinjaTemplate,
- jinja2 = JinjaTemplate,
- markdown = MarkdownTemplate,
- rst = RestructuredTextTemplate,
- textile = TextileTemplate
- )
-
-#Template content blocks:
-templates.content_blocks = HC(
- mako = HC(
- pattern = re.compile("\${\W*next.body\(\)\W*}"),
- replacement = "${next.body()}"
- ),
- jinja2 = HC(
- pattern = re.compile("{%\W*block content\W*%}.*?{%\W*endblock\W*%}", re.MULTILINE|re.DOTALL),
- replacement = "{% block content %} {% endblock %}"
- ),
- filter = HC(
- pattern = re.compile("_^"), #Regex that matches nothing
- replacement = "~~!`FILTER_CONTENT_HERE`!~~",
- default_chains = HC(
- markdown = "syntax_highlight, markdown",
- rst = "syntax_highlight, rst"
- )
- )
- )
-
-### Pre/Post build hooks:
-def pre_build():
- #Do whatever you want before the _site is built.
- pass
-
-def post_build():
- #Do whatever you want after the _site is built successfully.
- pass
-
-def build_exception():
- #Do whatever you want if there is an unrecoverable error in building the site.
- pass
-
-def build_finally():
- #Do whatever you want after the _site is built successfully OR after a fatal error
- pass
View
4 blogofile/site_init/bare/_config.py
@@ -1,4 +0,0 @@
-# This is a barren blogofile config file.
-# See docs at http://www.blogofile.com/documentation
-# for config options
-# or run 'blogofile help init' to see more complete templates
View
34 blogofile/site_init/blog_templates/_templates/blog/atom.mako
@@ -1,34 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><% from datetime import datetime %>
-<feed
- xmlns="http://www.w3.org/2005/Atom"
- xmlns:thr="http://purl.org/syndication/thread/1.0"
- xml:lang="en"
- >
- <title type="text">${bf.config.blog.name}</title>
- <subtitle type="text">${bf.config.blog.description}</subtitle>
-
- <updated>${datetime.utcnow().strftime("%Y-%m-%dT%H:%M:%SZ")}</updated>
- <generator uri="http://blogofile.com/">Blogofile</generator>
-
- <link rel="alternate" type="text/html" href="${bf.config.blog.url}" />
- <id>${bf.config.blog.url}/feed/atom/</id>
- <link rel="self" type="application/atom+xml" href="${bf.config.blog.url}/feed/atom/" />
-% for post in posts:
- <entry>
- <author>
- <name>${post.author}</name>
- <uri>${bf.config.blog.url}</uri>
- </author>
- <title type="html"><![CDATA[${post.title}]]></title>
- <link rel="alternate" type="text/html" href="${post.permalink}" />
- <id>${post.permalink}</id>
- <updated>${post.updated.strftime("%Y-%m-%dT%H:%M:%SZ")}</updated>
- <published>${post.date.strftime("%Y-%m-%dT%H:%M:%SZ")}</published>
-% for category in post.categories:
- <category scheme="${bf.config.blog.url}" term="${category}" />
-% endfor
- <summary type="html"><![CDATA[${post.title}]]></summary>
- <content type="html" xml:base="${post.permalink}"><![CDATA[${post.content}]]></content>
- </entry>
-% endfor
-</feed>
View
17 blogofile/site_init/blog_templates/_templates/blog/chronological.mako
@@ -1,17 +0,0 @@
-<%inherit file="blog_base_template" />
-% for post in posts:
- <%include file="post.mako" args="post=post" />
-% if bf.config.blog.disqus.enabled:
- <div class="after_post"><a href="${post.permalink}#disqus_thread">Read and Post Comments</a></div>
-% endif
- <hr class="interblog" />
-% endfor
-% if prev_link:
- <a href="${prev_link}">« Previous Page</a>
-% endif
-% if prev_link and next_link:
- --
-% endif
-% if next_link:
- <a href="${next_link}">Next Page »</a>
-% endif
View
10 blogofile/site_init/blog_templates/_templates/blog/permapage.mako
@@ -1,10 +0,0 @@
-<%inherit file="blog_base_template" />
-<%include file="post.mako" args="post=post" />
-<div id="disqus_thread"></div>
-<script type="text/javascript">
- var disqus_url = "${post.permalink}";
-</script>
-% if bf.config.blog.disqus.enabled:
-<script type="text/javascript" src="http://disqus.com/forums/${bf.config.blog.disqus.name}/embed.js"></script>
-<noscript><a href="http://${bf.config.blog.disqus.name}.disqus.com/?url=ref">View the discussion thread.</a></noscript><a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
-% endif
View
27 blogofile/site_init/blog_templates/_templates/blog/post.mako
@@ -1,27 +0,0 @@
-<%page args="post"/>
-<div class="blog_post">
- <a name="${post.slug}"></a>
- <h2 class="blog_post_title"><a href="${post.permapath()}" rel="bookmark" title="Permanent Link to ${post.title}">${post.title}</a></h2>
- <small>${post.date.strftime("%B %d, %Y at %I:%M %p")} | categories:
-<%
- category_links = []
- for category in post.categories:
- if post.draft:
- #For drafts, we don't write to the category dirs, so just write the categories as text
- category_links.append(category.name)
- else:
- category_links.append("<a href='%s'>%s</a>" % (category.path, category.name))
-%>
-${", ".join(category_links)}
-% if bf.config.blog.disqus.enabled:
- | <a href="${post.permalink}#disqus_thread">View Comments</a>
-% endif
-</small><p/>
- <div class="post_prose">
- ${self.post_prose(post)}
- </div>
-</div>
-
-<%def name="post_prose(post)">
- ${post.content}
-</%def>
View
4 blogofile/site_init/blog_templates/_templates/blog/post_excerpt.mako
@@ -1,4 +0,0 @@
-<%inherit file="post.mako" />
-<%def name="post_prose(post)">
- ${post.excerpt}
-</%def>
View
35 blogofile/site_init/blog_templates/_templates/blog/rss.mako
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?><% from datetime import datetime %>
-<rss version="2.0"
- xmlns:content="http://purl.org/rss/1.0/modules/content/"
- xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
- xmlns:atom="http://www.w3.org/2005/Atom"
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:wfw="http://wellformedweb.org/CommentAPI/"
- >
- <channel>
- <title>${bf.config.blog.name}</title>
- <link>${bf.config.blog.url}</link>
- <description>${bf.config.blog.description}</description>
- <pubDate>${datetime.utcnow().strftime("%a, %d %b %Y %H:%M:%S GMT")}</pubDate>
- <generator>Blogofile</generator>
- <sy:updatePeriod>hourly</sy:updatePeriod>
- <sy:updateFrequency>1</sy:updateFrequency>
-% for post in posts:
- <item>
- <title>${post.title}</title>
- <link>${post.permalink}</link>
- <pubDate>${post.date.strftime("%a, %d %b %Y %H:%M:%S %Z")}</pubDate>
-% for category in post.categories:
- <category><![CDATA[${category}]]></category>
-% endfor
-% if post.guid:
- <guid>${post.guid}</guid>
-% else:
- <guid isPermaLink="true">${post.permalink}</guid>
-% endif
- <description>${post.title}</description>
- <content:encoded><![CDATA[${post.content}]]></content:encoded>
- </item>
-% endfor
- </channel>
-</rss>
View
59 blogofile/site_init/blog_unit_test/_config.py
@@ -1,59 +0,0 @@
-######################################################################
-# This is the main Blogofile configuration file.
-# www.Blogofile.com
-#
-# This file has the following ordered sections:
-# * Basic Settings
-# * Intermediate Settings
-# * Advanced Settings
-#
-# You really only _need_ to change the Basic Settings.
-######################################################################
-
-######################################################################
-# Basic Settings
-# (almost all sites will want to configure these settings)
-######################################################################
-## site_url -- Your site's full URL
-# Your "site" is the same thing as your _site directory.
-# If you're hosting a blogofile powered site as a subdirectory of a larger
-# non-blogofile site, then you would set the site_url to the full URL
-# including that subdirectory: "http://www.yoursite.com/path/to/blogofile-dir"
-site.url = "http://www.yoursite.com"
-
-#### Blog Settings ####
-blog = plugins.blog
-
-## blog_enabled -- Should the blog be enabled?
-# (You don't _have_ to use blogofile to build blogs)
-blog.enabled = True
-
-## blog_path -- Blog path.
-# This is the path of the blog relative to the site_url.
-# If your site_url is "http://www.yoursite.com/~ryan"
-# and you set blog_path to "/blog" your full blog URL would be
-# "http://www.yoursite.com/~ryan/blog"
-# Leave blank "" to set to the root of site_url
-blog.path = "/blog"
-
-## blog_name -- Your Blog's name.
-# This is used repeatedly in default blog templates
-blog.name = "Your Blog's Name"
-
-## blog_description -- A short one line description of the blog
-# used in the RSS/Atom feeds.
-blog.description = "Your Blog's short description"
-
-## blog_timezone -- the timezone that you normally write your blog posts from
-blog.timezone = "US/Eastern"
-
-plugins.plugin_test.enabled = True
-
-### Pre/Post build hooks:
-def pre_build():
- #Do whatever you want before the _site is built
- pass
-
-def post_build():
- #Do whatever you want after the _site is built
- pass
View
2 blogofile/site_init/blog_unit_test/_filters/filter_to_override.py
@@ -1,2 +0,0 @@
-def run(content):
- return "This is text from the overriden userspace filter."
View
8 blogofile/site_init/blog_unit_test/_posts/001 - post #1.markdown
@@ -1,8 +0,0 @@
-
----
-categories: Category 1
-date: 2009/07/23 15:22:00
-format: markdown
-title: Post 1
----
-This is post #1
View
8 blogofile/site_init/blog_unit_test/_posts/002 - post #2.markdown
@@ -1,8 +0,0 @@
-
----
-categories: Category 1, Category 2
-date: 2009/07/24 16:20:00
-format: markdown
-title: Post 2
----
-This is post #2
View
28 blogofile/site_init/blog_unit_test/_posts/003 - post #3 - unicode test - 日本語 test.markdown
@@ -1,28 +0,0 @@
----
-categories: Unicode
-date: 2009/08/22 15:22:00
-format: markdown
-title: Unicode Tést 日本語テスト
----
-Anglo-Saxon Rune Poem:
-
-ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ
-ᛋᚳᛖᚪᛚ᛫ᚦᛖᚪᚻ᛫ᛗᚪᚾᚾᚪ᛫ᚷᛖᚻᚹᛦᛚᚳ᛫ᛗᛁᚳᛚᚢᚾ᛫ᚻᛦᛏ᛫ᛞᚫᛚᚪᚾ
-ᚷᛁᚠ᛫ᚻᛖ᛫ᚹᛁᛚᛖ᛫ᚠᚩᚱ᛫ᛞᚱᛁᚻᛏᚾᛖ᛫ᛞᚩᛗᛖᛋ᛫ᚻᛚᛇᛏᚪᚾ᛬
-
-Tamil poetry:
-
-யாமறிந்த மொழிகளிலே தமிழ்மொழி போல் இனிதாவது எங்கும் காணோம்,
-பாமரராய் விலங்குகளாய், உலகனைத்தும் இகழ்ச்சிசொலப் பான்மை கெட்டு,
-நாமமது தமிழரெனக் கொண்டு இங்கு வாழ்ந்திடுதல் நன்றோ? சொல்லீர்!
-தேமதுரத் தமிழோசை உலகமெலாம் பரவும்வகை செய்தல் வேண்டும்.
-
-
-I can eat glass:
-私はガラスを食べられます。それは私を傷つけません。
-Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։
-I kå Glas frässa, ond des macht mr nix!
-᚛᚛ᚉᚑᚅᚔᚉᚉᚔᚋ ᚔᚈᚔ ᚍᚂᚐᚅᚑ ᚅᚔᚋᚌᚓᚅᚐ᚜
-אני יכול לאכול זכוכית וזה לא מזיק לי
-काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥
-
View
9 blogofile/site_init/blog_unit_test/_posts/004 - post #4.markdown
@@ -1,9 +0,0 @@
-
----
-categories: General Stuff
-date: 2009/08/29 15:22:00
-format: markdown
-permalink: http://www.yoursite.com/blog/2009/08/29/post-four
-title: Post 4
----
-This is post #4
View
7 blogofile/site_init/blog_unit_test/_posts/005 - post #5.textile
@@ -1,7 +0,0 @@
----
-categories: General Stuff
-date: 2009/08/29 15:23:00
-permalink: http://www.yoursite.com/blog/2009/08/29/post-five
-title: Post 5
----
-This is post #5
View
7 blogofile/site_init/blog_unit_test/_posts/006 - post #6.rst
@@ -1,7 +0,0 @@
----
-categories: General Stuff
-date: 2009/08/29 15:24:00
-permalink: http://www.yoursite.com/blog/2009/08/29/post-six
-title: Post 6
----
-This is post #6
View
9 blogofile/site_init/blog_unit_test/_posts/007 - post #7.markdown
@@ -1,9 +0,0 @@
-
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-format: markdown
-permalink: http://www.yoursite.com/blog/2009/08/29/post-seven
-title: Post 7
----
-This is post #7
View
3 blogofile/site_init/blog_unit_test/_posts/008 - post with no yaml.markdown
@@ -1,3 +0,0 @@
-This post has no YAML section oh noes!
-
-Yea, this should produce a warning message.
View
8 blogofile/site_init/blog_unit_test/_posts/009 - post with no title.markdown
@@ -1,8 +0,0 @@
-
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-format: markdown
-permalink: http://www.yoursite.com/blog/2009/08/29/post-no-title
----
-This post has no title
View
7 blogofile/site_init/blog_unit_test/_posts/010 - post with no date.markdown
@@ -1,7 +0,0 @@
-
----
-categories: General Stuff
-format: markdown
-title: Post without a date
----
-This post has no date
View
8 blogofile/site_init/blog_unit_test/_posts/011 - post with no permalink.markdown
@@ -1,8 +0,0 @@
-
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-format: markdown
-title: Post without a permalink
----
-This post has no permalink
View
9 blogofile/site_init/blog_unit_test/_posts/013 - post with no filter.markdown
@@ -1,9 +0,0 @@
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-format: markdown
-title: This post has no filter
-permalink: http://www.yoursite.com/blog/2009/08/29/post-without-filters
-filter: None
----
-This post is not run through any filters
View
8 blogofile/site_init/blog_unit_test/_posts/014 - title has question mark.markdown
@@ -1,8 +0,0 @@
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-format: markdown
-title: This title has a question mark?
-filter: None
----
-This post is not run through any filters
View
11 blogofile/site_init/blog_unit_test/_posts/015 - unpublished draft.markdown
@@ -1,11 +0,0 @@
----
-categories: General Stuff, Drafts
-date: 2099/08/01 00:00:01
-title: This post is unpublished
-draft: True
----
-This post should show up as a permapage only. No reference in
-archives, categories, chronlogical listings, or feeds.
-
-For this test to work, this post must be the only post in the year
-2099, and the only post in the category Drafts.
View
5 blogofile/site_init/blog_unit_test/_templates/base.mako
@@ -1,5 +0,0 @@
-<%def name="filter(chain)">
- ${bf.filter.run_chain(chain, capture(caller.body))}
-</%def>
-
-${next.body()}
View
26 blogofile/site_init/blog_unit_test/_templates/footer.mako
@@ -1,26 +0,0 @@
-<p id="credits">
-Powered by <a href="http://www.blogofile.com">Blogofile</a>.<br/>
-<br/>
-RSS feeds for <a href="${bf.util.site_path_helper(bf.config.blog.path,'feed')}">Entries</a>
-% if bf.config.blog.disqus.enabled:
- and <a
-href="http://${bf.config.blog.disqus.name}.disqus.com/latest.rss">Comments</a>.
-% endif
-<br>
-</p>
-% if bf.config.blog.disqus.enabled:
-<script type="text/javascript">
-//<![CDATA[
-(function() {
- var links = document.getElementsByTagName('a');
- var query = '?';
- for(var i = 0; i < links.length; i++) {
- if(links[i].href.indexOf('#disqus_thread') >= 0) {
- query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
- }
- }
- document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/${bf.config.blog.disqus.name}/get_num_replies.js' + query + '"></' + 'script>');
- })();
-//]]>
-</script>
-% endif
View
10 blogofile/site_init/blog_unit_test/_templates/head.mako
@@ -1,10 +0,0 @@
-<title>${bf.config.blog.name}</title>
-<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="${bf.util.site_path_helper(bf.config.blog.path,'/feed')}" />
-<link rel="alternate" type="application/atom+xml" title="Atom 1.0"
-href="${bf.util.site_path_helper(bf.config.blog.path,'/feed/atom')}" />
-<link rel='stylesheet' href='${bf.config.filters.syntax_highlight.css_dir}/pygments_${bf.config.filters.syntax_highlight.style}.css' type='text/css' />
-
-%if post:
-## You can put post meta tags here: date, author, copyright etc.
-<meta http-equiv="date" content="${post.date.isoformat()}" />
-%endif
View
10 blogofile/site_init/blog_unit_test/_templates/header.mako
@@ -1,10 +0,0 @@
-<h1><a href="${bf.util.site_path_helper()}">${bf.config.blog.name}</a></h1>
-<p>This is a simple blog build with Blogofile.</p>
-<p>It's completely unthemed and is written as minimally as possible, while still
-retaining most of the blog features.</p>
-<p>Make sure you read the <a href="http://www.blogofile.com/documentation">online
-documentation</a>.</p>
-<p>If you're looking for a more fleshed-out site try running 'blogofile init
-blogofile.com', but you'll need <a href="http://www.git-scm.org">git</a> installed first.</p>
-<p>This is a header that goes on every page.</p>
-<hr/>
View
33 blogofile/site_init/blog_unit_test/_templates/site.mako
@@ -1,33 +0,0 @@
-<%inherit file="base.mako" />
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- ${self.head()}
- </head>
- <body>
- <div id="content">
- ${self.header()}
- <div id="main_block">
- <div id="prose_block">
- ${next.body()}
- </div><!-- End Prose Block -->
- </div><!-- End Main Block -->
- <div id="footer">
- ${self.footer()}
- </div> <!-- End Footer -->
- </div> <!-- End Content -->
- </body>
-</html>
-<%def name="head()">
- <%include file="head.mako" />
-</%def>
-<%def name="header()">
- <%include file="header.mako" />
-</%def>
-<%def name="footer()">
- <hr/>
- This is a footer that appears on every page.
- <%include file="footer.mako" />
-</%def>
View
32 blogofile/site_init/blog_unit_test/filter_test.html.mako
@@ -1,32 +0,0 @@
-<%inherit file="_templates/site.mako" />
-
-<p>Here are a few filter tests:</p>
-
-<p>Normal filter call: </p>
-<%self:filter chain="markdown">
-
-This is markdown
-----------------
-
- * Item
- * Item
- * Item
-
-[Blogofile](http://www.blogofile.com) is cool.
-
-</%self:filter>
-
-<p>Run a filter from an absolute plugin reference: </p>
-<div id="original_plugin_filter">
-<%self:filter chain="bf.config.plugins.plugin_test.filters.filter_to_override">
-This will be replaced with text from the plugin
-</%self:filter>
-</div>
-
-<div id="overriden_plugin_filter">
-<p>Run a filter from an overridden filter: </p>
-<%self:filter chain="filter_to_override">
-This will be replaced with text from the userspace filter
-</%self:filter>
-</div>
-
View
13 blogofile/site_init/blog_unit_test/index.html.mako
@@ -1,13 +0,0 @@
-<%inherit file="_templates/site.mako" />
-<p>
- This is the index page.
-</p>
-
-Here's the main <a href="${bf.util.site_path_helper(bf.config.blog.path)}">chronological blog page</a><br/><br/>
-
-Here's the last 5 posts:
-<ul>
-% for post in bf.config.blog.iter_posts_published(5):
- <li><a href="${post.path}">${post.title}</a></li>
-% endfor
-</ul>
View
1 blogofile/site_init/blog_unit_test/jinja2_test.html.jinja2
@@ -1 +0,0 @@
-test
View
14 blogofile/site_init/blog_unit_test/markdown_test.html.markdown
@@ -1,14 +0,0 @@
-This is a standalone markdown template. Its contents will get rendered
-and inherit the site base template configured in
-bf.config.site.base_template
-
-This is a list:
-
-1. One
-1. Two
- * Two a
- * Two b
- * Two c
-1. Three
-
-[This is a link](http://www.blogofile.com)
View
20 blogofile/site_init/blogofile_com.py
@@ -1,20 +0,0 @@
-import subprocess
-
-
-def do_init(args=None): #pragma: no cover
- "Download the blogofile.com sources from github. Requires git."
-
- try:
- p = subprocess.Popen("git init", shell=True)
- p.wait()
- except OSError:
- print("Cannot find git executable on the system PATH")
- return
-
- p=subprocess.Popen(
- "git remote add origin "
- "git://github.com/EnigmaCurry/blogofile.com.git", shell=True)
- p.wait()
- p = subprocess.Popen("git pull origin master", shell=True)
- p.wait()
-
View
60 blogofile/site_init/jinja2_test/_config.py
@@ -1,60 +0,0 @@
-######################################################################
-# This is your site's Blogofile configuration file.
-# www.Blogofile.com
-#
-# This file doesn't list every possible setting, it relies on defaults
-# set in the core blogofile _config.py. To see where the default
-# configuration is on your system run 'blogofile info'
-#
-######################################################################
-
-######################################################################
-# Basic Settings
-# (almost all sites will want to configure these settings)
-######################################################################
-## site_url -- Your site's full URL
-# Your "site" is the same thing as your _site directory.
-# If you're hosting a blogofile powered site as a subdirectory of a larger
-# non-blogofile site, then you would set the site_url to the full URL
-# including that subdirectory: "http://www.yoursite.com/path/to/blogofile-dir"
-site.url = "http://www.yoursite.com"
-
-## This is a jinja2 based site, so we need to set the base template
-## accordingly:
-site.base_template = "site.jinja2"
-
-#### Blog Settings ####
-blog = plugins.blog
-
-## blog_enabled -- Should the blog be enabled?
-# (You don't _have_ to use blogofile to build blogs)
-blog.enabled = True
-
-## blog_path -- Blog path.
-# This is the path of the blog relative to the site_url.
-# If your site_url is "http://www.yoursite.com/~ryan"
-# and you set blog_path to "/blog" your full blog URL would be
-# "http://www.yoursite.com/~ryan/blog"
-# Leave blank "" to set to the root of site_url
-blog.path = "/blog"
-
-## blog_name -- Your Blog's name.
-# This is used repeatedly in default blog templates
-blog.name = "Your Blog's Name"
-
-## blog_description -- A short one line description of the blog
-# used in the RSS/Atom feeds.
-blog.description = "Your Blog's short description"
-
-## blog_timezone -- the timezone that you normally write your blog posts from
-blog.timezone = "US/Eastern"
-
-## Markdown extensions
-## These are turned off by default, but turned on
-## to show examples in /blog/2009/07/24/post-2/
-filters.markdown.extensions.def_list.enabled = True
-filters.markdown.extensions.abbr.enabled = True
-filters.markdown.extensions.footnotes.enabled = True
-filters.markdown.extensions.fenced_code.enabled = True
-filters.markdown.extensions.headerid.enabled = True
-filters.markdown.extensions.tables.enabled = True
View
6 blogofile/site_init/jinja2_test/_posts/001 - post 1.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:00
-title: Post 1
----
-This is post #1
View
6 blogofile/site_init/jinja2_test/_posts/002 - post 2.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:01
-title: Post 2
----
-This is post #2
View
6 blogofile/site_init/jinja2_test/_posts/003 - post 3.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:03
-title: Post 3
----
-This is post #3
View
6 blogofile/site_init/jinja2_test/_posts/004 - post 4.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:04
-title: Post 4
----
-This is post #4
View
28 blogofile/site_init/jinja2_test/_posts/006 - Unicode Test.markdown
@@ -1,28 +0,0 @@
----
-categories: Unicode
-date: 2009/08/22 15:22:00
-format: markdown
-title: Unicode Test - How about some 日本語テスト
----
-Anglo-Saxon Rune Poem:
-
-ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ
-ᛋᚳᛖᚪᛚ᛫ᚦᛖᚪᚻ᛫ᛗᚪᚾᚾᚪ᛫ᚷᛖᚻᚹᛦᛚᚳ᛫ᛗᛁᚳᛚᚢᚾ᛫ᚻᛦᛏ᛫ᛞᚫᛚᚪᚾ
-ᚷᛁᚠ᛫ᚻᛖ᛫ᚹᛁᛚᛖ᛫ᚠᚩᚱ᛫ᛞᚱᛁᚻᛏᚾᛖ᛫ᛞᚩᛗᛖᛋ᛫ᚻᛚᛇᛏᚪᚾ᛬
-
-Tamil poetry:
-
-யாமறிந்த மொழிகளிலே தமிழ்மொழி போல் இனிதாவது எங்கும் காணோம்,
-பாமரராய் விலங்குகளாய், உலகனைத்தும் இகழ்ச்சிசொலப் பான்மை கெட்டு,
-நாமமது தமிழரெனக் கொண்டு இங்கு வாழ்ந்திடுதல் நன்றோ? சொல்லீர்!
-தேமதுரத் தமிழோசை உலகமெலாம் பரவும்வகை செய்தல் வேண்டும்.
-
-
-I can eat glass:
-私はガラスを食べられます。それは私を傷つけません。
-Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։
-I kå Glas frässa, ond des macht mr nix!
-᚛᚛ᚉᚑᚅᚔᚉᚉᚔᚋ ᚔᚈᚔ ᚍᚂᚐᚅᚑ ᚅᚔᚋᚌᚓᚅᚐ᚜
-אני יכול לאכול זכוכית וזה לא מזיק לי
-काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥
-
View
47 blogofile/site_init/jinja2_test/_posts/007 - markdown features.markdown
@@ -1,47 +0,0 @@
----
-categories: Category 1, Category 2
-date: 2009/07/24 16:20:00
-title: Markdown features
----
-This is post #2.
-
-This post just shows off some [markdown][] features. Markdown is a simple HTML markup language in plain text, so it's easier to read and write.
-
-# This is a heading
-
-This is a reference[^1] to a footnote.
-
-## This is a sub-heading {#a_custom_id}
-
-This section has a custom id on it's ``<h2>`` tag.
-
-## This is a table
-
-First Header | Second Header
-------------- | -------------
-Content Cell | Content Cell
-Content Cell | Content Cell
-
-## Here are some definitions
-
-Apple
-: Pomaceous fruit of plants of the genus Malus in
- the family Rosaceae.
-
-Orange
-: The fruit of an evergreen tree of the genus Citrus.
-
-## Some code
-
-This is using the [Fenced Code](http://www.freewisdom.org/projects/python-markdown/Fenced_Code_Blocks) extension to markdown, but Blogofile has [it's own code filter](/blog/2009/08/29/syntax-highlight-test/) that does syntax highlighting too.
-
-~~~~{.python}
-import this
-print("2 + 2 = {0}".format(2+2))
-~~~~
-
-[markdown]: http://www.freewisdom.org/projects/python-markdown/ "Markdown in Python"
-
-[^1]: This is a footnote.
-
-*[HTML]: Hyper Text Markup Language (this is just an abbreviation test)
View
27 blogofile/site_init/jinja2_test/_posts/008 - syntax highlight.markdown
@@ -1,27 +0,0 @@
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-title: Syntax highlight test
----
-This post contains some highlighted python code:
-
-$$code(lang=python)$
-import webbrowser
-import hashlib
-
-webbrowser.open("http://xkcd.com/353/")
-
-def geohash(latitude, longitude, datedow):
- """Compute geohash() using the Munroe algorithm.
-
- >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68')
- 37.857713 -122.544543 """
-
- # http://xkcd.com/426/
- h = hashlib.md5(datedow).hexdigest()
- p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
- print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
-$$/code
-
-This is accomplished with the built-in [syntax highlighter filter](https://github.com/EnigmaCurry/blogofile/blob/master/blogofile/site_init/blog_features/_filters/syntax_highlight.py)
-
View
19 blogofile/site_init/jinja2_test/_posts/009 - unpublished draft.markdown
@@ -1,19 +0,0 @@
----
-categories: General Stuff
-date: 2011/02/27 15:25:00
-title: Unpublished Draft
-draft: True
----
-This post is an unpublished draft. It has a permalink page, but does
-not show up in any of the categories, archives, chronological listings
-or feeds.
-
-In other words, without giving out the permalink, no one should ever see this page.
-
-This is useful for seeing your page rendered without showing it to the
-rest of the world. Another alternative pattern for this is using "blogofile
-serve" on a local copy of your blog and then pushing changes to the
-server when ready to publish.
-
-Setting "draft: False" in the post YAML (or removing the line entirely)
-will publish this post.
View
25 blogofile/site_init/jinja2_test/_templates/footer.jinja2
@@ -1,25 +0,0 @@
-<p id="credits">
-Powered by <a href="http://www.blogofile.com">Blogofile</a>.<br/>
-<br/>
-RSS feeds for <a href="{{bf.util.site_path_helper(bf.config.blog.path,'feed')}}">Entries</a>
-{% if bf.config.blog.disqus.enabled %}
- and <a href="http://${bf.config.blog.disqus.name}.disqus.com/latest.rss">Comments</a>.
-{% endif %}
-<br>
-</p>
-{% if bf.config.blog.disqus.enabled %}
-<script type="text/javascript">
-//<![CDATA[
-(function() {
- var links = document.getElementsByTagName('a');
- var query = '?';
- for(var i = 0; i < links.length; i++) {
- if(links[i].href.indexOf('#disqus_thread') >= 0) {
- query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
- }
- }
- document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/${bf.config.blog.disqus.name}/get_num_replies.js' + query + '"></' + 'script>');
- })();
-//]]>
-</script>
-{% endif %}
View
10 blogofile/site_init/jinja2_test/_templates/head.jinja2
@@ -1,10 +0,0 @@
-<title>{{ bf.config.blog.name }}</title>
-<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="{{ bf.util.site_path_helper(bf.config.blog.path,'/feed') }}" />
-<link rel="alternate" type="application/atom+xml" title="Atom 1.0"
-href="{{ bf.util.site_path_helper(bf.config.blog.path,'/feed/atom') }}" />
-<link rel='stylesheet' href='{{bf.config.filters.syntax_highlight.css_dir}}/pygments_{{bf.config.filters.syntax_highlight.style}}.css' type='text/css' />
-
-{% if post %}
-## You can put post meta tags here: date, author, copyright etc.
-<meta http-equiv="date" content="{{post.date.isoformat()}}" />
-{% endif %}
View
10 blogofile/site_init/jinja2_test/_templates/header.jinja2
@@ -1,10 +0,0 @@
-<h1><a href="{{bf.util.site_path_helper()}}">{{bf.config.blog.name}}</a></h1>
-<p>This is a simple blog built with Blogofile.</p>
-<p>It's completely unthemed and is written as minimally as possible, while still
-retaining most of the blog features.</p>
-<p>Make sure you read the <a href="http://www.blogofile.com/documentation">online
-documentation</a>.</p>
-<p>If you're looking for a more fleshed-out site try running 'blogofile init
-blogofile.com', but you'll need <a href="http://www.git-scm.org">git</a> installed first.</p>
-<p>This is a header that goes on every page.</p>
-<hr/>
View
30 blogofile/site_init/jinja2_test/_templates/site.jinja2
@@ -1,30 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- {% block head %}
- {% include 'head.jinja2' %}
- {% endblock %}
- </head>
- <body>
- <div id="content">
- {% block header %}
- {% include 'header.jinja2' %}
- {% endblock %}
- <div id="main_block">
- <div id="prose_block">
- {% block content %}
- {% endblock %}
- </div><!-- End Prose Block -->
- </div><!-- End Main Block -->
- <div id="footer">
- {% block footer %}
- <hr/>
- This is a footer that appears on every page.
- {% include 'footer.jinja2' %}
- {% endblock %}
- </div> <!-- End Footer -->
- </div> <!-- End Content -->
- </body>
-</html>
View
13 blogofile/site_init/jinja2_test/index.html.jinja2
@@ -1,13 +0,0 @@
-{% extends "site.jinja2" %}
-{% block content %}
-<p>
- This is the index page.
-</p>
-
-Here's the main <a href="{{bf.util.site_path_helper(bf.config.blog.path)}}">chronological blog page</a><br/><br/>
-
-Here's the last 5 posts:
-<ul>
- <li>FIX ME</li>
-</ul>
-{% endblock %}
View
56 blogofile/site_init/simple_blog/_config.py
@@ -1,56 +0,0 @@
-######################################################################
-# This is your site's Blogofile configuration file.
-# www.Blogofile.com
-#
-# This file doesn't list every possible setting, it relies on defaults
-# set in the core blogofile _config.py. To see where the default
-# configuration is on your system run 'blogofile info'
-#
-######################################################################
-
-######################################################################
-# Basic Settings
-# (almost all sites will want to configure these settings)
-######################################################################
-## site_url -- Your site's full URL
-# Your "site" is the same thing as your _site directory.
-# If you're hosting a blogofile powered site as a subdirectory of a larger
-# non-blogofile site, then you would set the site_url to the full URL
-# including that subdirectory: "http://www.yoursite.com/path/to/blogofile-dir"
-site.url = "http://www.yoursite.com"
-
-#### Blog Settings ####
-blog = plugins.blog
-
-## blog_enabled -- Should the blog be enabled?
-# (You don't _have_ to use blogofile to build blogs)
-blog.enabled = True
-
-## blog_path -- Blog path.
-# This is the path of the blog relative to the site_url.
-# If your site_url is "http://www.yoursite.com/~ryan"
-# and you set blog_path to "/blog" your full blog URL would be
-# "http://www.yoursite.com/~ryan/blog"
-# Leave blank "" to set to the root of site_url
-blog.path = "/blog"
-
-## blog_name -- Your Blog's name.
-# This is used repeatedly in default blog templates
-blog.name = "Your Blog's Name"
-
-## blog_description -- A short one line description of the blog
-# used in the RSS/Atom feeds.
-blog.description = "Your Blog's short description"
-
-## blog_timezone -- the timezone that you normally write your blog posts from
-blog.timezone = "US/Eastern"
-
-## Markdown extensions
-## These are turned off by default, but turned on
-## to show examples in /blog/2009/07/24/post-2/
-filters.markdown.extensions.def_list.enabled = True
-filters.markdown.extensions.abbr.enabled = True
-filters.markdown.extensions.footnotes.enabled = True
-filters.markdown.extensions.fenced_code.enabled = True
-filters.markdown.extensions.headerid.enabled = True
-filters.markdown.extensions.tables.enabled = True
View
6 blogofile/site_init/simple_blog/_posts/001 - post 1.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:00
-title: Post 1
----
-This is post #1
View
6 blogofile/site_init/simple_blog/_posts/002 - post 2.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:01
-title: Post 2
----
-This is post #2
View
6 blogofile/site_init/simple_blog/_posts/003 - post 3.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:03
-title: Post 3
----
-This is post #3
View
6 blogofile/site_init/simple_blog/_posts/004 - post 4.markdown
@@ -1,6 +0,0 @@
----
-categories: Category 1
-date: 2009/07/23 15:22:04
-title: Post 4
----
-This is post #4
View
28 blogofile/site_init/simple_blog/_posts/006 - Unicode Test.markdown
@@ -1,28 +0,0 @@
----
-categories: Unicode
-date: 2009/08/22 15:22:00
-format: markdown
-title: Unicode Test - How about some 日本語テスト
----
-Anglo-Saxon Rune Poem:
-
-ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ
-ᛋᚳᛖᚪᛚ᛫ᚦᛖᚪᚻ᛫ᛗᚪᚾᚾᚪ᛫ᚷᛖᚻᚹᛦᛚᚳ᛫ᛗᛁᚳᛚᚢᚾ᛫ᚻᛦᛏ᛫ᛞᚫᛚᚪᚾ
-ᚷᛁᚠ᛫ᚻᛖ᛫ᚹᛁᛚᛖ᛫ᚠᚩᚱ᛫ᛞᚱᛁᚻᛏᚾᛖ᛫ᛞᚩᛗᛖᛋ᛫ᚻᛚᛇᛏᚪᚾ᛬
-
-Tamil poetry:
-
-யாமறிந்த மொழிகளிலே தமிழ்மொழி போல் இனிதாவது எங்கும் காணோம்,
-பாமரராய் விலங்குகளாய், உலகனைத்தும் இகழ்ச்சிசொலப் பான்மை கெட்டு,
-நாமமது தமிழரெனக் கொண்டு இங்கு வாழ்ந்திடுதல் நன்றோ? சொல்லீர்!
-தேமதுரத் தமிழோசை உலகமெலாம் பரவும்வகை செய்தல் வேண்டும்.
-
-
-I can eat glass:
-私はガラスを食べられます。それは私を傷つけません。
-Կրնամ ապակի ուտել և ինծի անհանգիստ չըներ։
-I kå Glas frässa, ond des macht mr nix!
-᚛᚛ᚉᚑᚅᚔᚉᚉᚔᚋ ᚔᚈᚔ ᚍᚂᚐᚅᚑ ᚅᚔᚋᚌᚓᚅᚐ᚜
-אני יכול לאכול זכוכית וזה לא מזיק לי
-काचं शक्नोम्यत्तुम् । नोपहिनस्ति माम् ॥
-
View
47 blogofile/site_init/simple_blog/_posts/007 - markdown features.markdown
@@ -1,47 +0,0 @@
----
-categories: Category 1, Category 2
-date: 2009/07/24 16:20:00
-title: Markdown features
----
-This is post #2.
-
-This post just shows off some [markdown][] features. Markdown is a simple HTML markup language in plain text, so it's easier to read and write.
-
-# This is a heading
-
-This is a reference[^1] to a footnote.
-
-## This is a sub-heading {#a_custom_id}
-
-This section has a custom id on it's ``<h2>`` tag.
-
-## This is a table
-
-First Header | Second Header
-------------- | -------------
-Content Cell | Content Cell
-Content Cell | Content Cell
-
-## Here are some definitions
-
-Apple
-: Pomaceous fruit of plants of the genus Malus in
- the family Rosaceae.
-
-Orange
-: The fruit of an evergreen tree of the genus Citrus.
-
-## Some code
-
-This is using the [Fenced Code](http://www.freewisdom.org/projects/python-markdown/Fenced_Code_Blocks) extension to markdown, but Blogofile has [it's own code filter](/blog/2009/08/29/syntax-highlight-test/) that does syntax highlighting too.
-
-~~~~{.python}
-import this
-print("2 + 2 = {0}".format(2+2))
-~~~~
-
-[markdown]: http://www.freewisdom.org/projects/python-markdown/ "Markdown in Python"
-
-[^1]: This is a footnote.
-
-*[HTML]: Hyper Text Markup Language (this is just an abbreviation test)
View
27 blogofile/site_init/simple_blog/_posts/008 - syntax highlight.markdown
@@ -1,27 +0,0 @@
----
-categories: General Stuff
-date: 2009/08/29 15:25:00
-title: Syntax highlight test
----
-This post contains some highlighted python code:
-
-$$code(lang=python)$
-import webbrowser
-import hashlib
-
-webbrowser.open("http://xkcd.com/353/")
-
-def geohash(latitude, longitude, datedow):
- """Compute geohash() using the Munroe algorithm.
-
- >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68')
- 37.857713 -122.544543 """
-
- # http://xkcd.com/426/
- h = hashlib.md5(datedow).hexdigest()
- p, q = [('%f' % float.fromhex('0.' + x)) for x in (h[:16], h[16:32])]
- print('%d%s %d%s' % (latitude, p[1:], longitude, q[1:]))
-$$/code
-
-This is accomplished with the built-in [syntax highlighter filter](https://github.com/EnigmaCurry/blogofile/blob/master/blogofile/site_init/blog_features/_filters/syntax_highlight.py)
-
View
19 blogofile/site_init/simple_blog/_posts/009 - unpublished draft.markdown
@@ -1,19 +0,0 @@
----
-categories: General Stuff
-date: 2011/02/27 15:25:00
-title: Unpublished Draft
-draft: True
----
-This post is an unpublished draft. It has a permalink page, but does
-not show up in any of the categories, archives, chronological listings
-or feeds.
-
-In other words, without giving out the permalink, no one should ever see this page.
-
-This is useful for seeing your page rendered without showing it to the
-rest of the world. Another alternative pattern for this is using "blogofile
-serve" on a local copy of your blog and then pushing changes to the
-server when ready to publish.
-
-Setting "draft: False" in the post YAML (or removing the line entirely)
-will publish this post.
View
5 blogofile/site_init/simple_blog/_templates/base.mako
@@ -1,5 +0,0 @@
-<%def name="filter(chain)">
- ${bf.filter.run_chain(chain, capture(caller.body))}
-</%def>
-
-${next.body()}
View
26 blogofile/site_init/simple_blog/_templates/footer.mako
@@ -1,26 +0,0 @@
-<p id="credits">
-Powered by <a href="http://www.blogofile.com">Blogofile</a>.<br/>
-<br/>
-RSS feeds for <a href="${bf.util.site_path_helper(bf.config.blog.path,'feed')}">Entries</a>
-% if bf.config.blog.disqus.enabled:
- and <a
-href="http://${bf.config.blog.disqus.name}.disqus.com/latest.rss">Comments</a>.
-% endif
-<br>
-</p>
-% if bf.config.blog.disqus.enabled:
-<script type="text/javascript">
-//<![CDATA[
-(function() {
- var links = document.getElementsByTagName('a');
- var query = '?';
- for(var i = 0; i < links.length; i++) {
- if(links[i].href.indexOf('#disqus_thread') >= 0) {
- query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&';
- }
- }
- document.write('<script charset="utf-8" type="text/javascript" src="http://disqus.com/forums/${bf.config.blog.disqus.name}/get_num_replies.js' + query + '"></' + 'script>');
- })();
-//]]>
-</script>
-% endif
View
10 blogofile/site_init/simple_blog/_templates/head.mako
@@ -1,10 +0,0 @@
-<title>${bf.config.blog.name}</title>
-<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="${bf.util.site_path_helper(bf.config.blog.path,'/feed')}" />
-<link rel="alternate" type="application/atom+xml" title="Atom 1.0"
-href="${bf.util.site_path_helper(bf.config.blog.path,'/feed/atom')}" />
-<link rel='stylesheet' href='${bf.config.filters.syntax_highlight.css_dir}/pygments_${bf.config.filters.syntax_highlight.style}.css' type='text/css' />
-
-%if post:
-## You can put post meta tags here: date, author, copyright etc.
-<meta http-equiv="date" content="${post.date.isoformat()}" />
-%endif
View
8 blogofile/site_init/simple_blog/_templates/header.mako
@@ -1,8 +0,0 @@
-<h1><a href="${bf.util.site_path_helper()}">${bf.config.blog.name}</a></h1>
-<p>This is a simple blog built with Blogofile.</p>
-<p>It's completely unthemed and is written as minimally as possible, while still
-retaining most of the blog features.</p>
-<p>Make sure you read the <a href="http://www.blogofile.com/documentation">online
-documentation</a>.</p>
-<p>This is a header that goes on every page.</p>
-<hr/>
View
33 blogofile/site_init/simple_blog/_templates/site.mako
@@ -1,33 +0,0 @@
-<%inherit file="base.mako" />
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
- ${self.head()}
- </head>
- <body>
- <div id="content">
- ${self.header()}
- <div id="main_block">
- <div id="prose_block">
- ${next.body()}
- </div><!-- End Prose Block -->
- </div><!-- End Main Block -->
- <div id="footer">
- ${self.footer()}
- </div> <!-- End Footer -->
- </div> <!-- End Content -->
- </body>
-</html>
-<%def name="head()">
- <%include file="head.mako" />
-</%def>
-<%def name="header()">
- <%include file="header.mako" />
-</%def>
-<%def name="footer()">
- <hr/>
- This is a footer that appears on every page.
- <%include file="footer.mako" />
-</%def>
View
13 blogofile/site_init/simple_blog/index.html.mako
@@ -1,13 +0,0 @@
-<%inherit file="_templates/site.mako" />
-<p>
- This is the index page.
-</p>
-
-Here's the main <a href="${bf.util.site_path_helper(bf.config.blog.path)}">chronological blog page</a><br/><br/>
-
-Here's the last 5 posts:
-<ul>
-% for post in bf.config.blog.iter_posts_published(5):
- <li><a href="${post.path}">${post.title}</a></li>
-% endfor
-</ul>
View
32 blogofile/site_init/simple_blog_html5/404.html
@@ -1,32 +0,0 @@
-<!doctype html>
-<title>Page Not Found</title>
-<style>
- body { text-align: center;}
- h1 { font-size: 50px; text-align: center }
- span[frown] { transform: rotate(90deg); display:inline-block; color: #bbb; }
- body { font: 20px Constantia, 'Hoefler Text', "Adobe Caslon Pro", Baskerville, Georgia, Times, serif; color: #999; text-shadow: 2px 2px 2px rgba(200, 200, 200, 0.5); }
- ::-moz-selection{ background:#FF5E99; color:#fff; }
- ::selection { background:#FF5E99; color:#fff; }
- article {display:block; text-align: left; width: 500px; margin: 0 auto; }
-
- a { color: rgb(36, 109, 56); text-decoration:none; }
- a:hover { color: rgb(96, 73, 141) ; text-shadow: 2px 2px 2px rgba(36, 109, 56, 0.5); }
-</style>
-
-<article>
- <h1>Not found <span frown>:(</span></h1>
- <div>
- <p>Sorry, but the page you were trying to view does not exist.</p>
- <p>It looks like this was the result of either:</p>
- <ul>
- <li>a mistyped address</li>
- <li>an out-of-date link</li>
- </ul>
- </div>
-
- <script>
- var GOOG_FIXURL_LANG = (navigator.language || '').slice(0,2),
- GOOG_FIXURL_SITE = location.host;
- </script>
- <script src="http://linkhelp.clients.google.com/tbproxy/lh/wm/fixurl.js"></script>
-</article>
View
71 blogofile/site_init/simple_blog_html5/_config.py
@@ -1,71 +0,0 @@
-# -*- coding: utf-8 -*-
-
-######################################################################
-# This is your site's Blogofile configuration file.
-# www.Blogofile.com
-#
-# This file doesn't list every possible setting, it relies on defaults
-# set in the core blogofile _config.py. To see where the default
-# configuration is on your system run 'blogofile info'
-#
-######################################################################
-
-######################################################################
-# Basic Settings
-# (almost all sites will want to configure these settings)
-######################################################################
-## site_url -- Your site's full URL
-# Your "site" is the same thing as your _site directory.
-# If you're hosting a blogofile powered site as a subdirectory of a larger
-# non-blogofile site, then you would set the site_url to the full URL
-# including that subdirectory: "http://www.yoursite.com/path/to/blogofile-dir"
-site.url = "http://www.example.com"
-
-## site.author -- Your name, the author of the website.
-# This is optional. If set to anything other than None, the
-# simple_blog template creates a meta tag for the site author.
-site.author = "Your Name"
-
-#### Blog Settings ####
-blog = plugins.blog
-
-## blog_enabled -- Should the blog be enabled?
-# (You don't _have_ to use blogofile to build blogs)
-blog.enabled = True
-
-## blog_path -- Blog path.
-# This is the path of the blog relative to the site_url.
-# If your site_url is "http://www.yoursite.com/~ryan"
-# and you set blog_path to "/blog" your full blog URL would be
-# "http://www.yoursite.com/~ryan/blog"
-# Leave blank "" to set to the root of site_url
-blog.path = "/blog"
-
-## blog_name -- Your Blog's name.
-# This is used repeatedly in default blog templates
-blog.name = "My Blogofile Example"
-
-## HTML5 example customizes the blog templates.
-## Delete this setting to use the default ones instead.
-blog.template_path = "_templates/blog"
-
-## blog_description -- A short one line description of the blog
-# used in the RSS/Atom feeds.
-blog.description = "Just a simple HTML5 blog"
-
-## blog_timezone -- the timezone that you normally write your blog posts from
-blog.timezone = "US/Eastern"
-
-## blog_googleanaltics_id -- enable Google Analytics tracking
-## TODO: move to plugin/filter?
-blog.googleanlytics_id = "UA-XXXXX-X"
-
-## Markdown extensions
-## These are turned off by default, but turned on
-## to show examples in /blog/2009/07/24/post-2/
-filters.markdown.extensions.def_list.enabled = True
-filters.markdown.extensions.abbr.enabled = True
-filters.markdown.extensions.footnotes.enabled = True
-filters.markdown.extensions.fenced_code.enabled = True
-filters.markdown.extensions.headerid.enabled = True
-filters.markdown.extensions.tables.enabled = True
View
485 blogofile/site_init/simple_blog_html5/_htaccess
@@ -1,485 +0,0 @@
-# Note for Blogofile users: This file is by default named _htaccess
-# which effectively disables it. There are some good settings for
-# Apache users, but you have to understand what it all does before
-# just enabling it, especially the expire headers which increase
-# performance, but have consequences for when your site changes. Read
-# the docs here:
-# http://html5boilerplate.com/docs/#Version-Control-with-Cachebusting
-# If you're hosting on Apache, and you've decided you want to enable
-# this stuff, just rename this file to .htaccess
-
-# Apache configuration file
-# httpd.apache.org/docs/2.2/mod/quickreference.html
-
-# Note .htaccess files are an overhead, this logic should be in your Apache config if possible
-# httpd.apache.org/docs/2.2/howto/htaccess.html
-
-# Techniques in here adapted from all over, including:
-# Kroc Camen: camendesign.com/.htaccess
-# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
-# Sample .htaccess file of CMS MODx: modxcms.com
-
-
-###
-### If you run a webserver other than apache, consider:
-### github.com/paulirish/html5-boilerplate-server-configs
-###
-
-
-
-# ----------------------------------------------------------------------
-# Better website experience for IE users
-# ----------------------------------------------------------------------
-
-# Force the latest IE version, in various cases when it may fall back to IE7 mode
-# github.com/rails/rails/commit/123eb25#commitcomment-118920
-# Use ChromeFrame if it's installed for a better experience for the poor IE folk
-
-<IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- BrowserMatch MSIE ie
- Header set X-UA-Compatible "IE=Edge,chrome=1" env=ie
- </IfModule>
-</IfModule>
-
-<IfModule mod_headers.c>
-# Because X-UA-Compatible isn't sent to non-IE (to save header bytes),
-# We need to inform proxies that content changes based on UA
- Header append Vary User-Agent
-# Cache control is set only if mod_headers is enabled, so that's unncessary to declare
-</IfModule>
-
-
-# ----------------------------------------------------------------------
-# Cross-domain AJAX requests
-# ----------------------------------------------------------------------
-
-# Serve cross-domain ajax requests, disabled.
-# enable-cors.org
-# code.google.com/p/html5security/wiki/CrossOriginRequestSecurity
-
-# <IfModule mod_headers.c>
-# Header set Access-Control-Allow-Origin "*"
-# </IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# Webfont access
-# ----------------------------------------------------------------------
-
-# allow access from all domains for webfonts
-# alternatively you could only whitelist
-# your subdomains like "sub.domain.com"
-
-<FilesMatch "\.(ttf|otf|eot|woff|font.css)$">
- <IfModule mod_headers.c>
- Header set Access-Control-Allow-Origin "*"
- </IfModule>
-</FilesMatch>
-
-
-
-# ----------------------------------------------------------------------
-# Proper MIME type for all files
-# ----------------------------------------------------------------------
-
-# audio
-AddType audio/ogg oga ogg
-
-# video
-AddType video/ogg ogv
-AddType video/mp4 mp4
-AddType video/webm webm
-
-# Proper svg serving. Required for svg webfonts on iPad
-# twitter.com/FontSquirrel/status/14855840545
-AddType image/svg+xml svg svgz
-AddEncoding gzip svgz
-
-# webfonts
-AddType application/vnd.ms-fontobject eot
-AddType font/truetype ttf
-AddType font/opentype otf
-AddType application/x-font-woff woff
-
-# assorted types
-AddType image/x-icon ico
-AddType image/webp webp
-AddType text/cache-manifest appcache manifest
-AddType text/x-component htc
-AddType application/x-chrome-extension crx
-AddType application/x-xpinstall xpi
-AddType application/octet-stream safariextz
-
-
-
-# ----------------------------------------------------------------------
-# Allow concatenation from within specific js and css files
-# ----------------------------------------------------------------------
-
-# e.g. Inside of script.combined.js you could have
-# <!--#include file="libs/jquery-1.5.0.min.js" -->
-# <!--#include file="plugins/jquery.idletimer.js" -->
-# and they would be included into this single file
-
-# this is not in use in the boilerplate as it stands. you may
-# choose to name your files in this way for this advantage
-# or concatenate and minify them manually.
-# Disabled by default.
-
-# <FilesMatch "\.combined\.(js|css)$">
-# Options +Includes
-# SetOutputFilter INCLUDES
-# </FilesMatch>
-
-
-
-# ----------------------------------------------------------------------
-# gzip compression
-# ----------------------------------------------------------------------
-
-<IfModule mod_deflate.c>
-
-
-# force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
-<IfModule mod_setenvif.c>
- <IfModule mod_headers.c>
- SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s,?\s(gzip|deflate)?|X{4,13}|~{4,13}|-{4,13})$ HAVE_Accept-Encoding
- RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
- </IfModule>
-</IfModule>
-# html, txt, css, js, json, xml, htc:
-<IfModule filter_module>
- FilterDeclare COMPRESS
- FilterProvider COMPRESS DEFLATE resp=Content-Type /text/(html|css|javascript|plain|x(ml|-component))/
- FilterProvider COMPRESS DEFLATE resp=Content-Type /application/(javascript|json|xml|x-javascript)/
- FilterChain COMPRESS
- FilterProtocol COMPRESS change=yes;byteranges=no
-</IfModule>
-
-<IfModule !mod_filter.c>
- # Legacy versions of Apache
- AddOutputFilterByType DEFLATE text/html text/plain text/css application/json
- AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript
- AddOutputFilterByType DEFLATE text/xml application/xml text/x-component
-</IfModule>
-
-# webfonts and svg:
- <FilesMatch "\.(ttf|otf|eot|svg)$" >
- SetOutputFilter DEFLATE
- </FilesMatch>
-</IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# Expires headers (for better cache control)
-# ----------------------------------------------------------------------
-
-# these are pretty far-future expires headers
-# they assume you control versioning with cachebusting query params like
-# <script src="application.js?20100608">
-# additionally, consider that outdated proxies may miscache
-# www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/
-
-# if you don't use filenames to version, lower the css and js to something like
-# "access plus 1 week" or so
-
-<IfModule mod_expires.c>
- ExpiresActive on
-
-# Perhaps better to whitelist expires rules? Perhaps.
- ExpiresDefault "access plus 1 month"
-
-# cache.appcache needs re-requests in FF 3.6 (thx Remy ~Introducing HTML5)
- ExpiresByType text/cache-manifest "access plus 0 seconds"
-
-# your document html
- ExpiresByType text/html "access plus 0 seconds"
-
-# data
- ExpiresByType text/xml "access plus 0 seconds"
- ExpiresByType application/xml "access plus 0 seconds"
- ExpiresByType application/json "access plus 0 seconds"
-
-# rss feed
- ExpiresByType application/rss+xml "access plus 1 hour"
-
-# favicon (cannot be renamed)
- ExpiresByType image/x-icon "access plus 1 week"
-
-# media: images, video, audio
- ExpiresByType image/gif "access plus 1 month"
- ExpiresByType image/png "access plus 1 month"
- ExpiresByType image/jpg "access plus 1 month"
- ExpiresByType image/jpeg "access plus 1 month"
- ExpiresByType video/ogg "access plus 1 month"
- ExpiresByType audio/ogg "access plus 1 month"
- ExpiresByType video/mp4 "access plus 1 month"
- ExpiresByType video/webm "access plus 1 month"
-
-# htc files (css3pie)
- ExpiresByType text/x-component "access plus 1 month"
-
-# webfonts
- ExpiresByType font/truetype "access plus 1 month"
- ExpiresByType font/opentype "access plus 1 month"
- ExpiresByType application/x-font-woff "access plus 1 month"
- ExpiresByType image/svg+xml "access plus 1 month"
- ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
-
-# css and javascript
- ExpiresByType text/css "access plus 2 months"
- ExpiresByType application/javascript "access plus 2 months"
- ExpiresByType text/javascript "access plus 2 months"
-
- <IfModule mod_headers.c>
- Header append Cache-Control "public"
- </IfModule>
-
-</IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# ETag removal
-# ----------------------------------------------------------------------
-
-# Since we're sending far-future expires, we don't need ETags for
-# static content.
-# developer.yahoo.com/performance/rules.html#etags
-FileETag None
-
-
-
-# ----------------------------------------------------------------------
-# Stop screen flicker in IE on CSS rollovers
-# ----------------------------------------------------------------------
-
-# The following directives stop screen flicker in IE on CSS rollovers - in
-# combination with the "ExpiresByType" rules for images (see above). If
-# needed, un-comment the following rules.
-
-# BrowserMatch "MSIE" brokenvary=1
-# BrowserMatch "Mozilla/4.[0-9]{2}" brokenvary=1
-# BrowserMatch "Opera" !brokenvary
-# SetEnvIf brokenvary 1 force-no-vary
-
-
-
-# ----------------------------------------------------------------------
-# Cookie setting from iframes
-# ----------------------------------------------------------------------
-
-# Allow cookies to be set from iframes (for IE only)
-# If needed, uncomment and specify a path or regex in the Location directive
-
-# <IfModule mod_headers.c>
-# <Location />
-# Header set P3P "policyref=\"/w3c/p3p.xml\", CP=\"IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT\""
-# </Location>
-# </IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# Start rewrite engine
-# ----------------------------------------------------------------------
-
-# Turning on the rewrite engine is necessary for the following rules and features.
-
-<IfModule mod_rewrite.c>
- RewriteEngine On
-</IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# Suppress or force the "www." at the beginning of URLs
-# ----------------------------------------------------------------------
-
-# The same content should never be available under two different URLs - especially not with and
-# without "www." at the beginning, since this can cause SEO problems (duplicate content).
-# That's why you should choose one of the alternatives and redirect the other one.
-
-# By default option 1 (no "www.") is activated. Remember: Shorter URLs are sexier.
-# no-www.org/faq.php?q=class_b
-
-# If you rather want to use option 2, just comment out all option 1 lines
-# and uncomment option 2.
-# IMPORTANT: NEVER USE BOTH RULES AT THE SAME TIME!
-
-# ----------------------------------------------------------------------
-
-# Option 1:
-# Rewrite "www.domain.com -> domain.com"
-
-<IfModule mod_rewrite.c>
- RewriteCond %{HTTPS} !=on
- RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
- RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
-</IfModule>
-
-# ----------------------------------------------------------------------
-
-# Option 2:
-# To rewrite "domain.com -> www.domain.com" uncomment the following lines.
-# Be aware that the following rule might not be a good idea if you
-# use "real" subdomains for certain parts of your website.
-
-# <IfModule mod_rewrite.c>
-# RewriteCond %{HTTPS} !=on
-# RewriteCond %{HTTP_HOST} !^www\..+$ [NC]
-# RewriteCond %{HTTP_HOST} (.+)$ [NC]
-# RewriteRule ^(.*)$ http://www.%1/$1 [R=301,L]
-# </IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# Add/remove trailing slash to (non-file) URLs
-# ----------------------------------------------------------------------
-
-# Google treats URLs with and without trailing slashes separately.
-# Forcing a trailing slash is usually preferred, but all that's really
-# important is that one correctly redirects to the other.
-
-# By default option 1 (force trailing slash) is activated.
-# http://googlewebmastercentral.blogspot.com/2010/04/to-slash-or-not-to-slash.html
-# http://www.alistapart.com/articles/slashforward/
-# http://httpd.apache.org/docs/2.0/misc/rewriteguide.html#url Trailing Slash Problem
-
-# ----------------------------------------------------------------------
-
-# Option 1:
-# Rewrite "domain.com/foo -> domain.com/foo/"
-
-<IfModule mod_rewrite.c>
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_URI} !(\.[a-zA-Z0-9]{1,5}|/|#(.*))$
- RewriteRule ^(.*)$ /$1/ [R=301,L]
-</IfModule>
-
-# ----------------------------------------------------------------------
-
-# Option 2:
-# Rewrite "domain.com/foo/ -> domain.com/foo"
-
-#<IfModule mod_rewrite.c>
-# RewriteRule ^(.*)/$ /$1 [R=301,L]
-#</IfModule>
-
-
-
-# ----------------------------------------------------------------------
-# Built-in filename-based cache busting
-# ----------------------------------------------------------------------
-
-# If you're not using the build script to manage your filename version revving,
-# you might want to consider enabling this, which will route requests for
-# /css/all.20110203.css to /res/all.css
-
-# To understand why this is important and a better idea than all.css?v1231,
-# read: github.com/paulirish/html5-boilerplate/wiki/Version-Control-with-Cachebusting
-
-# Uncomment to enable.
-# <IfModule mod_rewrite.c>
-# RewriteCond %{REQUEST_FILENAME} !-f
-# RewriteCond %{REQUEST_FILENAME} !-d
-# RewriteRule ^(.+)\.(\d+)\.(js|css|png|jpg|gif)$ $1.$3 [L]
-# </IfModule>
-
-