annotate docs/templates/doc.html @ 411:e7b865f8f335

bake: Enable multiprocess baking. Baking is now done by running a worker per CPU, and sending jobs to them. This changes several things across the codebase: * Ability to not cache things related to pages other than the 'main' page (i.e. the page at the bottom of the execution stack). * Decouple the baking process from the bake records, so only the main process keeps track (and modifies) the bake record. * Remove the need for 'batch page getters' and loading a page directly from the page factories. There are various smaller changes too included here, including support for scope performance timers that are saved with the bake record and can be printed out to the console. Yes I got carried away. For testing, the in-memory 'mock' file-system doesn't work anymore, since we're spawning processes, so this is replaced by a 'tmpfs' file-system which is saved in temporary files on disk and deleted after tests have run.
author Ludovic Chabant <ludovic@chabant.com>
date Fri, 12 Jun 2015 17:09:19 -0700
parents 8140ff806258
children 61d53d2163d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
243
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
1 {% extends "default.html" %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
2
353
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
3 {% macro pagelink(title, url) -%}
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
4 <a href="{{url}}"{% if url == page.url %} class="active"{% endif %}>{{title}}</a>
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
5 {%- endmacro %}
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
6
294
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
7 {% block head %}
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
8 {% if page.needs_pygments %}
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
9 <style type="text/css">
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
10 {{highlight_css()}}
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
11 </style>
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
12 {% endif %}
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
13 {% endblock %}
f51b69ad09ae docs: Add the ability to use Pygments highlighting.
Ludovic Chabant <ludovic@chabant.com>
parents: 276
diff changeset
14
243
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
15 {% block header %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
16 <header class="documentation">
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
17 <h1>{{ page.title }}</h1>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
18 </header>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
19 {% endblock %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
20
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
21 {% block content %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
22 <div class="container">
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
23 <section class="col-md-8">
276
a5d21fac8e3f docs: Change docs' templates after changes in Jinja's wrapper.
Ludovic Chabant <ludovic@chabant.com>
parents: 243
diff changeset
24 {{ content|safe }}
243
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
25 </section>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
26 <aside class="col-md-4">
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
27 <ul class="doc-level1">
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
28 {% for p in family.root %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
29 {% if p.is_dir and p.is_page %}
353
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
30 <li>{{ pagelink(p.title, p.url) }}
243
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
31 <ul class="doc-level2">
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
32 {% for p2 in p.children %}
353
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
33 <li>{{ pagelink(p2.title, p2.url) }}</li>
243
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
34 {% endfor %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
35 </ul>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
36 </li>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
37 {% elif not p.is_dir and p.order %}
353
8140ff806258 docs: Add "active page" style for the navigation menu.
Ludovic Chabant <ludovic@chabant.com>
parents: 294
diff changeset
38 <li>{{ pagelink(p.title, p.url) }}</li>
243
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
39 {% endif %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
40 {% endfor %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
41 </ul>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
42 </aside>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
43 </div>
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
44 {% endblock %}
26e59f837558 docs: Add embryo of a documentation website.
Ludovic Chabant <ludovic@chabant.com>
parents:
diff changeset
45