-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Update mkdocs #5505
Update mkdocs #5505
Conversation
We are still fine defaulting to
https://mkdocs.readthedocs.io/en/latest/user-guide/configuration/ |
|
https://mkdocs.readthedocs.io/en/latest/user-guide/configuration/#extra_css |
The theme problem was correct actually I think we put that feature flag only to old projects, right? If so, we can just leave that code as is, new projects should set explicitly the readthedocs theme. |
From the floating footer, our |
Our z-index comes from https://github.com/rtfd/readthedocs.org/blob/master/readthedocs/core/static/core/css/badge_only.css, not sure from where we generate that min file. |
Got it, it comes from https://github.com/rtfd/readthedocs.org/blob/a639939b77b3ec803abb8dcf749a1d6d7d9d8254/gulpfile.js#L27-L27 Whici comes from https://github.com/rtfd/readthedocs.org/blob/a639939b77b3ec803abb8dcf749a1d6d7d9d8254/bower.json#L20-L20 We should update the theme in the dependencies, I guess? Or do we want to follow another approach for mkdocs? |
@@ -295,7 +291,7 @@ def install_core_requirements(self): | |||
] | |||
|
|||
if self.config.doctype == 'mkdocs': | |||
requirements.append('mkdocs==0.17.3') | |||
requirements.append('mkdocs<1.1') |
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 haven't seen anything breaking from their changelog since 1.0 :)
https://mkdocs.readthedocs.io/en/latest/about/release-notes/
1.1 is in current development
I'm not sure how we can setup this https://github.com/rtfd/sphinx_rtd_theme/blob/ddfdd35e6977f21fb1771734732756b0cf1d6bba/sass/_theme_badge.sass#L9 |
I believe it comes from the RTD sphinx theme. However, the
The big issue is that users can pin to 0.17 or 1.0 in the requirements.txt file. When they do, we have to be very careful of any changes we make to the |
I get it, the issue is with users with the feature flag and without a pinned version of mkdocs, their projects will fail or have the other theme, I'm not sure how new versions of mkdocs handled that deprecated setting. |
@stsewd not sure what the status here is? I imagine users can already install this version via requirements, so we mostly just need to make sure it doesn't break horribly for everyone when we upgrade. I guess if users aren't pinning it currently, they might get invalid config errors from the upgraded version? Not really anything we can do about that, sadly :/ |
Yeah, the only affected users are the ones with the flag, I think we put that flag on all the projects of .com. So if the projects have the flag, and they don't have the theme option set, they will not be able to use a newer version of mkdocs/their build will fail. |
I don't think we used the flag in .org, so here we are safe. |
Also, the current mkdocs version that we install doesn't work with python 3.7 (the default version that we install) |
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'm 👍 on upgrading our default installed version to the latest available at this point. Although, I think we need to be very careful here with existing projects.
I'd like to put this under a feature flag, so current projects keep using 0.17.3
if they don't have a pinned version and new projects start using <1.1
. Otherwise, I won't merge this PR because I'm mostly sure that it will break existent projects randomly and will make this difficult to debug.
Putting a feature flag for old projects makes sense, but it also makes the feature flag to be around for ever, projects will break if they don't pin their requirements or keep updating their docs the latest version of mkdocs supported. Same for sphinx, we update sphinx quicker, that's why we don't have many users yelling at us, they update progressively. |
Unfortunately, yes. We need the feature flag until we decide to drop support for old mkdocs versions. |
Well, this change doesn't mean to stop supporting old mkdocs versions, projects should still work, only projects that have a mkdocs.yaml file with incompatible settings in 1.0 and without a pinned version will fail. |
Feature flag was added, how do we manage this? Do we create the feature flag with |
Not sure if we create a migration, or just make that setting True when we create it in prod. A migration feels like the best option, so it doesn't depend on a step during deploy other than running migrations. |
We have been creating the feature flag when deploying as far as I know. We will need to do this twice: community and corporate, though. |
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 is 👍 now that it's under a feature flag.
I was thinking, creating the feature flag with |
Things I'm seeing so far:
Previous theme (readthedocs) isn't usedCloses #5332
is a problem already present, we can fix that in another PRI think this is what we want, but I can deep a little more if we are correctly editing the mkdocs.yml fileThis is only present when the user has a lot of versions, we can fix it later or in another PR I think