wordpress框架
A couple of weeks ago we published an excerpt of Build Your Own Wicked WordPress Themes, in which we talked about some theme frameworks to use for speedy theme development. Since the book was originally published, we’ve seen even more theme frameworks arise, each with their own strong points and features. One of my favourite new finds is Roots, a starter theme created by Denver-based developer Ben Word. And whether you’re a grizzled old WordPress veteran or a fresh-faced new theme recruit, I bet there’ll be a feature or two that will put a smile on your face. Let’s take a look at what’s inside.
几周前,我们发布了Build Your Owned WordPress Themes的摘录,其中讨论了一些可用于快速主题开发的主题框架。 自从这本书最初出版以来,我们已经看到了更多的主题框架出现,每个主题框架都有自己的长处和功能。 我最喜欢的新发现之一是Roots ,这是由位于丹佛的开发人员Ben Word创建的入门主题。 而且,无论您是老字号的WordPress老手还是新面Kong的新手,我敢打赌,都会有一个或两个功能可以使您的脸上露出微笑。 让我们看看里面有什么。
What are the, er, roots of Roots? It’s based on a combination of the HTML5 Boilerplate project, Elliot Jay Stocks’ Starkers theme, and your choice of the Blueprint or 960.gs style frameworks—plus there’s a dash of the developers’ own secret sauce to boot. If you’re unfamiliar with these projects, here’s a quick breakdown:
根的根是什么? 它基于HTML5 Boilerplate项目 ,Elliot Jay Stocks的Starkers主题以及您选择的Blueprint或960.gs样式框架的结合,此外,还有一些开发人员自己的秘密工具可以启动。 如果您不熟悉这些项目,以下是快速细分:
The HTML5 Boilerplate proclaims happily that it’s a “rock-solid default for HTML 5 awesome”—or, basically, a template full of defaults for best practice HTML5 development. Every bell and whistle is rung and blown here, but there’s still room for supporting older browsers.
HTML5 Boilerplate高兴地宣称这是“ HTML 5 出色的坚如磐石的默认设置”,或者说,基本上是一个模板,其中包含用于最佳实践HTML5开发的默认设置。 每一个钟声都在这里响起,但仍有支持旧版本浏览器的空间。
Starkers provides a strong, plain theme to use as a basis for your own development—all the functionality with none of the presentational fluff. It’s been a themer’s favourite for some time.
Starkers提供了一个强大而朴素的主题,可以用作您自己开发的基础-所有功能都不会表现出来。 一段时间以来,它一直是themer的最爱。
The 960 and Blueprint CSS frameworks provide a strong grid-based layout system that work in even the most stubborn old browsers, and let you create anything from the most pedestrian bunch of columns to a slick magazine layout. When you use Roots, just pick the one you like best. We’ve learned about the benefits of these, and other frameworks, in a previous article.
960和Blueprint CSS框架提供了一个强大的基于网格的布局系统,即使在最顽固的旧浏览器中也可以使用,并且使您可以创建从行列最繁琐的列到光滑的杂志版面的任何内容。 使用根时,只需选择最喜欢的根。 在上一篇文章中,我们已经了解了这些框架和其他框架的好处。
Here are some of the improvements Roots makes to WordPress’ default output, and some of the ways in which it helps you as a theme developer.
以下是Roots对WordPress默认输出所做的一些改进,以及一些可以帮助您成为主题开发人员的方法。
Activating the theme creates some sample content and pages for you—for this reason, it’s best to start using it on a brand new site. 激活主题会为您创建一些示例内容和页面,因此,最好在全新的网站上开始使用它。Posts’ markup includes support for the hNews microformat, for juicy, semantic blogging.
帖子的标记包括对hNews微格式的支持,用于多汁的语义博客。
URLs for search results are rewritten to look less WordPressy, which may have some benefits for SEO. 搜索结果的URL被重写以减少WordPressy的外观,这可能对SEO有一些好处。URLs to items in the wp-content folder are rewritten to appear at the root of the site, disguising any WordPress-specific URL cruft.
wp-content文件夹中项目的URL被重写以显示在网站的根目录,从而掩盖了所有WordPress特定的URL残骸。
The theme’s robots.txt file is already set up according to the WordPress team’s SEO recommendations, meaning it’s all ready to disallow access to the themes, plugins, and includes folders.
已经根据WordPress团队的SEO建议设置了主题的robots.txt文件,这意味着它们已经准备好禁止访问themes , plugins和includes文件夹。
The built-in gallery functionality will use HTML5’s figure and figcaption elements.
内置的图库功能将使用HTML5的figure和figcaption元素。
There’s a small admin panel that allows you to perform some basic setup for Twitter and Google Analytics, as well as make some rudimentary layout choices. Of course, since this theme is for developers, this is hardly as comprehensive as a pro-blogger’s paid theme, but it’s a great basis for your own purposes. 有一个小的管理面板,可让您执行Twitter和Google Analytics(分析)的一些基本设置,以及进行一些基本的布局选择。 当然,由于此主题是针对开发人员的,因此它几乎不像专业博客的付费主题那么全面,但这是您自己的理想基础。In the excerpt we posted, we talked about how to decide what framework suits you best. To my thinking, Roots is a great example of the kind of features you should be looking for if you’re seeking out a framework. It’s up to date with today’s best development advice, it’s based on tried and tested projects that many developers will already be familiar with, and it’s been designed with speed and ease in mind—perfect for those of us who like to make it out of the office on time while still doing a great job. There’s a growing collection of documentation, and a glance at the project’s GitHub repository shows frequent updates to both the code and the manuals. A criticism of some theme frameworks can sometimes be that sites made with it have that cookie-cutter feel, but Roots’ gallery shows off a wide variety of layouts and looks—just bring your creativity and start hacking away!
在我们发布的摘录中,我们讨论了如何决定最适合您的框架。 在我看来,Roots是一个很好的例子,说明了您在寻找框架时应该寻找的功能。 最新的最佳开发建议是最新的,它基于许多开发人员已经熟悉的久经考验的项目,并且设计时考虑了速度和便捷性,对于那些希望从中脱颖而出的人来说,这是完美的准时上班,同时仍然做得很好。 越来越多的文档收集,对项目的GitHub存储库的浏览一目了然,显示了代码和手册的频繁更新。 对某些主题框架的批评有时可能是使用它制作的网站具有切刀的感觉,但是Roots的画廊展示了各种各样的布局和外观-只是带出您的创造力并开始黑客入侵!
If you’re looking for a super-modern WordPress theme framework, to learn about WordPress development, or if you’re ready to start using HTML 5 in your WordPress projects, consider adding Roots to your list. It’s a strong contender for my next project!
如果您正在寻找一个超现代的WordPress主题框架,以了解WordPress开发,或者准备在WordPress项目中开始使用HTML 5,请考虑将Roots添加到列表中。 这是我下一个项目的有力竞争者!
翻译自: https://www.sitepoint.com/roots-a-html5-wordpress-theme-framework/
wordpress框架
相关资源:Wordpress-EddBettr商业主题分享-HTML5开发-全屏自适应-带会员中心+商城