mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Enable automatic formatting for `sphinx/ext/githubpages.py
`
This commit is contained in:
parent
bc53ab75c8
commit
13d25d96bf
@ -415,7 +415,6 @@ exclude = [
|
||||
"sphinx/domains/python/_object.py",
|
||||
"sphinx/domains/rst.py",
|
||||
"sphinx/domains/std/__init__.py",
|
||||
"sphinx/ext/githubpages.py",
|
||||
"sphinx/ext/graphviz.py",
|
||||
"sphinx/ext/ifconfig.py",
|
||||
"sphinx/ext/imgconverter.py",
|
||||
|
@ -43,8 +43,8 @@ def create_nojekyll_and_cname(app: Sphinx, env: BuildEnvironment) -> None:
|
||||
|
||||
domain = _get_domain_from_url(app.config.html_baseurl)
|
||||
# Filter out GitHub Pages domains, as they do not require CNAME files.
|
||||
if domain and not domain.endswith(".github.io"):
|
||||
with open(cname_path, 'w', encoding="utf-8") as f:
|
||||
if domain and not domain.endswith('.github.io'):
|
||||
with open(cname_path, 'w', encoding='utf-8') as f:
|
||||
# NOTE: don't write a trailing newline. The `CNAME` file that's
|
||||
# auto-generated by the GitHub UI doesn't have one.
|
||||
f.write(domain)
|
||||
|
Loading…
Reference in New Issue
Block a user