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 manifest generation to use relative urls #14739
Conversation
@@ -2,1297 +2,1297 @@ | |||
{ | |||
"title": "Gutenberg Handbook", | |||
"slug": "handbook", | |||
"markdown_source": "https://raw.githubusercontent.com/WordPress/gutenberg/master/docs/readme.md", | |||
"markdown_source": "../docs/readme.md", |
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.
Thinking if this should be just docs/readme.md
(relative to the root of the repository instead of being relative to the file). I wonder which one is simpler for the importer. cc @dd32
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 docs importer only accepts an absolute URI here. https://meta.trac.wordpress.org/browser/sites/trunk/wordpress.org/public_html/wp-content/themes/pub/gutenberg/inc/docs-importer.php#L25
Adding the functionality to support a relative URL is doable if needed.
Note that there is a related issue to migrate contents to DevHub https://meta.trac.wordpress.org/ticket/4388 |
@nosolosw Do you think we can provide the meta patch in parallel to the work done here? that way we merge both at the same time? |
e958b88
to
5798ecb
Compare
Rebased from |
Can I get some clarification on how relative paths were envisioned to work? Currently, two manifests are utilized (the second via #15254). manifest.json has:
manifest-devhub.json has:
In both cases, it appears My question: for manifest-devhub.json, should the relative path resolve to:
or should it resolve to:
Bear in mind, the path that relative paths are relative to is the location for the manifest. So my belief is that (2) is the intent. This allows for a manifest in a branch to easily reference files relative to its own branch. The markdown_source values of However, if you expect the path to be relative to the repo root, then I believe you'd have to use a markdown_source value like (I'm running under the assumption that these or future manifests may want to refer to non-master versions of files.) |
Yep. The idea is to be able to pinpoint the handbook content to a specific commit hash (branch, tag, etc) - see conversation. |
So then as far as my question goes, the relative link of |
Ah, I see the answer to my question in a comment on #15254, and that my presumption of the relative link pointing to the manifest's branch is correct. |
This can be closed. It is superseded by #15254 which includes relative paths support. Current handbook sync has been disabled and relative paths not implemented for this. See https://meta.trac.wordpress.org/ticket/4244#comment:7 |
NOT TO MERGE UNTIL CORE CHANGES ARE ADDRESSED
Fixes #14303
Related core ticket: https://meta.trac.wordpress.org/ticket/4244