So people don't need to provide the whole copy, just the modified files.
if not os.path.exists(html_output):
os.makedirs(html_output)
- env = Environment(loader=FileSystemLoader(templates),
+ # If custom template dir was supplied, use the default template directory
+ # as a fallback
+ template_paths = [templates]
+ if templates != default_templates: template_paths += [default_templates]
+ env = Environment(loader=FileSystemLoader(template_paths),
trim_blocks=True, lstrip_blocks=True, enable_async=True)
# Filter to return file basename or the full URL, if absolute
--- /dev/null
+XML_OUTPUT =
+
+##! M_LINKS_NAVBAR1 =
+##! M_LINKS_NAVBAR2 =
+##! M_PAGE_FINE_PRINT =
+##! M_THEME_COLOR =
+##! M_FAVICON =
+##! M_SEARCH_DISABLED = YES
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>HELLO THIS TEMPLATE OVERRIDES THINGS</title>
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
+ <link rel="stylesheet" href="m-dark+doxygen.compiled.css" />
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+</head>
+<body>
+<header><nav id="navigation">
+ <div class="m-container">
+ <div class="m-row">
+ <a href="index.html" id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">My Project</a>
+ </div>
+ </div>
+</nav></header>
+<main><article>
+ <div class="m-container m-container-inflatable">
+ <div class="m-row">
+ <div class="m-col-l-10 m-push-l-1">
+ <h1>HELLO THIS TEMPLATE OVERRIDES THINGS</h1>
+ <p>But not all, the base.html is taken from the fallback.</p>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
--- /dev/null
+<?xml version='1.0' encoding='UTF-8' standalone='no'?>
+<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.14">
+ <compounddef id="indexpage" kind="page">
+ <compoundname>index</compoundname>
+ <title>My Project</title>
+ <briefdescription>
+ </briefdescription>
+ <detaileddescription>
+ </detaileddescription>
+ </compounddef>
+</doxygen>
--- /dev/null
+{% extends 'base.html' %}
+
+{% block title %}HELLO THIS TEMPLATE OVERRIDES THINGS{% endblock %}
+
+{% block main %}
+ <h1>HELLO THIS TEMPLATE OVERRIDES THINGS</h1>
+ {% if compound.brief %}
+ <p>{{ compound.brief }}</p>
+ {% endif %}
+ <p>But not all, the base.html is taken from the fallback.</p>
+ {% if compound.description %}
+{{ compound.description }}
+ {% endif %}
+{% endblock %}
self.run_dox2html5(wildcard='indexpage.xml')
self.assertEqual(*self.actual_expected_contents('index.html'))
+class TemplateFallback(BaseTestCase):
+ def __init__(self, *args, **kwargs):
+ super().__init__(__file__, 'template_fallback', *args, **kwargs)
+
+ def test(self):
+ self.run_dox2html5(templates=self.path, wildcard='indexpage.xml')
+ self.assertEqual(*self.actual_expected_contents('index.html'))
+
class NavbarSingleColumn(BaseTestCase):
def __init__(self, *args, **kwargs):
super().__init__(__file__, 'navbar_single_column', *args, **kwargs)