wordpress 古腾堡
This article on Gutenberg was originally published by Torque Magazine, and is reproduced here with permission.
有关古腾堡(Gutenberg)的文章最初由《扭矩杂志》(Torque Magazine)出版,经许可转载于此。
One of the biggest changes to WordPress ever is coming soon. Are you ready? How can you prepare? Why is WordPress making this change anyway? These questions and many more have been flying around the WordPress space for nearly a year since the new Gutenberg editor was announced by Matt Mullenweg in Summer of 2017 and with good reason. Many developers have concerns, namely around backward compatibility. Read on to learn how Gutenberg will affect your existing site.
WordPress的最大变化之一即将到来。 你准备好了吗? 你要如何准备? WordPress为什么仍要进行此更改? 自2017年夏季Matt Mattlenweg宣布新的古腾堡编辑器以来,这些问题以及更多问题已经在WordPress空间中流传了近一年,这是有充分理由的。 许多开发人员都担心,即与向后兼容性有关。 继续阅读以了解古腾堡将如何影响您现有的网站。
For those who have not yet heard, Gutenberg is the nickname given to a new Editor for the WordPress Admin interface. This is big news because while many things about WordPress have changed since its birth, the editor has remained a fairly basic visual and HTML user experience. As a result, plugin and theme developers created add-ons and new functionality for the editor to fill their needs. This caused developers and many websites to become heavily dependent on shortcodes. WordPress is creating a more unified experience between what users create in the backend, and what displays on the front end. In this way, they are baking in some of the functionality so many users find “essential,” and particularly the functionality non-technical users need.
对于尚未听说过的人,古腾堡是WordPress Admin界面的新编辑者的昵称。 这是个大新闻,因为自WordPress诞生以来,有关WordPress的许多事情已经发生了变化,但编辑器仍然是相当基本的视觉和HTML用户体验。 结果,插件和主题开发人员创建了加载项和新功能,以使编辑器可以满足他们的需求。 这导致开发人员和许多网站严重依赖短代码。 WordPress正在用户在后端创建的内容与前端显示的内容之间创建更加统一的体验。 通过这种方式,他们烘焙了许多功能,因此许多用户发现“基本”,特别是非技术用户需要的功能。
The other rift that grew deeper with time was that what an editor sees on the back-end did not necessarily represent what displayed on the front-end. As plugins and themes began integrating page builders and drag-and-drop components for ease of use, WordPress remained a plain text editor by default. Gutenberg solves for this disconnect as well. Not only does it make the editing experience more natural and fun, it also more accurately represents what will show on the front-end–a true “what you see is what you get” experience. It divides text, images, media, and more into building “blocks” which make up your pages.
随着时间的推移,另一个越来越深的裂痕是编辑者在后端看到的内容不一定代表前端显示的内容。 随着插件和主题开始集成页面构建器和拖放组件以使其易于使用,默认情况下WordPress仍然是纯文本编辑器。 古腾堡也解决了这种脱节问题。 它不仅使编辑体验更加自然和有趣,而且还可以更准确地表示前端显示的内容–真正的“所见即所得”体验。 它将文本,图像,媒体等细分为组成页面的“块”。
The foundation of Gutenberg is a concept of “blocks.” You can edit classic content sections in fun new ways like adding highlights and background colors, easy resizing, and easy wrapping and embedding of classic elements like photo and video. This means for other items users might embed in a page, these elements have custom blocks. You can add a block for a contact form, a tweet, block quotes, and more. The purpose of blocks was to bring a sense of continuity and regularity to the way different types of content were created. With one uniform way to create a block, even if your end goal for functionality is vastly different from others, there is a known “WordPress way” to create the code for it, which inherently helps the security and scalability of the platform as a whole.
古腾堡的基础是“街区”的概念。 您可以通过有趣的新方式编辑经典内容部分,例如添加突出显示和背景色,轻松调整大小以及轻松包装和嵌入照片和视频等经典元素。 这意味着对于用户可能嵌入页面的其他项目,这些元素具有自定义块。 您可以为联系表格,推文,框引号等添加框。 块的目的是使创建不同类型的内容的方式具有连续性和规律性。 通过一种统一的方式来创建块,即使您的功能最终目标与其他目标大不相同,也存在一种已知的“ WordPress方式”为其创建代码,这从本质上帮助了整个平台的安全性和可扩展性。
Okay, so Gutenberg will really help new users with new websites have a better experience. What about my existing posts and pages? Is this going to break things? There’s a lot of panic around the community surrounding backward compatibility with their existing posts. The nice thing about Gutenberg, as Matias Ventura aptly put it, is that it does not intend to completely replace the old–everything you have and use today will still work–but instead to gradually shape behavior and development with the new.
好的,因此古腾堡(Gutenberg)确实可以帮助新用户使用新网站获得更好的体验。 我现有的帖子和页面如何处理? 这会破坏事情吗? 围绕着与现有帖子的向后兼容性,社区引起了很多恐慌。 正如Matias Ventura恰当地指出的那样,古腾堡(Gutenberg)的好处在于,它并不打算完全替代旧的东西-您今天拥有和使用的一切仍然可以使用-而是逐步地用新的东西塑造行为和发展。
What does that mean, exactly?
到底是什么意思?
Shortcodes still work as they do today
简码仍然像今天一样运作
Existing posts still exist exactly as they do today 现有帖子仍然像今天一样存在 All functionality of the old editor is retained in the new editor 旧编辑器的所有功能都保留在新编辑器中Page builders still work, although their functionality may be partially duplicated in Gutenberg
页面构建器仍然可以使用 ,尽管其功能可能在古腾堡中有部分重复
Remember: the thought behind it all is, simply put, you shouldn’t have to download an extra plugin or premium theme for functionality that nearly every user can agree is “essential” to the WordPress experience.
记住:简单地说,所有这些背后的想法是,您不必下载额外的插件或高级主题,而几乎每个用户都可以接受的功能对于WordPress体验是“必不可少的”。
With Gutenberg slated for release in WordPress 5.0, and WordPress 4.9.4 having shipped already, the deadline is certainly imminent: WordPress 5.0 is likely to land in the coming months. This has people wondering how best to prepare, and we certainly understand why. You can rest easy knowing these options and features are available:
随着古腾堡(Gutenberg)计划在WordPress 5.0中发布,并且WordPress 4.9.4已经发布,最后期限肯定迫在眉睫:WordPress 5.0可能在未来几个月内登陆。 这使人们想知道如何最好地准备,我们当然知道为什么。 您可以放心知道这些选项和功能可用:
Firstly, your existing pages and posts will be converted to Gutenberg using the “Classic” block. This allows them to exist and display just as they do today without any manual intervention.
首先,将使用“经典”块将您现有的页面和帖子转换为古腾堡。 这样一来,它们就可以像今天一样存在和显示,而无需任何人工干预。
Second, if you edit an existing page or post and anything unexpected happens, you can easily restore using a plugin. 其次,如果您编辑现有页面或帖子,并且发生任何意外情况,则可以使用插件轻松还原。Third, if you simply prefer the legacy editing experience, you can download the Classic Editor plugin to revert back to the editor you want.
第三,如果您只喜欢传统的编辑体验,则可以下载Classic Editor插件以恢复为所需的编辑器。
Gutenberg is exciting because of the uniformity, security, and the better user experience it brings to WordPress. Given the fact that much of the code is changing, and all the various ways people use WordPress, our team highly recommends you copy to your staging environment and download the Gutenberg plugin to test it there before Gutenberg is released as the primary editor. There are workarounds, like the plugin mentioned above. But we encourage everyone to give Gutenberg a try first. The Gutenberg plugin has been through nearly 30 releases and patches since its initial release in June of 2017, so naturally, there has been some evolution for compatibility and usability. This also means if you tried it before and were not a fan, you should probably try it again and see how it has changed. And, if you are a developer, you should take a look at the Gutenberg handbook to start adapting in creative and fun new ways.
古腾堡之所以激动人心,是因为它为WordPress带来了统一性,安全性以及更好的用户体验。 考虑到许多代码都在变化,并且人们使用WordPress的方式多种多样,我们的团队强烈建议您将其复制到暂存环境中,然后下载Gutenberg插件在此处进行测试,然后再将Gutenberg发布为主要编辑器。 有一些解决方法,例如上述插件。 但是我们鼓励大家先尝试古腾堡。 自2017年6月首次发布以来,Gutenberg插件已经历了近30个发行版和补丁程序,因此自然而然地出现了兼容性和可用性方面的一些演变。 这也意味着,如果您以前尝试过并且不喜欢它,则可能应该再次尝试并查看其变化。 而且,如果您是开发人员,则应该阅读古腾堡(Gutenberg)手册 ,以创新和有趣的新方式开始适应。
The entire WordPress community has rallied around this project to help ensure its success, and the result is impressive! If you encounter any scenarios that cause concern while testing, this is your opportunity to give back to the WordPress community by contributing your thoughts, voice, and even developer skills to the Gutenberg cause to help make it even better. And if you encounter any issues in testing, please report them! The Gutenberg team is eager for feedback to help ensure all issues are addressed. The open source nature of WordPress means a thriving worldwide community of developers is heavily invested in making a successful editor that works for everyone.
整个WordPress社区都围绕该项目聚集在一起,以帮助确保其成功,其结果令人印象深刻! 如果您在测试过程中遇到任何引起关注的场景,这是您通过向Gutenberg事业贡献您的想法,声音甚至开发人员技能来回馈WordPress社区的机会,以使其变得更好。 如果您在测试中遇到任何问题,请报告 ! 古腾堡团队渴望获得反馈,以帮助确保解决所有问题。 WordPress的开放源代码性质意味着蓬勃发展的全球开发人员社区投入了大量资金,以打造一个适合所有人的成功编辑器。
翻译自: https://www.sitepoint.com/getting-ahead-of-gutenberg/
wordpress 古腾堡