mirror of
https://github.com/wagtail/wagtail.git
synced 2024-11-29 17:36:49 +01:00
d308d6930a
Prompted by https://github.com/wagtail/wagtail/discussions/8362#discussioncomment-2647505 - Python files are expected to be in UTF-8, but `open()` will use the system default encoding, which is likely to be Windows-1252 on Windows. Unfortunately [fileinput](https://docs.python.org/3/library/fileinput.html) doesn't provide an encoding argument until Python 3.10, so we have to over-engineer things a bit to keep things consistent across the rewrite / list / diff modes - opening files in binary mode and explicitly decoding each line as utf-8 (with graceful fallback behaviour on UnicodeDecodeError, so that we don't end up clobbering a file mid-write). |
||
---|---|---|
.. | ||
_static | ||
_templates | ||
advanced_topics | ||
contributing | ||
editor_manual | ||
extending | ||
getting_started | ||
reference | ||
releases | ||
topics | ||
autobuild.sh | ||
conf.py | ||
favicon.ico | ||
index.rst | ||
logo.png | ||
Makefile | ||
README.md | ||
requirements.txt | ||
robots.txt | ||
spelling_wordlist.txt | ||
support.rst |
Wagtail docs
These are Sphinx docs, automatically built at https://docs.wagtail.org when the main
branch is committed to Github. To build them locally, install Wagtail's development requirements (in the root Wagtail directory):
pip install -e .[testing,docs]
To build the documentation for browsing, from this directory run:
make html
then open _build/html/index.html
in a browser.
To rebuild automatically while editing the documentation, from this directory run:
sphinx-autobuild . _build
The online editor at http://rst.ninjs.org/ is a helpful tool for checking reStructuredText syntax.