-
Notifications
You must be signed in to change notification settings - Fork 654
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace custom theme with sphinx-ansible-theme #856
Conversation
ssbarnea
commented
Jun 23, 2020
•
edited
Loading
edited
- remove custom sphinx theme from our codebase
- reuse shared sphinx-ansible-theme
- removed docs makefiles
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's easier to merge #858 first. This way you'd not have to modify makefile stuff making this change easier to accept too.
docs/docsite/rst/conf.py
Outdated
# the extension builds 404.rst into a location-agnostic 404 page | ||
# | ||
# default is `en` - using this for the sub-site: | ||
notfound_default_language = "ansible" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it from Ansible itself, a guess is default code-block when language is not mentioned i or unknown.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've marked some things that obviously don't belong here.
.readthedocs.yml
Outdated
--- | ||
version: 2 | ||
|
||
formats: all | ||
|
||
build: | ||
image: latest | ||
|
||
python: | ||
version: 3.7 | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out of scope
docs/docsite/rst/conf.py
Outdated
'github_version': 'master/docs/', | ||
'current_version': version, | ||
'latest_version': 'latest', | ||
# list specifically out of order to make latest work |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
docs/docsite/rst/conf.py
Outdated
|
||
import sys | ||
import os | ||
import datetime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring this module is out of scope. The change should only contain the integration of the new theme.
@ssbarnea should we keep this? |
Feel free to make any changes you want to the conf.py, i will not mind as long it builds with them. |
docs/rst/conf.py
Outdated
@@ -1,4 +1,5 @@ | |||
# -*- coding: utf-8 -*- | |||
"""Sphinx configuration.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it should be moved here. Also it doesn't seem related to changing the theme anyway.
docs/rst/conf.py
Outdated
# pip install sphinx_rtd_theme | ||
# import sphinx_rtd_theme | ||
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | ||
# pip install sphinx_ansible_theme |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is useful since all the supported configs have this info in the right place
# pip install sphinx_ansible_theme |
docs/rst/conf.py
Outdated
# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] | ||
# pip install sphinx_ansible_theme | ||
import sphinx_ansible_theme | ||
from ansiblelint import __version__, __package__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting up version vars is out of scope and should be in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should only contain bits related to adding a theme. All other changes are welcome to be submitted separately.
I remove almost all changes from conf.py to avoid delaying this even more.
- remove custom sphinx theme from our codebase - reuse shared sphinx-ansible-theme
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please answer this question:
docs/_themes/sphinx_rtd_theme/static/images/logo_invert.png
@ssbarnea should we keep this?
Also, for any change you want to do as a follow-up I expect a comment and maybe a link to an issue documenting that this needs to be done.
That is Ansible owns logo, now included with the theme. No need to keep it. |