catseye  committed 8e1c296

To change jQuery, supply a base.html in your own template dir.

  • Participants
  • Parent commits 766118f

Comments (0)

Files changed (3)

File src/chrysoberyl/

     """Render all nodes to a set of HTML5 files.
-    optparser.add_option("--jquery-url",
-                         dest="jquery_url", metavar='URL',
-                         default='',
-                         help="URL from which rendered pages grab jQuery")
                          dest="node_dir", metavar='DIR',
         json.dump(transform_dates(data), file, encoding='utf-8',
-    r = Renderer(data, options.template_dirs, options.node_dir,
-                 jquery_url=options.jquery_url)
+    r = Renderer(data, options.template_dirs, options.node_dir)

File src/chrysoberyl/

     """Object which renders Chrysoberyl data as HTML pages.
-    def __init__(self, data, template_dirs, output_dir,
-                 jquery_url=None):
+    def __init__(self, data, template_dirs, output_dir): = data
         self.template_dirs = template_dirs.split(':')
         self.output_dir = output_dir
         self.jinja2_env = Environment(loader=Loader(self.template_dirs))
-        self.jquery_url = jquery_url
     def render(self, template, output_filename, context):
         """Low-level method to render a given template."""
         context['data'] =
         context['key'] = key
         context['filekey'] = filekey
-        context['jquery_url'] = self.jquery_url
         # Context functions.  Being nested functions of render_node lets
         # them easily access (close over) the current node and its key.

File templates/base.html

-  <script src="{{ jquery_url }}"></script>
+  <script src=""></script>
   <script src="../contrib/bootstrap/js/bootstrap.min.js"></script>
   <script type="text/javascript" src="../scripts/chrysoberyl.js"></script>
   {% block extra_tail %}{% endblock extra_tail %}