-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
ReadTheDocs Configuration File #512
Conversation
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.
One comment on the robots.txt work
Another item to take care of requires configuring ReadTheDocs:
- Make craylabs.org the canonical URL: https://docs.readthedocs.io/en/stable/guides/technical-docs-seo-guide.html#canonical-urls
- Add me, Matt Ellis, and Al as owners of the SmartSim readthedocs account
doc/conf.py
Outdated
@@ -82,6 +82,8 @@ | |||
# a list of builtin themes. | |||
html_theme = "sphinx_book_theme" | |||
|
|||
# Avoid indexing by search engines | |||
html_extra_path = ['../robots.txt'] |
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 will create a robots.txt file for all documentation that we build (including the one that will be hosted at craylabs.org. I was digging into the documentation a little more (and verified) that readthedocs by default ships a robots.txt: https://docs.readthedocs.io/en/stable/guides/technical-docs-seo-guide.html#seo-robots-txt
This seems to be the case for us, since this file exists: https://smartsim.readthedocs.io/en/latest/robots.txt
Could you dig into this a little more? It might also (for safety) be worthwhile to still figure out a way to make a robots.txt file but have a way to only create the robots.txt file if we know that it's being built via readthedocs
Could you dig into this and
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.
for sure!
I removed the robots.txt file from the root directory. It is now created in |
Good catch to add the canonical URL! The docs were super clear to why we need this. You can check the add here (Details). |
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.
Approving with only minor comments and pending @ashao review
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.
Thanks for your work on this! Some very minor comments that shouldn't hold up merging.
In addition to the make docs
update ticket that I suggest, I'm going to open up another one about the canonical URL. What it looks like that means is actually that we could update craylabs.org to point to ReadTheDocs instead. That's not happening now, because we don't have our domain provider set up like that, but I think we should think through whether we want to do that.
pre_create_environment: | ||
- git clone --depth 1 https://github.com/CrayLabs/SmartRedis.git smartredis | ||
- git clone --depth 1 https://github.com/CrayLabs/SmartDashboard.git smartdashboard | ||
post_create_environment: | ||
- python -m pip install . | ||
- cd smartredis; python -m pip install . | ||
- cd smartredis/doc; doxygen Doxyfile_c; doxygen Doxyfile_cpp; doxygen Doxyfile_fortran | ||
- ln -s smartredis/examples ./examples | ||
- cd smartdashboard; python -m pip install . | ||
pre_build: | ||
- python -m sphinx -b linkcheck doc/ $READTHEDOCS_OUTPUT/linkcheck |
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.
Could you make a ticket to update the make docs
target so that we can eventually converge the two workflows?
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.
yes!
@@ -84,6 +84,13 @@ | |||
# a list of builtin themes. | |||
html_theme = "sphinx_book_theme" | |||
|
|||
# Check if the environment variable is set to 'True' | |||
if os.environ.get('READTHEDOCS') == "True": |
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.
Nice solution!
Adding readthedocs yaml file to develop