2.1.0-beta1
版本发布时间: 2021-03-20 11:07:11
ampproject/amp-wp最新发布版本:2.5.4(2024-07-16 02:45:13)
This is the first beta prerelease for v2.1. For the full list of changes coming in this release, please see the 2.1 milestone. This prerelease includes 35 closed issues and 62 merged pull requests (excluding dependency updates). Please report any issues you encounter while testing! The 2.1 stable release is due out in April.
Additional information will come with future prereleases of 2.1, but for now some key highlights in this release for testing include:
-
Customizable Paired URL Structures: One of the most frequent requests we've received over the years is to have more control over the structure of paired AMP URLs. (Remember that paired URLs only apply to Transitional/Reader template modes since Standard template mode is AMP-first in that the canonical URLs themselves are AMP.) Historically, the
/amp/
URL endpoint was limited to single post URLs in Reader mode for the legacy post templates, whereas the?amp
query param was used for pages and all URLs in Transitional mode and any AMP page using a Reader theme. These restrictions have been lifted, so now you can use any paired URL structure you like regardless of whether you're in Transitional or Reader mode and irrespective of the template being viewed. By default the?amp=1
query param is used as the paired URL structure for new installs, but you can also use the/amp/
endpoint suffix for all paired URLs. You can even implement a totally custom structure, such as a subdomain or using a path prefix. See settings UI screenshots on the PR. https://github.com/ampproject/amp-wp/issues/2204, https://github.com/ampproject/amp-wp/pull/5558, https://github.com/ampproject/amp-wp/pull/4312, https://github.com/ampproject/amp-wp/issues/5861, https://github.com/ampproject/amp-wp/pull/5862, https://github.com/ampproject/amp-wp/issues/2062, https://github.com/ampproject/amp-wp/issues/3357 - Redesigned AMP Validation in Block Editor: Checking for validation issues is no longer performed synchronously during post updates, greatly speeding up the save process. When AMP validation errors are reported in the editor, previously they were displayed as inline warning notices with each block which had an AMP validation error. This was obtrusive and it could break the layout of nested blocks. These inline warnings have been eliminated in favor of showing all the validation information in an AMP Validation sidebar in the editor. A block toolbar button indicates when there is an error and provides a shortcut to open the sidebar. The validation errors in the sidebar provide much more information than the inline notices previously did, including the theme/plugin responsible for the error. AMP validation has also been removed from the Classic Editor. https://github.com/ampproject/amp-wp/issues/3821, https://github.com/ampproject/amp-wp/pull/5589, https://github.com/ampproject/amp-wp/pull/5929, https://github.com/ampproject/amp-wp/issues/2069, https://github.com/ampproject/amp-wp/pull/5741, https://github.com/ampproject/amp-wp/pull/5996
-
Hero Image Prerendering: To reduce the Largest Contentful Paint (LCP) metric, the AMP Optimizer now prerenders hero image(s). It will automatically detect the first image in the page to prerender, but you can manually designate which images should be prerendered by adding the
data-hero
attribute. For core themes there is a transformer which is tuned to automatically identify hero candidates among the header image, custom logo, featured image, initial cover block, and initial image block. This transformer will likely be enabled by default in the future once we've tested with more themes. https://github.com/ampproject/amp-wp/issues/5055, https://github.com/ampproject/amp-wp/pull/5350, https://github.com/ampproject/amp-wp/issues/5824, https://github.com/ampproject/amp-wp/issues/5923, https://github.com/ampproject/amp-wp/pull/5934 - Copying Validation Errors to Clipboard: When on the Validated URL screen, you can now copy to the clipboard the full JSON data for a validation error or all validation errors for a URL. This should greatly facilitate getting support. https://github.com/ampproject/amp-wp/issues/5209, https://github.com/ampproject/amp-wp/pull/5500, https://github.com/ampproject/amp-wp/issues/5825, https://github.com/ampproject/amp-wp/pull/5835
-
Deprecated/removed rarely-used AMP-specific settings: The block editor included various settings that controlled some low-level details of AMP, including whether an image got the
noloading
attribute or what AMPlayout
should be applied for a given block. These were just confusing for users and were not helpful, especially since they didn't apply to the non-AMP version of the page (which will no longer necessarily be the case with Bento AMP). For this reason, those settings as well as fit-text and AMP-specific blocks have been deprecated or removed. These features make more sense in ecosystem plugins; for example instead of anamp-mathml
block, users should rather use the AMP-compatible MathML Block plugin. Not all AMP-specific settings have been removed, for example the carousels or lightboxes on galleries, but they'll be revisited at a later date. Users of the editor should not need to know anything about AMP and they needn't see "AMP" mentioned anywhere unless they want those technical details. https://github.com/ampproject/amp-wp/issues/4554, https://github.com/ampproject/amp-wp/issues/4555, https://github.com/ampproject/amp-wp/issues/4556, https://github.com/ampproject/amp-wp/pull/5575, https://github.com/ampproject/amp-wp/pull/5573, https://github.com/ampproject/amp-wp/pull/5574
Again, these are some highlights. Additional bugfixes and enhancements have been made which will be detailed in subsequent changelogs. Some features not listed here include groundwork for site scanning features coming in v2.2.
Installation
You can also install the amp.zip
build linked below by uploading it in the WordPress admin.
To install as a Git submodule, consider 2.1.0-beta1-built.
For up-to-the-minute builds, see the Development Builds Wiki page.
1、 amp.zip 1.57MB