Mercurial > p > roundup > code
diff doc/_templates/layout.html @ 7492:452a8bd1d826
add file with sphinx requirements for building doc.
Disable permalinks for older and newer sphinx versions.
make conf.py's work with old and new sphinx.
make layout.py work with 7.x sphinx which replaces the style
variable with styles[].
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 15 Jun 2023 20:46:59 -0400 |
| parents | 33124f6dc1c4 |
| children | 291afa77ad82 |
line wrap: on
line diff
--- a/doc/_templates/layout.html Thu Jun 15 15:16:43 2023 -0400 +++ b/doc/_templates/layout.html Thu Jun 15 20:46:59 2023 -0400 @@ -73,14 +73,30 @@ {%- endmacro %} {%- macro css() %} - <link rel="stylesheet" href="{{ pathto('_static/basic.css', 1) }}" type="text/css" /> - <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> + <link rel="stylesheet" href="{{ pathto('_static/NO_basic.css', 1) }}" type="text/css" /> + <link rel="stylesheet" href="{{ pathto('_static/' + styles[-1], 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 %} {%- endmacro %} +{# + In newer sphinx styles is an array and style does not exist + In older sphinx (1.x) style is the style set in conf.py. + + If style exists, assume styles doesn't exist and make styles + exist with style as the only value. + + So we can use styles[-1] in the css() macro. + When sourceforge lets me build docs with something newer than sphinx 1, + we can delete this. +#} +{% if style %} +{% set styles = [] %} +{{ styles.append( style ) }} +{% endif %} + <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
