pallets / pallets-sphinx-themes Goto Github PK
View Code? Open in Web Editor NEWSphinx themes for Pallets and related projects.
License: BSD 3-Clause "New" or "Revised" License
Sphinx themes for Pallets and related projects.
License: BSD 3-Clause "New" or "Revised" License
This is not really a issue, its more a question ...
I guess html_show_sourcelink is not supported by pallets-sphinx-themes .. right?
If so and since the default of html_show_sourcelink is True, is it better to set
html_show_sourcelink = False
to not copy sources into the dist folder _sources
?
What should a PR add, changing the default to False or is it better to implement the function right away?
Seen in https://jinja.palletsprojects.com/en/3.1.x/api/
Tested in
This is a proposal to move the .. click:example::
and .. click:run::
implementation to the aptly named sphinx-click
project.
I would love to rely on these 2 directives to document my click-based projects. I found a workaround but adding pallets-sphinx-themes
dependency on my project seems awkward, hence my proposal. Moving all Sphinx-related code to sphinx-click
will allow for a better maintainership by decoupling it from pallets documentation own release cycles.
There is a mirror issue open on sphinx-click
at: click-contrib/sphinx-click#110
Use position: sticky
for the version warning. Add JavaScript to ensure anchor targets are not obscured by the floating header.
hi,
we might consider fixing the underline dots size to text-decoration-thickness: 1px
because of chrome, which sometimes render the text decoration over the text itself
see readthedocs/readthedocs.org#9805 (comment)
@davidism is already working on a fix -thanks for that!
For use with maintenance branches, where the docs represent "1.2.x".
I am requesting a dark mode version of the website and documentation. It's not about my personal style preference. It's a usability issue since I am presently dealing with cataracts.
A dark theme can be easier to read because it reduces light and improves contrast. An alternate solution would be having the ability to change the style.
I want to thank you for Flask. It's incredible.
The Jinja extension automatically generates the docs for the list of filters and tests, but doesn't do anything to distinguish the reference names. This causes collisions for things like float
, which is both a filter and a test. Sphinx 3 started treating this as an error.
I was trying out sphinx-build -j auto
in the pytest repo to maybe speed up the docs build a bit. It fails with the following error:
NotImplementedError: merge_domaindata must be implemented in <class 'pallets_sphinx_themes.themes.click.domain.ClickDomain'> to be able to do parallel builds!
Link to merge_domaindata.
I haven't been able to complete a -j
build so I'm not sure if it's actually worth the effort.
flask
: master branch
pallets-sphinx-themes
: v1.1.1
Traceback (most recent call last):
File "e:\python 3.5\lib\site-packages\sphinx\config.py", line 161, in __init__
execfile_(filename, config)
File "e:\python 3.5\lib\site-packages\sphinx\util\pycompat.py", line 150, in execfile_
exec_(code, _globals)
File "conf.py", line 7, in <module>
from pallets_sphinx_themes import DocVersion, ProjectLink, get_version
ImportError: cannot import name 'DocVersion'
Since pallets-sphinx-themes
version 1.1.0, DocVersion
api has not been exposed but also not deprecated.
When I solved the above problem, another error occurred.
Theme error:
no theme named 'flask' found (missing theme.conf?)
flask
docs' conf.py
doesn't add pallets-sphinx-themes
into its extensions
pallets-sphinx-themes
doesn't add sphinx.html_themes
entry points.
When RTD was working on their new search feature, we disabled it because the results it returned weren't as useful as Sphinx's search yet.
I think we can disable this now, we can play around with the setting in one of the projects and compare the results to see if RTD search is okay to use now.
RTD / Ethical Ads injects non-intrusive ads into the sidebar or footer. We can add a div to control where the ads are shown more precisely instead of RTD needing to guess: https://docs.readthedocs.io/en/stable/advertising/ad-customization.html
I could not find any previous discussion about this subject.
I would suggest making the side-menus sticky in most themes.
The side menu usually holds the TOC, and when reading something at the bottom of a very long page (example), we need to scroll all the way up to find a link in the TOC. The default RTD theme has sticky menu, and I find this very convenient.
What do you think?
Currently using packaging.version.parse
to determine which versions to mark latest. However, RTD uses the branch names, like 6.x
, which don't parse as versions. Need to strip the suffix before parsing.
Deprecation messages are printed on building rich
module documemntation.
Textualize/rich#1240
On the flask website, every page has a tag with the canonical link for the page. However, the canonical link for a page (for example, https://flask.palletsprojects.com/en/2.0.x/foreword/) includes .html
at the end (for example, https://flask.palletsprojects.com/en/2.0.x/foreword.html). The problem is that following the canonical link (with the .html
) results in a 404. This seems to be true for all pages except for those ending /index.html
(such as the home page, whose canonical link is https://flask.palletsprojects.com/en/2.0.x/index.html). I noticed this behavior when a friend shared a link to the website, and the browser used the canonical link, resulting in a 404.
This seems to be the best venue to report this, if not, please point me in the right direction.
The Jinja 2.10.x build on Read the Docs is showing "this is an old version, the latest is 2.9.x".
Hello!
So I followed the instructions and installed the theme via pip.
I then added the following to my conf.py
file, as requested:
extensions = [
'pallets_sphinx_themes'
]
html_theme = 'flask'
Now, when I run make clean; make html
, the resulting error is:
Removing everything under 'build'...
Running Sphinx v1.6.6
making output directory...
Extension error:
Unknown event name: autodoc-skip-member
make: *** [html] Error 1
Any insights? I don't have any issues when running any of the default themes...
I'm not sure this is the right place to raise this issue, but the search feature seems to be broken on the documentation websites of Flask, Werkzeug, Jinja, ...
e.g. if I search for "flask" on the flask doc website: get this result page:
https://flask.palletsprojects.com/en/2.0.x/search/?q=flask
the first hit is for example "flask (Python module, in API)", linking to url https://flask.palletsprojects.com/en/2.0.x/search/api/?highlight=flask#module-flask
When I click that link, my browser (Firefox) complains with "The page isn't redirecting properly". In Chromium I get "flask.palletsprojects.com redirected you too many times.". Chromium suggest to clear my cookies, but that does not help.
seems like the page is redirecting to itself:
$ curl -I 'https://flask.palletsprojects.com/en/2.0.x/search/api/?highlight=flask#module-flask'
HTTP/1.1 302 Found
...
Location: https://flask.palletsprojects.com/en/2.0.x/search/api/?highlight=flask
...
Hi, I am trying to add sphinx documentation to my project https://github.com/jwg4/flask-selfdoc (so the documentation is currently totally minimal. I was able to build the docs by running sphinx-build, however after adding "pallets_sphinx_themes" as an extension in docs/conf.py
, setting the theme to 'flask' and installing pallets-sphinx-themes, I can no longer build the docs, as follows:
jack@yyy:~/flask-selfdoc $ poetry run sphinx-build -b html docs/ docs/_build/html
Running Sphinx v4.4.0
Extension error:
Could not import extension pallets_sphinx_themes (exception: cannot import name 'pass_context' from 'jinja2' (/home/jack/.cache/pypoetry/virtualenvs/flask-selfdoc-vTLo-IC6-py3.8/lib/python3.8/site-packages/jinja2/__init__.py))
I'm using Python 3.8.9, the attached poetry.lock
shows all my dev environment dependencies including sphinx, jinja and this project.
I can try and reproduce minimally without all the other packages, but I wanted to check first in case I'm doing something obviously wrong. Thanks!
When visiting a non-exist page, for example:
the generated 404 page contains wrong static URLs, for example:
https://flask.palletsprojects.com/en/_static/flask.css
It should be:
https://flask.palletsprojects.com/en/1.1.x/_static/flask.css
Search on the newly rendered docs is causing a 404/infinite redirect error. This happens on both RTD and locally, it doesn't appear to be an issue with RTD. It seems that {{ url_root }}
is empty for some reason, at this line:
Traceback (most recent call last):
File "/home/travis/build/garenchan/werkzeug/.tox/docs-html/lib/python3.6/site-packages/sphinx/config.py", line 157, in __init__
execfile_(filename, config)
File "/home/travis/build/garenchan/werkzeug/.tox/docs-html/lib/python3.6/site-packages/sphinx/util/pycompat.py", line 150, in execfile_
exec_(code, _globals)
File "conf.py", line 2, in <module>
from pallets_sphinx_themes import ProjectLink, get_version
File "/home/travis/build/garenchan/werkzeug/.tox/docs-html/lib/python3.6/site-packages/pallets_sphinx_themes/__init__.py", line 15, in <module>
from .versions import load_versions
File "/home/travis/build/garenchan/werkzeug/.tox/docs-html/lib/python3.6/site-packages/pallets_sphinx_themes/versions.py", line 7, in <module>
from packaging import version as pv
ModuleNotFoundError: No module named 'packaging'
pallets-sphinx-themes
uses packaging
library. But packaging
may not be installed.
I know newest sphinx
depends on packaging
but versions older than 1.7.0
not.
See pallets/flask#2743 and sphinx-doc/sphinx#4915.
Insert an image using the .. image::
directive. When the page is resized so that it goes into the mobile layout, the image is squished horizontally. I think this is due to a conflict between the theme CSS and the inline CSS the directive inserts into the image tag.
.. image:: _static/click-logo.png
:align: center
:scale: 50%
:target: https://palletsprojects.com/p/click/
The fix may need to be pushed up to Sphinx after fixing it here.
The current font is hard to read, and it makes people feel tired when reading for a long time.
Here is a comparison between the current font and a font that has better readability.
The current font:
The font with Optima, Segoe, "Segoe UI", Candara, Calibri, Arial
(this may not the best font to use, just as an example):
Hi, could you please bump the release because I believe this Python 3.8 fix is not on PyPI yet:
Related: vimalloc/flask-jwt-extended#307
I have trouble translating flask documents into Persian, LTL output is displayed and this is unlike Persian (which is rtl). How can this problem be solved?
The following version information is coming from the Werkzeug docs: "New in version 0.6: The location can now be a unicode string that is encoded using the iri_to_uri() function." See http://flask.pocoo.org/docs/0.11/api/#flask.redirect.
There might be more of this kind of issue in the documentation. For this particular one, you can trace the code to docs/api.rst,:
.. autofunction:: redirect
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.