|
| 1 | +# CD-theme |
1 | 2 |
|
2 | | -## !! Changes made to this Theme |
3 | | -See [docs/riot.md](/docs/riot.md) for specific instructions around customisations in this Theme |
4 | | - |
5 | | -# The Timber Starter Theme |
6 | | - |
7 | | -The "_s" for Timber: a dead-simple theme that you can build from. The primary purpose of this theme is to provide a file structure rather than a framework for markup or styles. Configure your Sass, scripts, and task runners however you would like! |
8 | | - |
9 | | -[](https://travis-ci.org/timber/starter-theme) |
| 3 | +See [docs/riot.md](/docs/riot.md) for specific instructions around |
| 4 | +customisations in this Theme |
10 | 5 |
|
11 | 6 | ## Installing the Theme |
12 | 7 |
|
13 | | -Install this theme as you would any other, and be sure the Timber plugin is activated. But hey, let's break it down into some bullets: |
| 8 | +1. Download the zip for this theme (or clone it) and move it to `wp-content/themes` |
| 9 | + in your WordPress installation. |
| 10 | +1. Run `composer install` to set up the theme and plugins |
| 11 | +1. Activate the theme in Appearance > Themes. |
| 12 | +1. Activate all the plugins |
| 13 | +1. Do your thing! And read [the docs](https://github.com/jarednova/timber/wiki). |
14 | 14 |
|
15 | | -1. Make sure you have installed the plugin for the [Timber Library](https://wordpress.org/plugins/timber-library/) (and Advanced Custom Fields - they [play quite nicely](https://github.com/jarednova/timber/wiki/ACF-Cookbook) together). |
16 | | -2. Download the zip for this theme (or clone it) and move it to `wp-content/themes` in your WordPress installation. |
17 | | -3. Rename the folder to something that makes sense for your website (generally no spaces and all lowercase). You could keep the name `timber-starter-theme` but the point of a starter theme is to make it your own! |
18 | | -4. Activate the theme in Appearance > Themes. |
19 | | -5. Do your thing! And read [the docs](https://github.com/jarednova/timber/wiki). |
| 15 | +## What's here |
20 | 16 |
|
21 | | -## What's here? |
| 17 | +`static/` is where you can keep your static front-end scripts, styles, or images. |
| 18 | +In other words, your Sass files, JS files, fonts, and SVGs would live here. |
22 | 19 |
|
23 | | -`static/` is where you can keep your static front-end scripts, styles, or images. In other words, your Sass files, JS files, fonts, and SVGs would live here. |
| 20 | +`templates/` contains all of your Twig templates. These pretty much correspond 1 |
| 21 | +to 1 with the PHP files that respond to the WordPress template hierarchy. At the |
| 22 | +end of each PHP template, you'll notice a `Timber::render()` function whose first |
| 23 | +parameter is the Twig file where that data (or `$context`) will be used. |
| 24 | +Just an FYI. |
24 | 25 |
|
25 | | -`templates/` contains all of your Twig templates. These pretty much correspond 1 to 1 with the PHP files that respond to the WordPress template hierarchy. At the end of each PHP template, you'll notice a `Timber::render()` function whose first parameter is the Twig file where that data (or `$context`) will be used. Just an FYI. |
| 26 | +`bin/` and `tests/` ... basically don't worry about (or remove) these unless you |
| 27 | +know what they are and want to. |
26 | 28 |
|
27 | | -`bin/` and `tests/` ... basically don't worry about (or remove) these unless you know what they are and want to. |
| 29 | +## Development |
| 30 | + |
| 31 | +Development is done with docker. To start the wordpress run |
| 32 | +`docker-compose up -d` and open `localhost:8008` |
28 | 33 |
|
29 | 34 | ## Other Resources |
30 | 35 |
|
31 | | -The [main Timber Wiki](https://github.com/jarednova/timber/wiki) is super great, so reference those often. Also, check out these articles and projects for more info: |
| 36 | +The [main Timber Wiki](https://github.com/jarednova/timber/wiki) is super great, |
| 37 | +so reference those often. Also, check out these articles and projects for more info: |
32 | 38 |
|
33 | | -* [This branch](https://github.com/laras126/timber-starter-theme/tree/tackle-box) of the starter theme has some more example code with ACF and a slightly different set up. |
| 39 | +* [This branch](https://github.com/laras126/timber-starter-theme/tree/tackle-box) |
| 40 | + of the starter theme has some more example code with ACF and a slightly |
| 41 | + different set up. |
34 | 42 | * [Twig for Timber Cheatsheet](http://notlaura.com/the-twig-for-timber-cheatsheet/) |
35 | | -* [Timber and Twig Reignited My Love for WordPress](https://css-tricks.com/timber-and-twig-reignited-my-love-for-wordpress/) on CSS-Tricks |
| 43 | +* [Timber and Twig Reignited My Love for WordPress](https://css-tricks.com/timber-and-twig-reignited-my-love-for-wordpress/) |
| 44 | + on CSS-Tricks |
36 | 45 | * [A real live Timber theme](https://github.com/laras126/yuling-theme). |
37 | | -* [Timber Video Tutorials](https://github.com/jarednova/timber/wiki/Video-Tutorials) and [an incomplete set of screencasts](https://www.youtube.com/playlist?list=PLuIlodXmVQ6pkqWyR6mtQ5gQZ6BrnuFx-) for building a Timber theme from scratch. |
38 | | - |
| 46 | +* [Timber Video Tutorials](https://github.com/jarednova/timber/wiki/Video-Tutorials) |
| 47 | + and [an incomplete set of screencasts](https://www.youtube.com/playlist?list=PLuIlodXmVQ6pkqWyR6mtQ5gQZ6BrnuFx-) |
| 48 | + for building a Timber theme from scratch. |
0 commit comments