eudicots / Cactus

Static site generator for designers. Uses Python and Django templates.
BSD 3-Clause "New" or "Revised" License
3.47k stars 313 forks source link

cannot insert script before html closing tag #169

Closed fedelibre closed 9 years ago

fedelibre commented 9 years ago

I'm trying to add a script block in a page, just before the closing html tag. The page includes the default base.html template. I've tried to follow what's done in error.html but it's not working:

{% extends "base.html" %}
{% block body %}
<div class="container">
  <ul id="lightGallery">
  ...
  </ul>
</div>
{% endblock body %}
{% block scripts %}
  <script type="text/javascript" charset="utf-8">
    $(document).ready(function() {
      $("#lightGallery").lightGallery();
    });
  </script>
{% endblock %}
krallin commented 9 years ago

Do you have a {% block scripts %} in base.html?

fedelibre commented 9 years ago

yes, just before the closing html tag

krallin commented 9 years ago

Can you post the relevant template code?

fedelibre commented 9 years ago

I'm not sure what I did wrong before, but it's working fine now. Sorry for the noise.