Skip to content
This repository was archived by the owner on Dec 14, 2023. It is now read-only.

Commit 80b3cca

Browse files
committed
add docker container and user compsose to setup theme
1 parent b147e9d commit 80b3cca

File tree

11 files changed

+526
-72
lines changed

11 files changed

+526
-72
lines changed

.dockerignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Dockerfile
2+
docker-compose.yml
3+
.git
4+
.gitignore
5+
.DS_Store
6+
.DS_Store?
7+
._*
8+
.Spotlight-V100
9+
.Trashes
10+
ehthumbs.db
11+
Thumbs.db

.travis.yml

Lines changed: 0 additions & 19 deletions
This file was deleted.

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM wordpress:php7.1-fpm-alpine
2+
LABEL Maintainer="butlerx <[email protected]>"
3+
RUN apk --update --no-cache add curl && \
4+
rm /var/cache/apk/* && \
5+
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
6+
COPY [".", "/usr/src/wordpress/wp-content/themes/cd-theme"]
7+
WORKDIR /usr/src/wordpress/wp-content/themes/cd-theme
8+
RUN composer install && \
9+
chown -R www-data:www-data /usr/src/wordpress/wp-content/plugins/ /usr/src/wordpress/wp-content/themes/
10+
WORKDIR /var/www/html

README.md

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,48 @@
1+
# CD-theme
12

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-
[![Build Status](https://travis-ci.org/timber/starter-theme.svg)](https://travis-ci.org/timber/starter-theme)
3+
See [docs/riot.md](/docs/riot.md) for specific instructions around
4+
customisations in this Theme
105

116
## Installing the Theme
127

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).
1414

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
2016

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.
2219

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.
2425

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.
2628

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`
2833

2934
## Other Resources
3035

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:
3238

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.
3442
* [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
3645
* [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.

composer.json

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "upstatement/timber-starter-theme",
3-
"description": "Starter theme to build a Timber theme",
4-
"type":"wordpress-theme",
5-
"minimum-stability" : "stable",
2+
"name": "cd-theme",
3+
"description": "CoderDojo theme for wordpress",
4+
"type": "wordpress-theme",
5+
"minimum-stability": "stable",
66
"authors": [
7-
{
8-
"name": "jarednova",
9-
"email": "[email protected]"
10-
}
7+
{
8+
"name": "CoderDojo Foundation",
9+
"email": "[email protected]"
10+
}
1111
],
1212
"repositories": [
1313
{
@@ -16,14 +16,25 @@
1616
}
1717
],
1818
"extra": {
19-
"installer-paths": {
20-
"../../plugins/{$name}/": [
21-
"wpackagist-plugin/*",
22-
"type:wordpress-plugin"
23-
]
24-
}
25-
},
19+
"installer-paths": {
20+
"./plugins/{$name}/": ["wpackagist-plugin/*", "type:wordpress-plugin"]
21+
}
22+
},
2623
"require": {
27-
"wpackagist-plugin/timber-library": "0.22.*"
24+
"wpackagist-plugin/amazon-s3-and-cloudfront": "1.2",
25+
"wpackagist-plugin/antispam-bee": "2.7.1",
26+
"wpackagist-plugin/caldera-forms": "1.5.6.2",
27+
"wpackagist-plugin/cloudflare": "3.3.1",
28+
"wpackagist-plugin/custom-share-buttons-with-floating-sidebar": "3.3",
29+
"wpackagist-plugin/google-captcha": "1.32",
30+
"wpackagist-plugin/optimizely": "3.7.8",
31+
"wpackagist-plugin/pods": "2.6.11",
32+
"wpackagist-plugin/redirection": "2.8",
33+
"wpackagist-plugin/sucuri-scanner": "1.8.11",
34+
"wpackagist-plugin/tablepress": "1.8.1",
35+
"wpackagist-plugin/timber-library": "1.5.2",
36+
"wpackagist-plugin/wonderm00ns-simple-facebook-open-graph-tags": "2.1.3",
37+
"wpackagist-plugin/wordpress-importer": "0.6.3",
38+
"wpackagist-plugin/wp-mail-smtp": "0.10.1"
2839
}
2940
}

0 commit comments

Comments
 (0)