2021-03-26 12:33:37 +00:00
|
|
|
October CMS Webpack Theme Boilerplate
|
|
|
|
==========
|
|
|
|
|
2021-03-27 17:41:49 +00:00
|
|
|
This is a starter theme for October CMS that includes:
|
2021-03-26 12:33:37 +00:00
|
|
|
|
|
|
|
- Webpack (using Laravel Mix)
|
2021-03-27 17:41:49 +00:00
|
|
|
- PostCSS
|
2021-03-26 12:33:37 +00:00
|
|
|
|
|
|
|
To use it:
|
|
|
|
|
|
|
|
- [Install October CMS](https://octobercms.com/docs/setup/installation)
|
2021-03-27 17:41:49 +00:00
|
|
|
- Clone the repo in your theme directory
|
|
|
|
- Inside cloned directory run `npm install` (node_modules folder will be created)
|
2021-03-26 12:33:37 +00:00
|
|
|
- Install more packages using `npm install --save`
|
|
|
|
- Require your installed packages in src/js/app.js
|
2021-03-27 17:41:49 +00:00
|
|
|
- Modify the js and css files
|
2021-03-26 12:33:37 +00:00
|
|
|
- Run `npm run dev` (`npm run watch` to recompile when something changes)
|
|
|
|
- [Add new pages, partials, content files...](https://octobercms.com/docs/cms/themes)
|
|
|
|
|
|
|
|
When you are ready for production:
|
|
|
|
|
|
|
|
- Run `npm run prod`
|
|
|
|
|
|
|
|
## To add ajax framework
|
|
|
|
|
|
|
|
```sh
|
|
|
|
npm install jquery
|
|
|
|
```
|
|
|
|
|
|
|
|
Add framework tag to `layouts/default.htm`:
|
|
|
|
|
|
|
|
```
|
|
|
|
<script src="{{ this.layout.scripts }}"></script>
|
|
|
|
|
|
|
|
{% framework extras %}
|
|
|
|
|
|
|
|
{% scripts %}
|
|
|
|
```
|