Codebase list python-pallets-sphinx-themes / 1c9f2c8
New upstream version 1.1.4 Ondřej Nový 4 years ago
10 changed file(s) with 71 addition(s) and 53 deletion(s). Raw diff Collapse all Expand all
0 Version 1.1.4
1 =============
2
3 Released 2019-01-28
4
5 - Store a page's canonical URL in
6 ``html_context["page_canonical_url"]`` rather than overwriting
7 ``canonical_url``, for compatibility with Read the Docs. (`#21`_)
8
9 .. _#21: https://github.com/pallets/pallets-sphinx-themes/pull/21
10
11
12 Version 1.1.3
13 =============
14
15 Released 2019-01-28
16
17 - Move the Read the Docs search flag to the ``footer`` block to ensure
18 it executes after Read the Docs injects its data. (`#20`_)
19
20 .. _#20: https://github.com/pallets/pallets-sphinx-themes/pull/20
21
22
023 Version 1.1.2
124 =============
225
0 `BSD 3-Clause <https://opensource.org/licenses/BSD-3-Clause>`_
1
2 Copyright © 2014 by the Pallets team.
3
4 Some rights reserved.
0 Copyright 2007 Pallets
51
62 Redistribution and use in source and binary forms, with or without
73 modification, are permitted provided that the following conditions are
84 met:
95
10 - Redistributions of source code must retain the above copyright
6 1. Redistributions of source code must retain the above copyright
117 notice, this list of conditions and the following disclaimer.
128
13 - Redistributions in binary form must reproduce the above copyright
9 2. Redistributions in binary form must reproduce the above copyright
1410 notice, this list of conditions and the following disclaimer in the
1511 documentation and/or other materials provided with the distribution.
1612
17 - Neither the name of the copyright holder nor the names of its
13 3. Neither the name of the copyright holder nor the names of its
1814 contributors may be used to endorse or promote products derived from
1915 this software without specific prior written permission.
2016
21 We kindly ask you to use these themes in an unmodified manner only with
22 Pallets and Pallets-related projects, not for unrelated projects. If you
23 like the visual style and want to use it for your own projects, please
24 consider making some larger changes to the themes (such as changing font
25 faces, sizes, colors or margins).
26
27 THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND
28 CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
29 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
30 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
31 COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
33 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
34 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
35 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
37 THIS SOFTWARE AND DOCUMENTATION, EVEN IF ADVISED OF THE POSSIBILITY OF
38 SUCH DAMAGE.
17 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
20 PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
23 TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0 include CHANGES.rst LICENSE.rst
0 include CHANGES.rst
1 include LICENSE.rst
12 graft src/pallets_sphinx_themes
23 global-exclude *.py[co]
00 Metadata-Version: 1.1
11 Name: Pallets-Sphinx-Themes
2 Version: 1.1.2
2 Version: 1.1.4
33 Summary: Sphinx themes for Pallets and related projects.
44 Home-page: https://github.com/pallets/pallets-sphinx-themes/
5 Author: The Pallets Team
5 Author: Pallets
66 Author-email: contact@palletsprojects.com
7 License: BSD
7 License: BSD-3-Clause
88 Description: Pallets Sphinx Themes
99 =====================
1010
77
88 setup(
99 name="Pallets-Sphinx-Themes",
10 version="1.1.2",
10 version="1.1.4",
1111 url="https://github.com/pallets/pallets-sphinx-themes/",
12 license="BSD",
13 author="The Pallets Team",
12 license="BSD-3-Clause",
13 author="Pallets",
1414 author_email="contact@palletsprojects.com",
1515 description="Sphinx themes for Pallets and related projects.",
1616 long_description=readme,
1818 package_dir={"": "src"},
1919 include_package_data=True,
2020 zip_safe=False,
21 install_requires=["sphinx", "packaging"],
21 install_requires=["Sphinx", "packaging"],
2222 entry_points={
2323 "pygments.styles": [
2424 "pocoo = pallets_sphinx_themes.themes.pocoo:PocooStyle",
00 Metadata-Version: 1.1
11 Name: Pallets-Sphinx-Themes
2 Version: 1.1.2
2 Version: 1.1.4
33 Summary: Sphinx themes for Pallets and related projects.
44 Home-page: https://github.com/pallets/pallets-sphinx-themes/
5 Author: The Pallets Team
5 Author: Pallets
66 Author-email: contact@palletsprojects.com
7 License: BSD
7 License: BSD-3-Clause
88 Description: Pallets Sphinx Themes
99 =====================
1010
6363 def canonical_url(app, pagename, templatename, context, doctree):
6464 """Build the canonical URL for a page. Appends the path for the
6565 page to the base URL specified by the
66 ``html_context["canonical_url"]`` config.
66 ``html_context["canonical_url"]`` config and stores it in
67 ``html_context["page_canonical_url"]``.
6768 """
6869 base = context.get("canonical_url")
6970
7172 return
7273
7374 target = app.builder.get_target_uri(pagename)
74 context["canonical_url"] = base + target
75 context["page_canonical_url"] = base + target
7576
7677
7778 @only_pallets_theme()
1717 pre, * pre { padding: 7px 0 7px 30px!important;
1818 margin: 15px 0!important;
1919 line-height: 1.3; }
20
20
2121 /* colors */
2222 div.body { color: #3E4349; }
2323 a { color: #5D2CD1; }
55 {%- endset %}
66
77 {% block extrahead %}
8 {%- if canonical_url %}
9 <link rel="canonical" href="{{ canonical_url }}">
8 {%- if page_canonical_url %}
9 <link rel="canonical" href="{{ page_canonical_url }}">
1010 {%- endif %}
1111 <script>DOCUMENTATION_OPTIONS.URL_ROOT = '{{ url_root }}';</script>
12 {%- if READTHEDOCS and not readthedocs_docsearch %}
13 <script>
14 if (typeof READTHEDOCS_DATA !== 'undefined') {
15 if (!READTHEDOCS_DATA.features) {
16 READTHEDOCS_DATA.features = {};
17 }
18 READTHEDOCS_DATA.features.docsearch_disabled = true;
19 }
20 </script>
21 {%- endif %}
2212 {{ super() }}
2313 {%- endblock %}
2414
4333 <span id="sidebar-top"></span>
4434 {{- super() }}
4535 {%- endblock %}
36
37 {% block footer %}
38 {{ super() }}
39 {%- if READTHEDOCS and not readthedocs_docsearch %}
40 <script>
41 if (typeof READTHEDOCS_DATA !== 'undefined') {
42 if (!READTHEDOCS_DATA.features) {
43 READTHEDOCS_DATA.features = {};
44 }
45 READTHEDOCS_DATA.features.docsearch_disabled = true;
46 }
47 </script>
48 {%- endif %}
49 {% endblock %}