Wednesday, April 29, 2015

Building a Static Site Generator Grunt Plugin

You’ve probably heard of static site generators like Jekyll and Wintersmith before, and you may even have used them. But you may be surprised that it isn't overly difficult to write your own static site generator.

In this tutorial, I’ll show you how to build your own Grunt plugin that will generate a static site for you from templates and Markdown files. You can then use it in conjunction with whatever other Grunt plugins you wish to create your static site.

Why use Grunt?

You may ask, Why use Grunt for this?

  • If nothing else, this will be a good way to learn how to create your own Grunt tasks.
  • It provides access to Grunt’s API, which simplifies a lot of tasks.
  • Building this as a Grunt plugin provides a lot of flexibility — you can use it with other Grunt plugins to get exactly the workflow you want. For instance, you can choose whatever CSS preprocessor you want, or you can deploy via Rsync or to Github Pages by changing the other plugins you use and amending the configuration. Our plugin will only need to take the Markdown files and templates and generate the HTML.
  • You can easily add additional functionality as plugins — I use an existing Grunt plugin to generate my sitemap, for instance.
  • You can edit this to work with different templating systems. For example, I’ll be using Handlebars as my templating system, but it would be trivial to use Jade instead.

Setting Things Up

Our first step is to install everything we need to create our plugin skeleton. I’m assuming you already have Git, Node.js and grunt-cli installed. First, we need to install grunt-init:

[code language="bash"] npm install -g grunt-init [/code]

Next, install the gruntplugin template:

[code language="bash"] git clone git://github.com/gruntjs/grunt-init-gruntplugin.git ~/.grunt-init/gruntplugin [/code]

Now, create a folder for your plugin, which I’m calling grunt-mini-static-blog. Navigate to that folder and run the following command:

Continue reading %Building a Static Site Generator Grunt Plugin%


by Matthew Daly via SitePoint

7 Tips for Creating an App to Help Mental Illness

Have you ever thought of creating an app to aid those affected by mental health? The role of mobile phone apps in mental health treatment is a relatively new tool. Apps can be utilized by mental health practitioners, individuals interested in mental well being, those treated from an addiction as well as those with chronic debilitating psychiatric conditions. Various studies suggest that people with mental health conditions are interested in using apps in their treatment and thus increasing the likelihood of adoption.

But what makes a good mental health app and how can you ensure you are making something worthwhile? In this article I'll look at the detail of the mental health sector, explore some interesting apps and innovations and discuss the challenges for developers.

Continue reading %7 Tips for Creating an App to Help Mental Illness%


by Cate Lawrence via SitePoint

Sua Cia

Onepage, responsive and parallax


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

TrustaFact

TrustaFact is a consumer awareness web application that helps you determine how safe any website is with your money and personal information.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Hive Interactive

We are Hive, a collaborative studio working with many of the world’s top talents for and with advertising agencies, and it’s a pleasure for us to share our passion with you.


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

Change Your Story

Change Your Story: Exploring the Consequences of a Night on the Town is an interactive choose your own adventure story (or quiz on mobile devices) about college drinking. How will the decisions you make affect your blood alcohol content (BAC) and how


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery

La Latteria

New web site of ristorante La Latteria


by csreladm via CSSREEL | CSS Website Awards | World best websites | website design awards | CSS Gallery