mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #367 from silverstripe-big-o/simple-theme-installer-integration
Simple theme installer integration
This commit is contained in:
commit
f1e156faee
@ -53,7 +53,7 @@ class SS_TemplateManifest {
|
||||
* ),
|
||||
* 'page' => array(
|
||||
* 'themes' => array(
|
||||
* 'blackcandy' => array(
|
||||
* 'simple' => array(
|
||||
* 'main' => '/path/to/theme/Page.ss'
|
||||
* 'Layout' => '/path/to/theme/Layout/Page.ss'
|
||||
* )
|
||||
|
@ -65,54 +65,45 @@ If you don't use version control, we recommend that you stick to the official [s
|
||||
or the [latest release](https://github.com/silverstripe/silverstripe-installer/zipball/2.4).
|
||||
* Add and commit the files to your repository
|
||||
|
||||
### Step 2: Getting the required modules ###
|
||||
### Step 2: Installing phing with git version control support ###
|
||||
|
||||
Run the following command to download all core dependencies via [Piston](http://piston.rubyforge.org):
|
||||
Run the following commands to install the Phing build system:
|
||||
|
||||
cd my-silverstripe-project/
|
||||
tools/new-project
|
||||
sudo pear install phing
|
||||
sudo pear install VersionControl_Git-0.4.4
|
||||
|
||||
### Step 3: Getting the required modules ###
|
||||
|
||||
Run the following command to download all core dependencies using [Phing](http://www.phing.info/):
|
||||
|
||||
phing update_modules
|
||||
|
||||
This will add `framework`, `cms` and the `simple` theme to your project.
|
||||
|
||||
As a fallback solution, you can simply download all necessary files without any dependency management through piston.
|
||||
This is handy if you have an existing project in version control, and want a one-off snapshot
|
||||
of the modules. The only way to update this codebase later is to overwrite the whole folder, with no easy way to track and re-apply any changes made to it since.
|
||||
### Step 4: Committing the modules ###
|
||||
|
||||
cd my-silverstripe-project/
|
||||
tools/new-project -m flat
|
||||
|
||||
<div class="notice" markdown="1">
|
||||
The `tools` scripts are just getting you started - to maintain your installation,
|
||||
you will need to learn how to add and update modules via the `git` commandline utility.
|
||||
</div>
|
||||
|
||||
### Step 3: Committing the modules ###
|
||||
|
||||
Regardless of using Piston or not, all files in your project will be unversioned,
|
||||
Some files in your project will be unversioned after running the Phing script
|
||||
and need to be added to your own repository. The commands depend on your repository type:
|
||||
|
||||
# for subversion
|
||||
cd my-silverstripe-project/
|
||||
svn add *
|
||||
svn commit -m "adding dependencies"
|
||||
svn commit -m "adding configuration files generated by phing"
|
||||
|
||||
# for git
|
||||
cd my-silverstripe-project/
|
||||
git add *
|
||||
git commit -m "adding dependencies"
|
||||
git commit -m "adding configuration files generated by phing"
|
||||
|
||||
### Step 4: Switch branches ###
|
||||
### Step 5: Switch branches ###
|
||||
|
||||
The `tools/new-project` script doesn't allow you to switch branches easily,
|
||||
it is designed as a helper to get you started. The script is based on a `template.php`
|
||||
located in `tools/lib/template.php`. To switch branches (before running the script),
|
||||
create your own `template.php` and adjust the paths:
|
||||
The Phing script makes it easy to switch branches and/or modules. Just edit the `dependent-modules` file in
|
||||
your project's root folder. This file contains documentation about how to specify which modules (and which branches)
|
||||
you want to include in the project. After updating the file run the `phing update_modules` command again.
|
||||
|
||||
`tools/new-project --template /path/to/template.php`
|
||||
Note: Phing can do some more useful things. Run `phing help` to see everything you can do with it.
|
||||
|
||||
If your project is managed by piston, you can run a `piston import --force` to switch branches.
|
||||
|
||||
### Step 5: Running the web-based installer ###
|
||||
### Step 6: Running the web-based installer ###
|
||||
|
||||
You can now run through the web-based installer for your operating system of choice ([instructions](/installation)).
|
||||
|
||||
|
@ -29,10 +29,9 @@ existing modules or the directories lists in "Core Structure".
|
||||
|
||||
## Themes Structure
|
||||
|
||||
| `themes/blackcandy/` | Standard "blackcandy" theme |
|
||||
| `themes/simple/` | Standard "simple" theme |
|
||||
| ------------------ | --------------------------- |
|
||||
| `themes/blackcandy_blog/` | Theme additions for the blog module |
|
||||
| `themes/yourtheme/` | The themes folder can contain more than one theme - here's your own |
|
||||
| `themes/yourtheme/` | The themes folder can contain more than one theme - here's your own |
|
||||
|
||||
|
||||
See [themes](/topics/themes)
|
||||
|
@ -19,7 +19,7 @@ is an MVC framework!
|
||||
|
||||
To start your theme you first need to create the basic folder structure for the theme. Check out the image below for the
|
||||
layout of your folders. First you need to create a folder in the themes directory called the name of your theme (we're
|
||||
using "blackcandy"). Please note that underscores in the theme name are reserved to denote "sub-themes" (e.g.
|
||||
using "simple"). Please note that underscores in the theme name are reserved to denote "sub-themes" (e.g.
|
||||
"blackcandy_blog").
|
||||
|
||||
![themes:basicfilestructure.gif](_images/basicfilestructure.gif)
|
||||
@ -236,7 +236,7 @@ The templating system will search for the appropriate files in the following ord
|
||||
3. module (eg blog)
|
||||
|
||||
So if, for example, you had a typography.css file for a module in the module folder (eg blog/css/), in the theme module
|
||||
directory (eg themes/blackcandy_blog/css/), and in your site folder (eg mysite/css/), the system would use the file
|
||||
directory (eg themes/simple/css/), and in your site folder (eg mysite/css/), the system would use the file
|
||||
mysite/css/typography.css
|
||||
|
||||
<div class="notice" markdown='1'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user