-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add theme.json v1 reference and v1 to v2 migration docs #37886
Conversation
Size Change: +148 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
ff438cd
to
034a5a3
Compare
@@ -559,10 +559,28 @@ | |||
}, | |||
{ | |||
"title": "Theme.json Reference", | |||
"slug": "theme-json-reference", |
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.
We may need to keep this slug as theme-json-reference
as there's an existing theme-json
slug here.
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.
@oandregal This would be /reference-guides/theme-json
, so I assumed it would be okay. But I forgot to do a search for existing links which I'll take care of now
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.
Do you know if there's a way to redirect the old URL to the new one? I don't like that organizing the related docs into a folder will break the existing links
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 would be /reference-guides/theme-json, so I assumed it would be okay. But I forgot to do a search for existing links which I'll take care of now
I'm not sure how it works, to be honest.
Do you know if there's a way to redirect the old URL to the new one? I don't like that organizing the related docs into a folder will break the existing links
Yeah, that's feasible. In the past, we had to do this and it involved creating a track ticket for meta, for example https://meta.trac.wordpress.org/ticket/4388 In general, it's best to avoid asking for redirections too frequently as they are a small team. If we can go with the existing, it's going to be quicker to land this 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.
As for the slug names, what do you think of having:
theme-json-reference
for top-level (ortheme-json
plus setting up a redirection for the old slug: either to this top-level page or to the "living" page below).migrations
for the migrations doc, so it becomes https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/migrations/v1
(alternativelytheme-json-v1
) for the v1 doc, so it becomes https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/v1/living
(alternativelyunstable
, etc) for the "latest" doc, so it's clear that it can change, and it becomes https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/living/
Thinking out loud: when the time comes to freeze the v2 we have to extract the living to a v2 doc that will be manually curated from then on. We could even add a notice in the top-level of this doc explaining this and linking to the latest stable doc.
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.
The rest of the names changes seem good to me. I'll get those changes pushed up here soon and ask in #meta on slack to see if they know about using the same slug nested differently. (slack link)
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.
Also asked in #docs and it sounds like we probably can't reuse a slug which leaves the question: are we okay with https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/ changing to the new ToC page instead of redirecting it to the living reference like it was before?
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.
Seeing as we can't reuse slugs, we probably want something more specific than living
, v1
, and migrations
.
EDIT:
I pushed c12ebed477a0db5fb92625d1b84d3ee9408f5b73 to rename the paths as:
.../theme-json-reference/
.../theme-json-reference/theme-json-unstable/
.../theme-json-reference/theme-json-v1/
.../theme-json-reference/theme-json-migrations/
The question above about redirection still stands.
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.
are we okay with https://developer.wordpress.org/block-editor/reference-guides/theme-json-reference/ changing to the new ToC page instead of redirecting it to the living reference like it was before?
I think this should be fine.
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 see we use "living" in some places and "unstable" in others (file names, titles, etc). Would you mind consolidating everything to "living"?
Just a personal preference. Now that I see "unstable" it sounds less than ideal, as the theme.json is "stable" in that it works, just it can change. If you feel strongly either way (or any other option), go for it. As long as we use the same name everywhere we're fine.
@oandregal I opened #37925 to update the v1 schema in wp/5.8 to match the changes you made here. |
ef84f73
to
cf2558a
Compare
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 work here, Alex!
Alternative to #37772
Having separate docs pages for different versions of the schema has some benefits.
The drawbacks are in maintaining these docs.