-
-
Notifications
You must be signed in to change notification settings - Fork 503
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Trac #33309: Make Sage documentation functional
Sage documentation (website) is currently buggy in many ways. I tried to fix various defects I noticed, including - links in navigation bar - index page, which is now in single column - sage logo link always goes to the sagemath homepage - `class` names now look ragged right - long `Bases` for classes now horizontally scrolled - updated `sage` theme based on the latest `classic` theme of Sphinx - renamed `sage` theme to `sage-classic` theme (in anticipation of alternative themes) - remove unnecessary `sageref` theme; only use `sage` theme - remove obsolete `python2.inv` hyperlinks database - added a new `index.html` which is installed right into the root directory `SAGE_DOC`. - adjusted colors to increase contrast among elements - documentation access from jupyter notebook (this undoes #33206) - search box works (turned off Thebe) As noted in the last item above, I turned off Thebe here. Work on reviving Thebe will continue in #33320 (perhaps very slowly). To cleanly build the new documentation, try {{{ $ make doc-uninstall && make doc-html && make doc-pdf }}} URL: https://trac.sagemath.org/33309 Reported by: klee Ticket author(s): Kwankyu Lee Reviewer(s): Tobias Diez, John Palmieri, François Bissey, Steven Trogdon
- Loading branch information
Showing
50 changed files
with
852 additions
and
912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{# | ||
This is a customized version for Sage documentation theme. | ||
|
||
Changes: at line 42, "slice(2)" -> "slice(1)" | ||
#} | ||
|
||
{# | ||
basic/genindex-single.html | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Template for a "single" page of a split index. | ||
|
||
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. | ||
:license: BSD, see LICENSE for details. | ||
#} | ||
{% macro indexentries(firstname, links) %} | ||
{%- if links -%} | ||
<a href="{{ links[0][1] }}"> | ||
{%- if links[0][0] %}<strong>{% endif -%} | ||
{{ firstname|e }} | ||
{%- if links[0][0] %}</strong>{% endif -%} | ||
</a> | ||
|
||
{%- for ismain, link in links[1:] -%} | ||
, <a href="{{ link }}">{% if ismain %}<strong>{% endif -%} | ||
[{{ loop.index }}] | ||
{%- if ismain %}</strong>{% endif -%} | ||
</a> | ||
{%- endfor %} | ||
{%- else %} | ||
{{ firstname|e }} | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
{%- extends "layout.html" %} | ||
{% set title = _('Index') %} | ||
{% block body %} | ||
|
||
<h1 id="index">{% trans key=key %}Index – {{ key }}{% endtrans %}</h1> | ||
|
||
<table style="width: 100%" class="indextable"><tr> | ||
{%- for column in entries|slice(1) if column %} | ||
<td style="width: 33%; vertical-align: top;"><ul> | ||
{%- for entryname, (links, subitems, _) in column %} | ||
<li>{{ indexentries(entryname, links) }} | ||
{%- if subitems %} | ||
<ul> | ||
{%- for subentryname, subentrylinks in subitems %} | ||
<li>{{ indexentries(subentryname, subentrylinks) }}</li> | ||
{%- endfor %} | ||
</ul> | ||
{%- endif -%}</li> | ||
{%- endfor %} | ||
</ul></td> | ||
{%- endfor %} | ||
</tr></table> | ||
|
||
{% endblock %} | ||
|
||
{% block sidebarrel %} | ||
<h4>{{ _('Index') }}</h4> | ||
<p>{% for key, dummy in genindexentries -%} | ||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a> | ||
{% if not loop.last %}| {% endif %} | ||
{%- endfor %}</p> | ||
|
||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p> | ||
{{ super() }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{# | ||
This is a customized version for Sage documentation theme. | ||
|
||
Changes: no change | ||
#} | ||
|
||
{# | ||
basic/genindex-split.html | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
Template for a "split" index overview page. | ||
|
||
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. | ||
:license: BSD, see LICENSE for details. | ||
#} | ||
{%- extends "layout.html" %} | ||
{% set title = _('Index') %} | ||
{% block body %} | ||
|
||
<h1 id="index">{{ _('Index') }}</h1> | ||
|
||
<p>{{ _('Index pages by letter') }}:</p> | ||
|
||
<div class="genindex-jumpbox"> | ||
<p>{% for key, dummy in genindexentries -%} | ||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a> | ||
{% if not loop.last %}| {% endif %} | ||
{%- endfor %}</p> | ||
|
||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong> | ||
({{ _('can be huge') }})</a></p> | ||
</div> | ||
|
||
{% endblock %} | ||
|
||
{% block sidebarrel %} | ||
{% if split_index %} | ||
<h4>Index</h4> | ||
<p>{% for key, dummy in genindexentries -%} | ||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a> | ||
{% if not loop.last %}| {% endif %} | ||
{%- endfor %}</p> | ||
|
||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p> | ||
{% endif %} | ||
{{ super() }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{# | ||
This is a customized version for Sage documentation theme. | ||
|
||
Changes: at line 52, "slice(2)" -> "slice(1)" | ||
#} | ||
|
||
{# | ||
basic/genindex.html | ||
~~~~~~~~~~~~~~~~~~~ | ||
|
||
Template for an "all-in-one" index. | ||
|
||
:copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS. | ||
:license: BSD, see LICENSE for details. | ||
#} | ||
{%- extends "layout.html" %} | ||
{% set title = _('Index') %} | ||
|
||
{% macro indexentries(firstname, links) %} | ||
{%- if links -%} | ||
<a href="{{ links[0][1] }}"> | ||
{%- if links[0][0] %}<strong>{% endif -%} | ||
{{ firstname|e }} | ||
{%- if links[0][0] %}</strong>{% endif -%} | ||
</a> | ||
|
||
{%- for ismain, link in links[1:] -%} | ||
, <a href="{{ link }}">{% if ismain %}<strong>{% endif -%} | ||
[{{ loop.index }}] | ||
{%- if ismain %}</strong>{% endif -%} | ||
</a> | ||
{%- endfor %} | ||
{%- else %} | ||
{{ firstname|e }} | ||
{%- endif %} | ||
{% endmacro %} | ||
|
||
{% block body %} | ||
|
||
<h1 id="index">{{ _('Index') }}</h1> | ||
|
||
<div class="genindex-jumpbox"> | ||
{% for key, dummy in genindexentries -%} | ||
<a href="#{{ key }}"><strong>{{ key }}</strong></a> | ||
{% if not loop.last %}| {% endif %} | ||
{%- endfor %} | ||
</div> | ||
|
||
{%- for key, entries in genindexentries %} | ||
<h2 id="{{ key }}">{{ key }}</h2> | ||
<table style="width: 100%" class="indextable genindextable"><tr> | ||
{%- for column in entries|slice_index(1) if column %} | ||
<td style="width: 33%; vertical-align: top;"><ul> | ||
{%- for entryname, (links, subitems, _) in column %} | ||
<li>{{ indexentries(entryname, links) }} | ||
{%- if subitems %} | ||
<ul> | ||
{%- for subentryname, subentrylinks in subitems %} | ||
<li>{{ indexentries(subentryname, subentrylinks) }}</li> | ||
{%- endfor %} | ||
</ul> | ||
{%- endif -%}</li> | ||
{%- endfor %} | ||
</ul></td> | ||
{%- endfor %} | ||
</tr></table> | ||
{% endfor %} | ||
|
||
{% endblock %} | ||
|
||
{% block sidebarrel %} | ||
{% if split_index %} | ||
<h4>{{ _('Index') }}</h4> | ||
<p>{% for key, dummy in genindexentries -%} | ||
<a href="{{ pathto('genindex-' + key) }}"><strong>{{ key }}</strong></a> | ||
{% if not loop.last %}| {% endif %} | ||
{%- endfor %}</p> | ||
|
||
<p><a href="{{ pathto('genindex-all') }}"><strong>{{ _('Full index on one page') }}</strong></a></p> | ||
{% endif %} | ||
{{ super() }} | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes
Oops, something went wrong.