diff --git a/CHANGELOG.md b/CHANGELOG.md index a76a8f2..02a1d59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,5 @@ ### HEAD +* Add bundled docs * Update all templates to use [PHP Alternative Syntax](http://php.net/manual/en/control-structures.alternative-syntax.php) * Update to Bootstrap 2.1 * Add MIT License diff --git a/README.md b/README.md index 9d352b4..8c81160 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,16 @@ Roots is a starting WordPress theme made for developers that’s based on [HTML5 ## Installation * Clone the git repo - `git clone git://github.com/retlehs/roots.git` - or [download it](https://github.com/retlehs/roots/zipball/master) -* Read [Theme Activation](https://github.com/retlehs/roots/wiki/Theme-activation) to understand everything that happens once you activate Roots +* Reference the [theme activation](/retlehs/roots/blob/master/doc/activation.md) documentation to understand everything that happens once you activate Roots ## Configuration Edit `lib/config.php` to enable support for major functionality and to define constants that are used throughout the theme. +## Documentation + +Take a look at the [documentation table of contents](/retlehs/roots/blob/master/doc/README.md). + ## Features * HTML5 Boilerplate’s markup and `.htaccess` @@ -30,17 +34,15 @@ Everyone is welcome to help improve this project. There are several ways you can * Reporting issues (please read [issue guidelines](https://github.com/necolas/issue-guidelines)) * Suggesting new features -* Writing or editing [docs](https://github.com/retlehs/roots/wiki) +* Writing or editing [docs](/retlehs/roots/blob/master/doc/README.md) * Writing or refactoring code * Fixing [issues](https://github.com/retlehs/roots/issues) * Replying to questions on the [mailing list](http://groups.google.com/group/roots-theme) -* [Donating](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=4K7D3BCQZ4Z72&lc=US&item_name=Roots%20Theme¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted) ## Project information * Source: [https://github.com/retlehs/roots](https://github.com/retlehs/roots) * Web: [http://www.rootstheme.com/](http://www.rootstheme.com/) -* Docs: [https://github.com/retlehs/roots/wiki](https://github.com/retlehs/roots/wiki) * Mailing list: [http://groups.google.com/group/roots-theme](http://groups.google.com/group/roots-theme) * Twitter: [@retlehs](https://twitter.com/#!/retlehs) * Contributors: [https://github.com/retlehs/roots/contributors](https://github.com/retlehs/roots/contributors) \ No newline at end of file diff --git a/doc/README.md b/doc/README.md new file mode 100755 index 0000000..bd8eb41 --- /dev/null +++ b/doc/README.md @@ -0,0 +1,21 @@ +[Roots Theme homepage](http://www.rootstheme.com/) + +# Roots Theme documentation + +Roots is a starting WordPress theme made for developers that’s based on [HTML5 Boilerplate](http://html5boilerplate.com/) and [Bootstrap from Twitter](http://twitter.github.com/bootstrap/). + +## Getting started + +* [Usage](usage.md) — Overview of the project contents. +* [FAQ](faq.md) — Frequently asked questions, along with their answers. + +## The core of Roots +* [Theme library](lib.md) — A guide to the `lib/` directory which contains all of the theme functionality, including: [theme activation](activation.md), the [theme wrapper](wrapper.md), [clean up](cleanup.md), and [rewrites](rewrites.md). +* [Theme templates](templates.md) — A guide to the `templates/` directory which contains all of the theme templates. + +## Development + +* [Contributing to Roots](contribute.md) — Guidelines on how to + contribute effectively. +* [Extending and customizing Roots](extend.md) — Going further with + Roots. \ No newline at end of file diff --git a/doc/activation.md b/doc/activation.md new file mode 100644 index 0000000..f626413 --- /dev/null +++ b/doc/activation.md @@ -0,0 +1,28 @@ +[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation +table of contents](README.md) + +# Theme activation + +Theme activation is handled by `lib/activation.php`. + +After you activate Roots from the WordPress admin you'll be redirected to an activation options page where you can choose to: + +### Create static front page + +Create a page called Home and set it to be the static front page. This is normally handled from the Reading settings. + +### Change permalink structure + +Change permalink structure to `/%postname%/`. This is normally handled from the Permalinks settings. + +### Change uploads folder + +Change uploads folder to `/assets/` instead of `/wp-content/uploads/`. This is normally handled from the Media settings. + +### Create navigation menu + +Create the Primary Navigation menu and set the location. This is normally handled from the Menus section under Appearance. + +### Add pages to menu + +Add all published pages to the Primary Navigation. On a fresh install, this will add the new Home page and existing Sample Page to the navigation. diff --git a/doc/cleanup.md b/doc/cleanup.md new file mode 100644 index 0000000..541e05c --- /dev/null +++ b/doc/cleanup.md @@ -0,0 +1,88 @@ +[Roots Theme homepage](http://www.rootstheme.com/) | [Documentation +table of contents](README.md) + +# Clean up + +Clean up is handled by `lib/cleanup.php`. Major parts include: + +### wp_head() clean up + +1. Remove unnecessary ``'s +2. Remove inline CSS used by Recent Comments widget +3. Remove inline CSS used by posts with galleries +4. Remove self-closing tag and change `'`'s to `"`'s on `rel_canonical()` + +### Add and remove body_class() classes + +1. Add `top-navbar` class to `` if using Bootstrap's navbar (enabled in `lib/config.php`). Used to add styling in `app.css` to account for the WordPress admin bar. +2. Add post/page slug class to `` +3. Remove `page-template-default` class + +### Root relative URLs + +Root relative URLs are enabled from `lib/config.php`. + +Return URLs such as `/assets/css/app.css` instead of `http://example.com/assets/css/app.css`. + +### Wrap embedded media as suggested by Readability + +The [Readability article publishing guidelines](http://www.readability.com/developers/guidelines#publisher) suggest wrapping embedded media with a class of `entry-content-asset`. + +### Use HTML5 figure and figcaption for images with captions + +Any images that contain captions will be returned with `
` and `
` elements. They also get a `caption` class for additional styling from Bootstrap. + +### Clean up gallery_shortcode() + +The `[gallery]` shortcode has been re-created to use Bootstrap thumbnail styling. + +### Remove unnecessary dashboard widgets + +1. Remove Incoming Links +2. Remove Plugins +3. Remove WordPress Blog +4. Remove Other WordPress News + +### Clean up the_excerpt() + +The excerpt length is defined in `lib/config.php`. Excerpts are ended with anchor to the post and with "… Continued" instead of "[…]". + +### Cleaner walker for wp_nav_menu() + +Walker_Nav_Menu (WordPress default) example output: + +
  • Home
  • +
  • Sample PageHome
  • + + +If using the Bootstrap top navbar (enabled in `lib/config.php`), the proper markup is added to the items and the depth is restricted to 2 (Bootstrap doesn't support multi-level dropdowns). + +Instead of the many different active class varities that WordPress usually uses, only `active` is returned on active items. + +### Remove unnecessary self-closing tags + +Self-closing tags aren't necessary with HTML5. They're removed on: + +1. `get_avatar()` (``) +2. `comment_id_fields()` (``) +3. `post_thumbnail_html()` (``) + +### Don't return the default description in the RSS feed if it hasn't been changed + +If your site tagline is still `Just another WordPress site` then the description isn't returned in the feed. + +### Allow more tags in TinyMCE + +Allow `