You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
3.0 KiB

  1. # [HTML5 Boilerplate](http://html5boilerplate.com/) skeleton for [DocPad](https://github.com/bevry/docpad)
  2. Bare essentials for building a modern website with best practices
  3. ## Why the fork?
  4. This fork adds [Grunt](http://gruntjs.com/) to show an example of taking the HTMLBP and minifying and concatenating all the JS and CSS assets into single files and including those in the layout.
  5. ## What is different?
  6. ### `grunt-config.json`
  7. - This file is contains the object passed to `grunt.initConfig` in `grunt.js`. It has been put into its own file since it is used in `docpad.coffee` to build file lists for inclusion in the layout and deleting unused files.
  8. ### `grunt.js`
  9. - This is the Grunt file. It runs `initConfig` with the `grunt-config.json` object. It also registers a `default` task with all the keys from the config file.
  10. ### `docpad.coffee`
  11. - I added the helper functions [`getGruntedStyles`]() and [`getGruntedScripts`](). These functions will return all the compiled assets that contain `.min.(css|js)` with the correct base path.
  12. - A [`writeAfter`]() DocPad event. It is based on [this gist](https://gist.github.com/3898915), with some additional functionality. It will run the `default` grunt command. Then it will use your `grunt-config.json` to delete the `src` files since they are no longer needed. It will also delete any empty directories in the 'out/' directory.
  13. ### `layouts/default.html.eco`
  14. - The script and style blocks have been replaced with calls to the helper functions described above.
  15. ## Getting Started
  16. 1. [Install DocPad](https://github.com/bevry/docpad)
  17. 1. Clone the project and run the server
  18. ``` bash
  19. git clone git://github.com/lukekarrys/html5-boilerplate.docpad.git
  20. cd html5-boilerplate.docpad
  21. npm install
  22. docpad run
  23. ```
  24. 1. [Open http://localhost:9778/](http://localhost:9778/)
  25. 1. Start hacking away by modifying the `src` directory
  26. ## License
  27. This skeleton is made ["public domain"](http://en.wikipedia.org/wiki/Public_domain) using the [Creative Commons Zero](http://creativecommons.org/publicdomain/zero/1.0/), as such before you publish your website you should place your desired license here and within the `LICENSE.md` file.
  28. If you are wanting to open-source your website, we suggest using the [Creative Commons Attribution License](http://creativecommons.org/licenses/by/3.0/) for content and the [MIT License](http://creativecommons.org/licenses/MIT/) for code. In which case you'd probably want to use the following as your license:
  29. Unless stated otherwise, all content is licensed under the [Creative Commons Attribution License](http://creativecommons.org/licenses/by/3.0/) and code licensed under the [MIT License](http://creativecommons.org/licenses/MIT/), © [Your Name](http://your.website)
  30. If you are wanting to close-source your website, we'd suggest using the following:
  31. Copyright [Your Name](http://your.website). All rights reserved.
  32. Other included things such as themes and libraries are likely already licensed by their own invidual licenses, so be sure to respect their licenses too.
  33. Thanks, the DocPad team loves you.