Rename config.php to setup.php
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
### HEAD
|
### HEAD
|
||||||
|
* Rename config.php to setup.php ([#1556](https://github.com/roots/sage/pull/1556))
|
||||||
* Move init.php to config.php ([#1555](https://github.com/roots/sage/pull/1555))
|
* Move init.php to config.php ([#1555](https://github.com/roots/sage/pull/1555))
|
||||||
* Use Sass to style search form, remove search template ([#1545](https://github.com/roots/sage/pull/1545))
|
* Use Sass to style search form, remove search template ([#1545](https://github.com/roots/sage/pull/1545))
|
||||||
* Remove Modernizr ([#1541](https://github.com/roots/sage/pull/1541))
|
* Remove Modernizr ([#1541](https://github.com/roots/sage/pull/1541))
|
||||||
|
|||||||
@@ -43,13 +43,13 @@ Install the [Soil](https://github.com/roots/soil) plugin to enable additional fe
|
|||||||
* Google CDN jQuery snippet from [HTML5 Boilerplate](http://html5boilerplate.com/)
|
* Google CDN jQuery snippet from [HTML5 Boilerplate](http://html5boilerplate.com/)
|
||||||
* Google Analytics snippet from [HTML5 Boilerplate](http://html5boilerplate.com/)
|
* Google Analytics snippet from [HTML5 Boilerplate](http://html5boilerplate.com/)
|
||||||
|
|
||||||
## Installation
|
## Theme installation
|
||||||
|
|
||||||
Clone the git repo - `git clone https://github.com/roots/sage.git` and then rename the directory to the name of your theme or website.
|
Clone the git repo - `git clone https://github.com/roots/sage.git` and then rename the directory to the name of your theme or website.
|
||||||
|
|
||||||
## Configuration
|
## Theme setup
|
||||||
|
|
||||||
Edit `lib/config.php` to enable or disable theme features, setup navigation menus, post thumbnail sizes, post formats, and sidebars.
|
Edit `lib/setup.php` to enable or disable theme features, setup navigation menus, post thumbnail sizes, post formats, and sidebars.
|
||||||
|
|
||||||
## Theme development
|
## Theme development
|
||||||
|
|
||||||
|
|||||||
4
base.php
4
base.php
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Roots\Sage\Config;
|
use Roots\Sage\Setup;
|
||||||
use Roots\Sage\Wrapper;
|
use Roots\Sage\Wrapper;
|
||||||
|
|
||||||
?>
|
?>
|
||||||
@@ -23,7 +23,7 @@ use Roots\Sage\Wrapper;
|
|||||||
<main class="main">
|
<main class="main">
|
||||||
<?php include Wrapper\template_path(); ?>
|
<?php include Wrapper\template_path(); ?>
|
||||||
</main><!-- /.main -->
|
</main><!-- /.main -->
|
||||||
<?php if (Config\display_sidebar()) : ?>
|
<?php if (Setup\display_sidebar()) : ?>
|
||||||
<aside class="sidebar">
|
<aside class="sidebar">
|
||||||
<?php include Wrapper\sidebar_path(); ?>
|
<?php include Wrapper\sidebar_path(); ?>
|
||||||
</aside><!-- /.sidebar -->
|
</aside><!-- /.sidebar -->
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
*/
|
*/
|
||||||
$sage_includes = [
|
$sage_includes = [
|
||||||
'lib/assets.php', // Scripts and stylesheets
|
'lib/assets.php', // Scripts and stylesheets
|
||||||
'lib/config.php', // Configuration
|
|
||||||
'lib/extras.php', // Custom functions
|
'lib/extras.php', // Custom functions
|
||||||
|
'lib/setup.php', // Theme setup
|
||||||
'lib/titles.php', // Page titles
|
'lib/titles.php', // Page titles
|
||||||
'lib/wrapper.php' // Theme wrapper class
|
'lib/wrapper.php' // Theme wrapper class
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
namespace Roots\Sage\Extras;
|
namespace Roots\Sage\Extras;
|
||||||
|
|
||||||
use Roots\Sage\Config;
|
use Roots\Sage\Setup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add <body> classes
|
* Add <body> classes
|
||||||
@@ -16,7 +16,7 @@ function body_class($classes) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add class if sidebar is active
|
// Add class if sidebar is active
|
||||||
if (Config\display_sidebar()) {
|
if (Setup\display_sidebar()) {
|
||||||
$classes[] = 'sidebar-primary';
|
$classes[] = 'sidebar-primary';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Roots\Sage\Config;
|
namespace Roots\Sage\Setup;
|
||||||
|
|
||||||
use Roots\Sage\Assets;
|
use Roots\Sage\Assets;
|
||||||
|
|
||||||
Reference in New Issue
Block a user