Преглед изворни кода

Blockbase: Update docs (#4672)

* Blockbase: Update docs

* Remove whitespace at the start of functions.php
Ben Dwyer пре 3 година
родитељ
комит
bdf528d88c
3 измењених фајлова са 33 додато и 35 уклоњено
  1. 20 1
      blockbase/README.md
  2. 9 10
      blockbase/create-child.js
  3. 4 24
      blockbase/readme.txt

+ 20 - 1
blockbase/README.md

@@ -1,4 +1,23 @@
-# Getting started with Blockbase
+# About Blockbase
+The purpose of Blockbase is to provide a "ponyfill" that allows for 100% "configuration expression" of design.  Any aspect of configurable design that Gutenberg does not yet take into account is expressed in theme.json 'custom' properties.
+
+To use this theme assign it as the parent theme and then copy from this them to the child theme the theme.json file and fill out the details.
+
+The goal is for the ponyfill styling to reflect what Gutenberg will style, from a given configuration, once that work is complete.  But to offer that today, using simpler techniques that Gutenberg will use upon completion.
+
+## Bulding a Blockbase theme the easy way
+
+To build a Blockbase child theme follow these instructions:
+
+- Ensure node/npm are installed on your system.
+- From the /blockbase folder run the command `npm run create:child CHILDSLUG`
+- A directory with the necessary files will be created to match CHILDSLUG.  This folder will be a sibling of /blockbase.
+- From the /CHILDSLUG folder (whatever you decided it would be) run the command `npm run build` any time you make changes to the child-theme.json or any of the files in the /sass folder.
+- Your child theme's theme.json file will be built by combining Blockbase's original theme.json file and your child's `child-theme.json`. That is the file where your configuration values live (you only want the values for variables that are different from the parent there).
+- Use the command `npm run start` to enter watch mode to rebuild the assets any time you change child-theme.json or any of the files in /scss.
+- Extend the parent's templates that you want to customize or add new ones where needed following the [template hierarchy](https://themeshaper.com/2020/12/18/getting-started-with-block-themes-templates/).
+
+## Bulding a Blockbase theme manually
 
 
 Blockbase is a [parent theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/#what-is-a-parent-theme). The best way to use it is to create a child theme with Blockbase as a parent.
 Blockbase is a [parent theme](https://developer.wordpress.org/themes/advanced-topics/child-themes/#what-is-a-parent-theme). The best way to use it is to create a child theme with Blockbase as a parent.
 
 

+ 9 - 10
blockbase/create-child.js

@@ -4,7 +4,7 @@ const child_theme_json = `{
 	},
 	},
 	"styles": {
 	"styles": {
 		"blocks": {}
 		"blocks": {}
-	}	
+	}
 }`;
 }`;
 
 
 const child_package_json = `{
 const child_package_json = `{
@@ -31,28 +31,27 @@ const child_package_json = `{
 
 
 const style_css = `/*
 const style_css = `/*
 Theme Name: {newtheme}
 Theme Name: {newtheme}
-Theme URI: 
-Author: 
-Author URI: 
-Description: 
+Theme URI:
+Author:
+Author URI:
+Description:
 Requires at least: 5.7
 Requires at least: 5.7
 Tested up to: 5.7
 Tested up to: 5.7
 Requires PHP: 5.7
 Requires PHP: 5.7
 Version: 0.0.1
 Version: 0.0.1
 License: GNU General Public License v2 or later
 License: GNU General Public License v2 or later
-License URI: 
+License URI:
 Template: blockbase
 Template: blockbase
 Text Domain: {newtheme}
 Text Domain: {newtheme}
-Tags: 
+Tags:
 
 
 */`;
 */`;
 
 
-const theme_scss = `	
+const theme_scss = `
 // Custom CSS should be added here.  It will be compiled to /assets/theme.css.
 // Custom CSS should be added here.  It will be compiled to /assets/theme.css.
 `;
 `;
 
 
-const functions_php = `
-<?php
+const functions_php = `<?php
 
 
 /**
 /**
  * Add Editor Styles
  * Add Editor Styles

+ 4 - 24
blockbase/readme.txt

@@ -14,35 +14,15 @@ Blockbase is a simple theme that supports full-site editing. It comes with a set
 
 
 == About Blockbase ==
 == About Blockbase ==
 
 
-The purpose of Blockbase is to provide a "ponyfill" that allows for 100% "configuration expression" of design.  Any aspect of configurable design that Gutenberg does not yet take into account is expressed in theme.json 'custom' properties.
-
-To use this theme assign it as the parent theme and then copy from this them to the child theme the theme.json file and fill out the details.
-
-The goal is for the ponyfill styling to reflect what Gutenberg will style, from a given configuration, once that work is complete.  But to offer that today, using simpler techniques that Gutenberg will use upon completion.
-
-== Building a Block Child Theme ==
-
-To build a Blockbase child theme follow these instructions:
-
-- Ensure node/npm are installed on your system.
-- From the /blockbase folder run the command `npm run create:child CHILDSLUG`
-- A directory with the necessary files will be created to match CHILDSLUG.  This folder will be a sibling of /blockbase.
-- From the /CHILDSLUG folder (whatever you decided it would be) run the command `npm run build` any time you make changes to the child-theme.json or any of the files in the /sass folder.
-- Your child theme's theme.json file will be built by combining Blockbase's original theme.json file and your child's `child-theme.json`. That is the file where your configuration values live (you only want the values for variables that are different from the parent there). 
-- Use the command `npm run start` to enter watch mode to rebuild the assets any time you change child-theme.json or any of the files in /scss.
-- Extend the parent's templates that you want to customize or add new ones where needed following the [template hierarchy](https://themeshaper.com/2020/12/18/getting-started-with-block-themes-templates/).
-
-== Building a Universal Child Theme ==
-
-A Universal theme is a theme that works in Full Site Editing and in the Customizer. This is a concept that's still being explored so we don't have instructions to provide yet. If you are curious, you can visit [the project](https://github.com/Automattic/themes/tree/trunk/quadrat) where we are developing Quadrat as a Universal Theme.
+For more information see our README.md file.
 
 
 == Changelog ==
 == Changelog ==
 
 
 = 1.2.0 =
 = 1.2.0 =
-* Remove site editor toggle 
+* Remove site editor toggle
 * PHP 404 template
 * PHP 404 template
 * Revise font customization approach
 * Revise font customization approach
-* Bug fixes and child-theme compability improvements 
+* Bug fixes and child-theme compability improvements
 
 
 = 1.1.0 =
 = 1.1.0 =
 * Added color customization from the customizer
 * Added color customization from the customizer
@@ -52,7 +32,7 @@ A Universal theme is a theme that works in Full Site Editing and in the Customiz
 * Remove unneeded functions to pass theme check
 * Remove unneeded functions to pass theme check
 
 
 = 1.0 =
 = 1.0 =
-* Initial release 
+* Initial release
 
 
 == Copyright ==
 == Copyright ==