# Compound name is page filename, so we have to use title there. The same
# is for groups.
compound.name = html.escape(compounddef.find('title').text if compound.kind in ['page', 'group'] and compounddef.findtext('title') else compounddef.find('compoundname').text)
- # Compound URL is ID, except for index page
- compound.url = (compounddef.find('compoundname').text if compound.kind == 'page' else compound.id) + '.html'
+ # Compound URL is ID, except for index page, where it is named "indexpage"
+ # and so I have to override it back to "index". Can't use <compoundname>
+ # for pages because that doesn't reflect CASE_SENSE_NAMES. THANKS DOXYGEN.
+ # This is similar to compound.url_base handling in parse_xml() below.
+ compound.url = 'index.html' if compound.kind == 'page' and compound.id == 'indexpage' else compound.id + '.html'
compound.brief = parse_desc(state, compounddef.find('briefdescription'))
# Groups and pages are explicitly created so they *have details*, other
# things need to have at least some documentation
# Compound URL is ID, except for index page, where it is named "indexpage"
# and so I have to override it back to "index". Can't use <compoundname>
# for pages because that doesn't reflect CASE_SENSE_NAMES. THANKS DOXYGEN.
+ # This is similar to compound.url handling in extract_metadata() above.
compound.url_base = ('index' if compound.id == 'indexpage' else compound.id)
compound.url = compound.url_base + '.html'
# Save current compound URL for search data building and ID extraction,
--- /dev/null
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8" />
+ <title>My Project</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>Pages</h2>
+ <ul class="m-dox">
+ <li class="m-dox-collapsible">
+ <a href="#" onclick="return toggle(this)"></a><a href="index.html" class="m-dox">My Project</a> <span class="m-dox"></span>
+ <ul class="m-dox">
+ <li><a href="_u_p_p_e_r_c_a_s_e.html" class="m-dox">Uppercase page</a> <span class="m-dox"></span></li>
+ </ul>
+ </li>
+ </ul>
+ <script>
+ function toggle(e) {
+ e.parentElement.className = e.parentElement.className == 'm-dox-collapsible' ?
+ 'm-dox-expansible' : 'm-dox-collapsible';
+ return false;
+ }
+ /* Collapse all nodes marked as such. Doing it via JS instead of directly in
+ markup so disabling it doesn't harm usability. The list is somehow
+ regenerated on every iteration and shrinks as I change the classes. It's not
+ documented anywhere and I'm not sure if this is the same across browsers, so
+ I am going backwards in that list to be sure. */
+ var collapsed = document.getElementsByClassName("collapsed");
+ for(var i = collapsed.length - 1; i >= 0; --i)
+ collapsed[i].className = 'm-dox-expansible';
+ </script>
+ </div>
+ </div>
+ </div>
+</article></main>
+</body>
+</html>
self.run_dox2html5(wildcard='*.xml')
# Verify that all filenames are "converted" to lowercase and the links
- # work properly as well
+ # and page tree work properly as well
self.assertEqual(*self.actual_expected_contents('index.html'))
+ self.assertEqual(*self.actual_expected_contents('pages.html'))
self.assertEqual(*self.actual_expected_contents('_u_p_p_e_r_c_a_s_e.html'))
self.assertEqual(*self.actual_expected_contents('class_u_p_p_e_r_c_l_a_s_s.html'))