From d7b9a316530e23dd7be607b0f9041b7ac01f6f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Ka=CC=88gy?= Date: Wed, 28 Feb 2024 10:05:41 +0100 Subject: [PATCH] fix invalid format of callouts in md --- guides/choose-your-adventure.md | 4 ++-- guides/data-api.md | 2 +- guides/extend-a-core-block.md | 2 +- ...luding-frontend-javascript-with-a-block.md | 2 +- ...sing-wordpress-packages-on-the-frontend.md | 6 +++--- reference/01-Fundamentals/a-block.md | 2 +- reference/02-Themes/styles.md | 4 ++-- reference/03-Blocks/block-extensions.md | 2 +- reference/03-Blocks/block-locking.md | 6 +++--- reference/03-Blocks/block-patterns.md | 6 +++--- reference/03-Blocks/block-styles.md | 8 +++---- reference/03-Blocks/block-transforms.md | 2 +- reference/03-Blocks/block-updates.md | 4 ++-- reference/03-Blocks/block-variations.md | 4 ++-- reference/03-Blocks/custom-blocks.md | 2 +- training/02-cta-lesson.md | 21 +++++++++++-------- training/03-styles.md | 8 +++---- training/04-patterns.md | 2 +- training/05-variations.md | 4 ++-- training/06-inner-blocks.md | 4 ++-- training/08-slot-fill.md | 2 +- training/index.md | 3 ++- 22 files changed, 52 insertions(+), 48 deletions(-) diff --git a/guides/choose-your-adventure.md b/guides/choose-your-adventure.md index c756fbc..7b29ba6 100644 --- a/guides/choose-your-adventure.md +++ b/guides/choose-your-adventure.md @@ -51,7 +51,7 @@ You can easily enhance the editor experience by also adding a block pattern for :::caution As mentioned in the [block pattern reference](../reference/Blocks/block-patterns) patterns have no connection to what created them. So any updates you make to the pattern in the future will not update instances that were created before you updated it. -:::caution +::: ### 2.b Using Core Blocks + a Block Pattern with Restrictions @@ -65,4 +65,4 @@ This Icon Card block can then be inserted inside the columns block with a headin :::info The custom block should also get a block pattern created to make it even easier to insert the entire design on the page. Since we build dynamic blocks at 10up we now also don't have the issue of not being able to update markup in patterns anymore. Because we can update the markup of our dynamic block which gets reflected everywhere. -:::info +::: diff --git a/guides/data-api.md b/guides/data-api.md index 609cd15..8eaee70 100644 --- a/guides/data-api.md +++ b/guides/data-api.md @@ -55,7 +55,7 @@ import { store as packageStore } from '@wordpress/package'; :::note `@wordpress/package` does not actually exist -:::note +::: You can then use this imported store object either by passing it to the `useDispatch` hook if you want to trigger actions on the store: diff --git a/guides/extend-a-core-block.md b/guides/extend-a-core-block.md index 074f405..851c032 100644 --- a/guides/extend-a-core-block.md +++ b/guides/extend-a-core-block.md @@ -50,7 +50,7 @@ function generateClassName( attributes ) { :::caution If you extend dynamic blocks that don't store their markup in the database you will need to replicate the logic to add the class name on the frontend manually in php. -:::caution +::: ### Create Inline Style generator diff --git a/guides/including-frontend-javascript-with-a-block.md b/guides/including-frontend-javascript-with-a-block.md index 3741286..d5595ac 100644 --- a/guides/including-frontend-javascript-with-a-block.md +++ b/guides/including-frontend-javascript-with-a-block.md @@ -36,7 +36,7 @@ Every time the block gets used anywhere, WordPress will make sure to enqueue all :::note WordPress expects a file that is provided via a relative file path to also have a `.asset.php` file next to it with the script dependencies and generated version number. Both `@wordpress/scripts` and `10up-toolkit` do this automatically for you using the `@wordpress/dependency-extraction-webpack-plugin`. -:::note +::: ### Enqueueing additional external dependencies diff --git a/guides/using-wordpress-packages-on-the-frontend.md b/guides/using-wordpress-packages-on-the-frontend.md index e037cf4..c7c2695 100644 --- a/guides/using-wordpress-packages-on-the-frontend.md +++ b/guides/using-wordpress-packages-on-the-frontend.md @@ -12,7 +12,7 @@ You can find a list of `@wordpress/` packages that are the exception to this rul The `@wordpress/` dependencies are first and foremost designed to be used within the editor. Therefore they are not necessarily optimized for frontend performance and size. Some packages rely on [`lodash`](https://lodash.com) or [`moment`](https://momentjs.com) and therefore come with a **lot** of code. _Starting in WordPress 6.1 a lot of packages have dropped their reliance of `lodash`._ -:::caution +::: ## Bundle size @@ -33,7 +33,7 @@ Speaking of [`lodash`](https://lodash.com) one pitfall is, that the [Dependency :::info There are some `@wordpress/` packages, like the [`@wordpress/icons`](https://developer.wordpress.org/block-editor/reference-guides/packages/packages-icons/) package, that are not bundled in WordPress and therefore don't get externalized. You can view the [excluded list in the GitHub repo](https://github.com/WordPress/gutenberg/blob/b1f2064d64df4db70a379c690ee1e28ebef8b86d/packages/dependency-extraction-webpack-plugin/lib/util.js#L2-L6). -:::info +::: This means that even if any of your other frontend dependencies try to load something from lodash the [Dependency Extraction Webpack Plugin](https://www.npmjs.com/package/@wordpress/dependency-extraction-webpack-plugin) will pick that up and add [`lodash`](https://lodash.com) to your dependency array. @@ -43,7 +43,7 @@ The [`@wordpress/packages`](https://developer.wordpress.org/block-editor/referen :::caution As a rule of thumb any package that includes _editor_ in it's name should **not** be used outside of the editor. -:::caution +::: ## Useful packages outside of the editor diff --git a/reference/01-Fundamentals/a-block.md b/reference/01-Fundamentals/a-block.md index 6386d7c..07c4b8c 100644 --- a/reference/01-Fundamentals/a-block.md +++ b/reference/01-Fundamentals/a-block.md @@ -84,7 +84,7 @@ This pattern of having a placeholder also allows you to make it easier for your :::info This actually is a pattern that you will see over and over again throughout this section. The settings sidebar should be treated as optional. Most editors should never have to open it and interact with the options in it. Everything they need to enter their content should be available inline. -:::info +::: ### Selected diff --git a/reference/02-Themes/styles.md b/reference/02-Themes/styles.md index 2956930..2e90d84 100644 --- a/reference/02-Themes/styles.md +++ b/reference/02-Themes/styles.md @@ -28,7 +28,7 @@ The stylesheets that get added via the `add_editor_style` function get automatic :::tip If you need to load custom fonts from an external source you also need to add a separate `add_editor_style` call for the stylesheet loading the font. -:::tip +:::
Enqueueing order on the page: @@ -104,7 +104,7 @@ Please note that if a stylesheet opts-in to get inlined, that is no guarantee th If for example on a page there are 30 stylesheets that are 1kb each, and they all opt-in to be inlined, then only 20 of them will be converted from `` to `