Projet

Général

Profil

Paste
Télécharger (2,44 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / themes / bootstrap / docs / subtheme / README.md @ 024de6ea

1
<!-- @file Instructions on how to sub-theme the Drupal Bootstrap base theme. -->
2
<!-- @defgroup -->
3
# Sub-Theming
4

    
5
- [Prerequisite](#prerequisite)
6
- [Setup](#setup)
7
  - [Choose an Existing Starterkit](#starterkit)
8
  - [Create a New Sub-theme](#create)
9
  - [Enable Your New Sub-theme](#enable)
10

    
11
## Prerequisite
12
Read the @link getting_started Getting Started @endlink topic.
13

    
14
---
15

    
16
## Setup
17
Below are instructions on how to create a [Drupal Bootstrap] based sub-theme.
18
There are several different variations on how to accomplish this task, but this
19
topic will focus on the two primarily and most common ways.
20

    
21
#### Choose an Existing Starterkit {#starterkit}
22

    
23
- @link subtheme_cdn CDN Starterkit @endlink - uses the "out-of-the-box"
24
  CSS and JavaScript files served by the [jsDelivr CDN].
25
- @link subtheme_less LESS Starterkit @endlink - uses the [Bootstrap Framework]
26
  [LESS] source files and a local [LESS] preprocessor.
27

    
28
#### Create a New Sub-theme {#create}
29

    
30
1. Copy over one of the starterkits you have chosen from the
31
   `./bootstrap/starterkits` folder into `sites/all/themes` or a respective
32
   `sites/*/themes` folder.
33
2. Rename the folder to a unique machine readable name. This will be your
34
   sub-theme's "name". For this example and future examples we'll use `subtheme`.
35
3. Rename `./subtheme/cdn.starterkit` or, if using the LESS Starterkit, `./subtheme/less.starterkit` to match the folder name and append
36
   `.info` (e.g. `./subtheme/subtheme.info`).
37
4. Open `./subtheme/subtheme.info` and change the name, description and any
38
   other properties to suite your needs.
39

    
40
{.alert.alert-warning} **WARNING:** Ensure that the `.starterkit` suffix is
41
not present on your sub-theme's `.info` filename. This suffix is simply a stop
42
gap measure to ensure that the bundled starter kit sub-theme cannot be enabled
43
or used directly. This helps people unfamiliar with Drupal avoid modifying the
44
starter kit sub-theme directly and instead forces them to create a new sub-theme
45
to modify.
46

    
47
#### Enable Your New Sub-theme {#enable}
48
In your Drupal site, navigate to `admin/appearance` and click the `Enable and
49
set default` link next to your newly created sub-theme.
50

    
51
---
52

    
53
{.alert.alert-info} Please refer to [Choose an Existing Starterkit](#starterkit)
54
for additional documentation pertaining to the chosen Starterkit.
55

    
56
[Drupal Bootstrap]: https://www.drupal.org/project/bootstrap
57
[Bootstrap Framework]: http://getbootstrap.com
58
[jsDelivr CDN]: http://www.jsdelivr.com
59
[LESS]: http://lesscss.org