Skip to content

Commit

Permalink
Fix missing colons in dask/dask (#43)
Browse files Browse the repository at this point in the history
This fix updates the `layout.html` with changes I grabbed from
readthedocs/sphinx_rtd_theme#838 that relate to the version of the
`htmlwriter` that is used.

This should resolve dask/dask#6696 once a new release of the theme is
cut (I've bumped the version in `__init__.py`) and the update is pulled
in there.

* Switch back to `extends` from rtd theme
  • Loading branch information
gforsyth authored Oct 2, 2020
1 parent 85fb2c1 commit e3e61d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 105 deletions.
2 changes: 1 addition & 1 deletion dask_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from os import path

__version__ = '1.3.2'
__version__ = '1.3.3'


def get_html_theme_path():
Expand Down
105 changes: 1 addition & 104 deletions dask_sphinx_theme/layout.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,11 @@
{# TEMPLATE VAR SETTINGS #}
{%- set url_root = pathto('', 1) %}
{%- if url_root == '#' %}{% set url_root = '' %}{% endif %}
{%- set lang_attr = 'en' if language == None else (language | replace('_', '-')) %}

{# XXX: Should revert back to theme inhritence if readthedocs/sphinx_rtd_theme#853 is ever merged #}
{% extends "sphinx_rtd_theme/layout.html" %}

{% set css_files = css_files + ["_static/css/explore.css"] %}
{% set css_files = css_files + ["_static/css/nbsphinx.css"] %}

{% set script_files = script_files + ["_static/js/custom.js"] %}

<!DOCTYPE html>
<html lang="{{ lang_attr }}" >
<head>
<meta charset="utf-8">
{{ metatags }}
<meta name="viewport" content="width=device-width, initial-scale=1.0">
{% block htmltitle %}
<title>{{ title|striptags|e }}</title>
{% endblock %}

{# FAVICON #}
{% if favicon %}
<link rel="shortcut icon" href="{{ pathto('_static/' + favicon, 1) }}"/>
{% endif %}

{# CANONICAL URL #}
{% if theme_canonical_url %}
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
{% endif %}

{# SOCIAL GRAPH #}
<meta name="Description" content="{{ title|striptags|e }}">
<meta property="og:description" content="{{ title|striptags|e }}">
Expand All @@ -49,85 +25,6 @@
<meta name="twitter:image" content="https://github.com/dask.png" />
<meta name="twitter:image:alt" content="{{ docstitle }}">

{# CSS #}
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
{%- for css in css_files %}
{%- if css|attr("rel") %}
<link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
{%- else %}
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
{%- endif %}
{%- endfor %}

{%- for cssfile in extra_css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{%- endfor %}

{# JAVASCRIPTS #}
{%- block scripts %}
<!--[if lt IE 9]>
<script src="{{ pathto('_static/js/html5shiv.min.js', 1) }}"></script>
<![endif]-->
{%- if not embedded %}
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
{% if sphinx_version >= "1.8.0" %}
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
{%- for scriptfile in script_files %}
{{ js_tag(scriptfile) }}
{%- endfor %}
{% else %}
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'{{ url_root }}',
VERSION:'{{ release|e }}',
LANGUAGE:'{{ language }}',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
HAS_SOURCE: {{ has_source|lower }},
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
};
</script>
{%- for scriptfile in script_files %}
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
{%- endfor %}
{% endif %}
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>

{# OPENSEARCH #}
{%- if use_opensearch %}
<link rel="search" type="application/opensearchdescription+xml"
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
{%- endif %}
{%- endif %}
{%- endblock %}

{%- block linktags %}
{%- if hasdoc('about') %}
<link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
{%- endif %}
{%- if hasdoc('genindex') %}
<link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
{%- endif %}
{%- if hasdoc('search') %}
<link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
{%- endif %}
{%- if hasdoc('copyright') %}
<link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
{%- endif %}
{%- if next %}
<link rel="next" title="{{ next.title|striptags|e }}" href="{{ next.link|e }}" />
{%- endif %}
{%- if prev %}
<link rel="prev" title="{{ prev.title|striptags|e }}" href="{{ prev.link|e }}" />
{%- endif %}
{%- endblock %}
{%- block extrahead %}
<link rel="shortcut icon" href="{{ pathto('_static/images/favicon.ico', 1) }}"/>
{% endblock %}
</head>

<body class="wy-body-for-nav">

{% block extrabody %}
Expand Down

0 comments on commit e3e61d9

Please sign in to comment.