Skip to content
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

Block Editor Handbook not properly updated when two markdown files share the name (but not path) #61206

Closed
juanmaguitar opened this issue Apr 29, 2024 · 4 comments
Assignees
Labels
[Type] Developer Documentation Documentation for developers

Comments

@juanmaguitar
Copy link
Contributor

juanmaguitar commented Apr 29, 2024

After merging #61143 for some reason the Quick Start Guide of the Intereactivity API meant to be at "Block Editor Handbook > Reference Guides > Interactivity API Reference > Quick Start Guide" (se toc.json) has been created at https://developer.wordpress.org/block-editor/getting-started/quick-start-guide/ (replacing the former one) and the url https://developer.wordpress.org/block-editor/reference-guides/interactivity-api/quick-start-guide/ redirects there

The PR #61198 was created (and merged) to fix this specific update but the issue with the docs generation remains

It seems the current system generates docs of the Block Editor Handbooks when two markdown files have the same name (even when they are in different paths)

This should be either fixed or a warning should be displayed when running npm run docs:build and related scripts

cc: @ryanwelcher @ndiego @oandregal

@ndiego
Copy link
Member

ndiego commented Apr 29, 2024

... a warning should be displayed when running npm run docs:build and related scripts

I think this would be a good approach, but not sure how to technically set it up.

@oandregal
Copy link
Member

Looking at the git history of the manifest.json file, this has happened in the past, see #37505

IIRC, this is a limitation of the handbook setup: it creates pages for every entry present the manifest.json based on their slug, so it has to be unique. Back in the days, there was a import-block-editor.php in meta that did this job, but I can no longer find it. This ticket https://meta.trac.wordpress.org/ticket/5019 references that file.

I agree it'd be a nice improvement for the scripts to prevent you from committing if there's a repeated slug.

@juanmaguitar
Copy link
Contributor Author

I have opened the PR #61332 that launch an error in "build time" when duplicated slugs are detected

@juanmaguitar
Copy link
Contributor Author

Closed as per #61332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Developer Documentation Documentation for developers
Projects
None yet
Development

No branches or pull requests

3 participants