Skip to content

Instantly share code, notes, and snippets.

@kroger
Created July 31, 2012 01:21
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save kroger/3212526 to your computer and use it in GitHub Desktop.
Save kroger/3212526 to your computer and use it in GitHub Desktop.
Layout for epub style for Sphinx
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset={{ encoding }}"/>
{{ metatags }}
{%- block htmltitle %}
<title>{{ title|striptags|e }}{{ titlesuffix }}</title>
{%- endblock %}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css"/>
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css"/>
{%- for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css"/>
{%- endfor %}
</head>
<body>
{%- block content %}
<div class="document">
{%- block document %}
<div class="body">
{% block body %} {% endblock %}
</div>
{%- endblock %}
</div>
{%- endblock %}
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment