Skip to content

Commit 331b7cc

Browse files
Boilerplate USAGE.md; Update README.md
1 parent e1c23c1 commit 331b7cc

File tree

3 files changed

+151
-8
lines changed

3 files changed

+151
-8
lines changed

README.md

+110
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Introduction
2+
3+
## Requirements
4+
5+
Make sure you have all these dependences installed before moving on:
6+
7+
- PHP >= 5.6
8+
- [Composer](https://getcomposer.org)
9+
- [Node.js](https://nodejs.org)
10+
11+
# Installation
12+
13+
## Creating new Theme
14+
15+
Create project via `composer create-project` composer command.
16+
17+
```bash
18+
$ composer create-project tonik/theme <theme-name>
19+
```
20+
21+
You can also directly download or clone repository to the `wp-content/themes` directory.
22+
23+
```bash
24+
# Clone repository to the <theme-name> folder.
25+
$ git clone [email protected]:tonik/theme.git <theme-name>
26+
```
27+
28+
## Resolving Dependences
29+
30+
Install backend dependeces and generate autoloading file.
31+
32+
```bash
33+
# Install composer dependences.
34+
$ composer install
35+
```
36+
37+
Install frontend dependences and task runner.
38+
39+
```bash
40+
# Install node dependences.
41+
$ npm install
42+
```
43+
44+
# Development
45+
46+
## Compiling Assets
47+
48+
Theme uses [Laravel Elixir](https://laravel.com/docs/5.3/elixir) to compile it's scripts and stylesheets. Files are generated to the `public` directory.
49+
50+
```bash
51+
# Run compile tasks.
52+
$ gulp
53+
54+
# Watch for file changes and rund compile tasks.
55+
$ gulp watch
56+
57+
# Compile assets for production.
58+
$ gulp --production
59+
```
60+
61+
## Folders and Files Structure
62+
63+
This starter theme introduces "easy to follow" folder structure, which enforce to divide your theme logic into components.
64+
65+
```
66+
theme
67+
├── bootstrap/
68+
├── config/
69+
│ ├── theme.php
70+
├── public/
71+
│ ├── js
72+
│ ├── css
73+
│ ├── images
74+
│ ├── fonts
75+
├── resources/
76+
│ ├── assets
77+
│ │ ├── js
78+
│ │ ├── sass
79+
│ ├── templates
80+
├── src/
81+
│ ├── Http/
82+
│ │ ├── ajaxes.php
83+
│ │ ├── assets.php
84+
│ ├── Setup/
85+
│ │ ├── actions.php
86+
│ │ ├── filters.php
87+
│ │ ├── navs.php
88+
│ │ ├── shortcodes.php
89+
│ │ ├── sidebars.php
90+
│ │ ├── supports.php
91+
│ │ ├── widgets.php
92+
│ ├── Structure/
93+
│ │ ├── posttypes.php
94+
│ │ ├── taxonomies.php
95+
│ ├── helpers.php
96+
├── 404.php
97+
├── composer.json
98+
├── footer.php
99+
├── functions.php
100+
├── gin
101+
├── header.php
102+
├── index.php
103+
├── package.json
104+
├── screenshot.png
105+
├── style.css
106+
```
107+
108+
## USAGE.md Boilerplate
109+
110+
[USAGE.md](https://github.com/tonik/theme/blob/master/USAGE.md) provides "How to use" guide for themes created with this starter. Remember to properly fill this file before finalising project. Your clients will be grateful.

USAGE.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Theme Installation and Usage
2+
3+
You should be familiar with command line to efficiently install this theme. Required is also a knowledge about [Composer](https://getcomposer.org) and other modern web development tools and workflows.
4+
5+
## Requirements
6+
7+
This theme follow WordPress [recommended requirments](https://wordpress.org/about/requirements). Your server must fulfill requirements:
8+
9+
- At least PHP >= 5.6 (PHP >= 7.0 is recommended)
10+
- WordPress 4.4
11+
12+
## Bootstraping Theme
13+
14+
Download or clone theme repository to the `wp-content/themes` directory.
15+
16+
```bash
17+
# @ /wp-content/themes
18+
# Clone repository to the themes folder.
19+
$ git clone [email protected]:<repository>/<theme-name>.git <theme-name>
20+
```
21+
22+
Go into theme directory and resolve Composer dependeces and generate autoloading file.
23+
24+
```bash
25+
# @ /wp-content/themes
26+
# Change directory to the cloned folder.
27+
$ cd <theme-name>
28+
29+
# @ /wp-content/themes/<theme-name>
30+
# Install required composer dependences (without these needed only to development).
31+
$ composer install -o --no-devs
32+
```
33+
34+
## Required Plugins
35+
36+
Here is list of theme's required plugins. They can be installed via "Plugins" dashboard or manualy uploaded to the `wp-content/plugins` directory.
37+
38+
- plugin-name ([plugin-url](#plugin-url))
39+
- ...

composer.json

+2-8
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@
55
"license": "GPL-2.0+",
66
"type": "wordpress-theme",
77
"require": {
8-
"php": ">=5.4",
9-
"tonik/gin": "@dev"
8+
"php": ">=5.6",
9+
"tonik/gin": "^1.0.0"
1010
},
1111
"require-dev": {
1212
"symfony/console": "~2.3|~3.0"
1313
},
14-
"repositories": [
15-
{
16-
"type": "vcs",
17-
"url": "/Users/jedrzejchalubek/Code/tonik/gin"
18-
}
19-
],
2014
"minimum-stability": "dev"
2115
}

0 commit comments

Comments
 (0)