Readthedocs.org: yellow badge when using underscore in project name

Created on 25 Apr 2019  路  5Comments  路  Source: readthedocs/readthedocs.org

I'm not sure exactly when, but at some point in the past few weeks my doc status badge went from green to yellow. I have been including the following in my README.rst:

.. image:: https://readthedocs.org/projects/cmake_format/badge/
    :target: https://cmake_format.readthedocs.io

Which is now serving up a yellow/uknown badge:

Selection_180

The status page for my project however is green:

Selection_178

That page seems to be serving the badge from https://readthedocs.org/projects/cmake-format/badge/ (note cmake-format instead of cmake_format). I'll change my README.rst to use a dash instead of an underscore if that's what I should be doing. Apologies if this is not-a-bug but expected behavior. Perhaps I missed an announcement or something somewhere?

I'm not sure why I used the underscore originally. I can't remember if I copied the URL off the status page or if I typed it in manually or something. The github project has an underscore.

Anyway, I'm reporting here in case this was an accidental change.

Details

Expected Result

I expect https://readthedocs.org/projects/cmake_format/badge/ to be green/passing.

Actual Result

https://readthedocs.org/projects/cmake_format/badge/ is yellow/unknown

Support

All 5 comments

Apologies if this is not-a-bug but expected behavior. Perhaps I missed an announcement or something somewhere?

Yeah, sorry. I think this was done a time ago when we changed to serve from subdomains. The _ is not allowed in subdomains https://stackoverflow.com/questions/7111881/what-are-the-allowed-characters-in-a-subdomain

Please use the new url https://cmake-format.readthedocs.io/en/latest/ (with a dash), that will work for everything :)

Please use the new url https://cmake-format.readthedocs.io/en/latest/ (with a dash), that will work for everything :)

You mean https://cmake-format.readthedocs.io/en/latest/ for the link to the documentation right? So the :target: in my README...

and then https://readthedocs.org/projects/cmake-format/badge/ is the correct URL for the badge, right?

I'll make those changes in my project, thanks for the confirmation that this is what I should be using.

Yeah, that's right.

We just added a redirect for old projects https://github.com/rtfd/readthedocs.org/pull/5634, but the recommended way is using - instead of _

Was this page helpful?
0 / 5 - 0 ratings