dev-master
9999999-devBoiler Plate for SilverStripe based off of HTML5 Boiler Plate as well as other best practices.
MIT
The Requires
by Joe Madde
boilerplate silverstripe html5
Boiler Plate for SilverStripe based off of HTML5 Boiler Plate as well as other best practices.
Boiler Plate setup of SilverStripe configured with best practices in mind., (*1)
This is loosely based off of the HTML5 Boiler Plate and provides a blank skeleton for you to start rapidly developing your site., (*2)
Clone Repository or with Composer, (*3)
"require" : { "moosylvania/moosylvania-silverstripe-boiler-plate":"dev-master" }
Edit /mysite/_config.php and, (*4)
One benefit of this boilerplate is we have setup auto concatenation and minification of your css and js files based off of each page type., (*5)
On the init function of your custom Page types controller, example HomePage - you would add the following, (*6)
$this->addCss(array('cssfileone', 'cssfiletwo')); $this->addJs(array('jsfileone', jsfiletwo));
In the example above cssfileone would be the name of a css file in /themes/mytheme/css without the .css. jsfileone would be a file located in /themes/mytheme/js/ without the .js extension, (*7)
As a note, if you are using a different theme name the project will detect that and use the custom theme to locate the css and js files., (*8)
Lastly if you are running the site in 'Dev' mode - the files will not be concatenated or minified making it easier to debug., (*9)
Simply update /themes/mytheme/js/ga.js with your proper UA number, this is automatically included on every page., (*10)
This is automatically included via /themes/mytheme/js/SocialScripts.js. You can remove this from being included by changing your Page.php file, (*11)
Should you choose to use Sass, we have a Sass folder under /themes/mytheme. When creating your Sass sheets, I would create a new file for each Page Type. Then when compiling, have the output go to /themes/mytheme/css, (*12)
When doing this you will be able to use the CSS minification and concatenation features already built into the site., (*13)
In the .htaccess file on lines 579-583, you will want to update the domain.com domain to your production site domain. This will then serve up a proper robots.txt file when your site is in production., (*14)
Boiler Plate for SilverStripe based off of HTML5 Boiler Plate as well as other best practices.
MIT
boilerplate silverstripe html5