Skip to content

Add "not latest" warning to all specs and remove latest.html#1239

Merged
turt2live merged 2 commits into
masterfrom
travis/spec-outdated
Jan 28, 2022
Merged

Add "not latest" warning to all specs and remove latest.html#1239
turt2live merged 2 commits into
masterfrom
travis/spec-outdated

Conversation

@turt2live
Copy link
Copy Markdown
Member

@turt2live turt2live commented Jan 26, 2022

The latest.html redirects were handled back in Matrix 1.1's release.

Fixes #1235

Preview: https://pr1239--matrix-org-previews.netlify.app

The latest.html redirects were handled back in Matrix 1.1's release.

Fixes #1235
@turt2live turt2live requested a review from afranke January 26, 2022 19:54
@turt2live
Copy link
Copy Markdown
Member Author

I'm not fixing typos on this - suspect it's fallout from crate-ci/typos#411

@aaronraimist
Copy link
Copy Markdown

aaronraimist commented Jan 26, 2022

Those words are actually misspelled though. Typos just didn't find them previously due to that bug.

@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 27, 2022

LGTM.

@aaronraimist would you mind submitting a PR to fix those typos that fell through?

Copy link
Copy Markdown
Contributor

@afranke afranke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually latest.json is still being linked from scripts/update_docs.sh. Can you remove that line from the script?

@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 27, 2022

Make that two lines, the mkdir becomes moot as well.

@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 27, 2022

Can you please also add a rule for latest.html alongside the existing “latest” rules?

@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 27, 2022

Huh, the ones that exist should actually already cover this. Sorry, I was mislead by the 404 on the Netlify preview.

@turt2live
Copy link
Copy Markdown
Member Author

Those words are actually misspelled though. Typos just didn't find them previously due to that bug.

They're valid, but strictly out of scope of this PR.

@turt2live
Copy link
Copy Markdown
Member Author

Actually latest.json is still being linked from scripts/update_docs.sh. Can you remove that line from the script?

@afranke I don't think this is the same latest.json? I'm working in unstyled_docs/spec whereas the script uses unstyled_docs/api (which doesn't exist, but I assume it exists at build time).

@turt2live turt2live requested a review from afranke January 27, 2022 21:48
@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 28, 2022

No, unstyled_docs/api/ is where the link ends up. It is that same latest.json file that is linked to. In any case, just like the rest of this MR, this is about ancient references to the latest version of the spec that has become irrelevant with the new spec website. More specifically, this was for Rapidoc to use, but Rapidoc now points at the new website. It needs to go.

@turt2live
Copy link
Copy Markdown
Member Author

I don't really understand the change tbh. Can we land this without?

@turt2live
Copy link
Copy Markdown
Member Author

or can we just remove the whole 4 lines?

@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 28, 2022

The mkdir needs to be tweaked, and the ln line removed. I can do it, if you're ok with me pushing to your branch. We are not removing more as the rest is still needed for Rapidoc setup. It’s this:

diff --git a/scripts/update_docs.sh b/scripts/update_docs.sh
index c15b184f7..29157180a 100755
--- a/scripts/update_docs.sh
+++ b/scripts/update_docs.sh
@@ -25,8 +25,7 @@ cd "$(dirname "$(dirname "${SELF}")")"
 
 # Set up foundations for RapiDoc API playground
 rm -fr unstyled_docs/api/client-server
-mkdir -p unstyled_docs/api/client-server/json
-ln -s ../../../spec/client_server/latest.json unstyled_docs/api/client-server/json/api-docs.json
+mkdir -p unstyled_docs/api/client-server
 
 # copy the unstyled docs and add the styling
 rm -rf content/docs

@turt2live
Copy link
Copy Markdown
Member Author

yes, please do push to the branch :D

(I still don't really understand the changes needed)

Signed-off-by: Alexandre Franke <alexandre.franke@matrix.org>
@afranke
Copy link
Copy Markdown
Contributor

afranke commented Jan 28, 2022

We’re all good now. If that works for you, you can squash & merge.

@turt2live turt2live merged commit a397779 into master Jan 28, 2022
@turt2live turt2live deleted the travis/spec-outdated branch January 28, 2022 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add unstable spec warnings to the top of all specs at matrix.org/docs

3 participants