[wp-meta] [Making WordPress.org] #5266: Source Block Editor docs from master branch

Making WordPress.org noreply at wordpress.org
Tue Jun 16 20:43:06 UTC 2020


#5266: Source Block Editor docs from master branch
---------------------------+--------------------------
 Reporter:  mkaz           |       Owner:  coffee2code
     Type:  defect         |      Status:  closed
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:  fixed
 Keywords:                 |
---------------------------+--------------------------

Comment (by mkaz):

 @coffee2code : Thanks for taking care of that patch.

 With regards to switcher, my idea is that multiple copies of the handbook
 would be published and the user could switch to the version they want.

 I need to figure out how to setup an environment and test, but my idea for
 the code is something like this


 {{{
 +               // Generate a new handbook for each tag.
 +               // The handbook will be published to:
 https://developer.wordpress.org/block-editor-$SLUG/
 +               $tags = array(
 +                       array(
 +                               'slug' => '5.4',
 +                               'tag'  => 'wp/5.4',
 +                       ),
 +               );
 +
 +               foreach ( $tags as $t ) {
 +                       parent::do_init(
 +                               'blocks',
 +                               "block-editor-${t['slug']}",
 +
 "https://raw.githubusercontent.com/WordPress/gutenberg/${t['tag']}/docs/manifest.json"
 +                       );
 +               }
 +
 }}}


 So WP 5.4 would be published to: https://developer.wordpress.org/block-
 editor-5.4/

 We'd need to create an array with the versions in the theme and add the
 switcher the user could toggle.

 Thoughts?

-- 
Ticket URL: <https://meta.trac.wordpress.org/ticket/5266#comment:3>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list