Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mozmorris/slim-skeleton
A Slim skeleton app - uses Twig for templates, Sass for stylesheets
https://github.com/mozmorris/slim-skeleton
Last synced: 3 months ago
JSON representation
A Slim skeleton app - uses Twig for templates, Sass for stylesheets
- Host: GitHub
- URL: https://github.com/mozmorris/slim-skeleton
- Owner: mozmorris
- Created: 2013-01-19T14:35:53.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2015-08-13T11:36:00.000Z (over 9 years ago)
- Last Synced: 2024-04-18T05:21:55.638Z (9 months ago)
- Language: PHP
- Size: 162 KB
- Stars: 12
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
My [Slim](http://www.slimframework.com/) Skeleton App
====================This is my somewhat opinionated [Slim](http://www.slimframework.com/) skeleton app. It uses [my own fork](https://github.com/MozMorris/Slim/tree/webroot) of the Slim framework, [Twig](http://twig.sensiolabs.org/) for templating and [Sass](http://sass-lang.com/) for stylesheets.
## Installation
Assuming you've got Composer installed...
composer create-project moz-morris/slim-skeleton [app-name]
...replacing `[app-name]` with directory where the app will be generated. You can set your document root to that folder. Keep reading more some further explanation.
## Slim & Rewrites
The fork of Slim this app implements allows you to use rewrites to route requests to a subfolder whilst maintaining URLs that don't include the subfolder name. This method is supported by all of the other frameworks I've used. A little surprising then that Slim doesn't support this particular structure.
The app is set up so that you can point Apache at the root folder and with some .htaccess rewrites, all requests will be sent to the /public/ folder. I like this. It's useful when you're deploying to an environment where the document root can't be changed or perhaps you're looking to keep your web root as tidy as possible.
## Twig
I like the [Django](https://www.djangoproject.com/) template language and Twig is really similar. So, Twig templates it is. There's some config happening in `public/index.php` and the cached templates are written to `app/tmp`. You'll need to `chmod` that folder.
## Sass
Sass is awesome. It's even better with [Compass](http://compass-style.org/). There's a `config.rb` inside of the `public/sass` folder so it's ready and waiting for the `compass watch` command.