Monday, November 30, 2009

Jekyll: Sites Made Simple

Wordpress Template Hierarchy.Image via Wikipedia

Jekyll: Sites Made Simple:

Jekyll: Sites Made Simple


For the full text of this article go here
Just this last August, I decided to relaunch my web site; I chose to give WordPress the flick and try out Jekyll, a Ruby-based static site generator.

Jekyll at its core is a text transformation engine.

The concept behind the system is this: you give it text written in your favorite markup language, be that Markdown, Textile, or just plain HTML, and it churns that through a layout or series of layout files.

Throughout that process you can tweak how you want the site URLs to look, what data gets displayed on the layout, and more.

This is all done through strictly editing files, and the web interface is the final product.

Jekyll is a blog-aware, static site generator.

It uses a set of template or layout files, the associated CSS files, and plain text files for the posts.

The posts can use the Markdown format or another similar markup language.

There's no content management system, no database, and no specific language support on the web server required---your site is a collection of plain old static HTML files.

Switching back to static markup may at first seem like a reversion to the late 1990s.

Yet Jekyll is a simple and elegant system that mimics the characteristics of a dynamic site---drawing content from a database and inserting it into templates via a CMS---without all that complexity.

As a firm believer in the KISS principle (Keep It Simple, Stupid), I always try to find the right tool for the job, and Jekyll is a simple solution to a common problem: "I want my own customized blog."

It's also flexible enough that it can easily be used for other tasks.

For example, GitHub uses it to drive GitHub Pages.

This article describes using Jekyll to build a web site: from downloading it, setting up a development environment, and hacking up template files.

I'll conclude with a word on maintaining updates between your development instance (for example, new blog entries) and synchronizing them to your web server.

Note that I've written this piece from a designer's perspective.

Although I had a number of technical hurdles to hop over, Jekyll remains rather simple; for instance, using Jekyll's template system and Liquid tags is easier than hacking a design as a WordPress theme.

Never fear, I intend this article to be as designer-friendly as possible.

Setting up a Jekyll blog is relatively smooth-going and boils down to a few straightforward steps.

Jekyll is written in Ruby, so you'll need to install it.

It's as simple as downloading the latest Ruby version for your platform and following the installation instructions.

The Ruby installation also includes the RubyGems packaging system, and allows you to download and install other Ruby libraries and programs.

If you're using Windows, choose the one-click installer, and make sure you tick the Enable RubyGems option when running the installer.

We'll be fetching Jekyll from the Gemcutter RubyGem hosting repository, but we first need to install the Gemcutter program.

The tumble command will simply make the RubyGems installer query the Gemcutter repository first, when downloading RubyGem packages.

This ensures that Jekyll is downloaded from the Gemcutter repository.

If you're on Windows you'll be entering the commands at the Windows command prompt (Start> Run...

Jekyll, like all good software, is modular and does one task very well, relying on other programs and libraries for additional functionality---after all, why reinvent the wheel?

This modularity also gives us choice: you can pick and choose from a variety of slightly different tools that perform similar tasks to extend Jekyll, depending on your preferences.

For example, if you'd rather write your blog posts in Textile instead of Markdown, you can.

For me, however, the default (Markdown) does the trick, and Gem only needs a small number of other dependencies, which are fetched automatically.

For a full list of available gems that extend Jekyll, see the list within the install instructions for Jekyll on GitHub.

Now with Jekyll installed let us set up the file system structure.

First, create a new directory---placing it within your user directory is fine.

That done we can execute Jekyll by issuing the jekyll command at the command prompt.

You'll notice that Jekyll creates a directory _site, which now holds an index.html file.

It's typically only a few lines long and allows you to avoid having to specify optional flags every time you run Jekyll from the command line; just stick them into _config.yml and Jekyll will use them every time it's run.

For more info on Jekyll configuration, see the configuration page on the Jekyll wiki.

When Jekyll is run, your posts are injected into the layouts using the Liquid tag: {{content}}.

Posts are plain text files that are named with the format $YEAR-$MONTH-$DATE-$TITLE.$FORMAT.

We'll create two templates for us to pick from: base.html, which is our base layout and post.html, which extends the base layout and is used for posts.

It was designed to allow designers and front-end developers to tweak their shopping interface without affecting the security on the server they're built on.

Apart from the specific directories and files mentioned above, all other directories and files are handled by Jekyll as expected and will be included in the generated site build in _sites/ when Jekyll is run.

Thus, a css/ and js/ directory and its contents, a favicon, and whatever else will all be added to the site build.

Jekyll comes with a simple web server that allows you to pop over to http://localhost:4000/ and view your site.

Even better, if you're actively updating and making changes, a useful flag to append to the jekyll command is --auto.

You can also add auto: true to the configuration file so that you can avoid having to type it in every time.

If you want to track your Jekyll files in a version control system, it's recommended to make an exception for the _site directory.

That's because the files in the _site directory are bound to change a lot, particularly during the development phase.

Deploying your generated static site is just a matter of copying the output in _site to your web server.

You could use FTP to upload your files, but there are a number of automated methods that make life easier, particularly when you just want to upload the new changes since the last upload.

My preferred current method is to use rsync, a little UNIX utility written by Canberra locals Andrew Tridgell and Paul Mackerras.

rsync synchronizes data from one location to another, and in doing so only sends changes rather than full files where possible.

There are a range of other, more complex automated methods, but they're beyond the scope of this article.

As a static site generator without any dynamic extensions means Jekyll has no comment support.

I've personally decided to avoid comments; besides avoiding having to deal with them at all (code-wise, styling-wise, spam-wise---yay!), the best feedback I've ever received were face-to-face or directly via email.

I also echo some of the sentiments raised by Alex Payne in his article, Why I Don't Allow Comments, and More on Everything Buckets in regards to fostering a higher quality discussion.

Despite blog CMSs as powerful as WordPress, Movable Type, and so on, I hope you can now see why it's worth reverting to a simplistic and rudimentary system like Jekyll: you use the right tool for the job.

Jekyll is a breeze to pick up; its learning curve is certainly less steep than say theme design or hacking for WordPress, in my experience.

With GitHub Pages using Jekyll, it's common to see many Jekyll users sharing their Jekyll blog sources openly via GitHub.

There's a listing of Jekyll-generated sites in the documentation, along with links to their respective GitHub repositories when available.

These are great to browse through for some knowledge on how other Jekyll users have built their web sites.

Learning curves aside, if you're after a simplistic blog tool construction-wise that does not require multiple users or a fully featured web publishing interface, then Jekyll could easily do the trick.

(Be assured, the sophistication of the final output for Jekyll can generate beautiful multi-layout blogs akin to WordPress.)

Ultimately, I changed to Jekyll because WordPress seemed like an overkill and I was up for learning a new platform.

I hope this article serves to help you if you're experiencing a similar predicament.

Feature image
by macaroni1945.





Reblog this post [with Zemanta]

Saturday, November 21, 2009

Google launches Chrome for Mac, Linux - with a caveat | Topics | Macworld

Google launches Chrome for Mac, Linux - with a caveat



Source: Macworld


by Gregg Keizer, Computerworld

Editor's Note: This story is excerpted from Computerworld. For more Mac coverage, visit Computerworld's Macintosh Knowledge Center.

Google late Thursday released developer-only versions of its Chrome browser for Mac and Linux, making good on a nine-month-old promise that it would eventually add those editions to the Windows version that debuted last September.

The Mac and Linux versions are rough and unstable, warned Google. "We have early developer channel versions of Google Chrome for Mac OS X and Linux, but whatever you do, please DON'T DOWNLOAD THEM!" said Mike Smith and Karen Grunberg, a pair of Chrome product managers, in an entry to a Google blog. "Unless of course you are a developer or take great pleasure in incomplete, unpredictable, and potentially crashing software."

The new versions lack important features and functionality, Smith and Grunberg warned, including compatibility with Adobe's Flash Player plug-in and printing. A current bug list catalogs other missing pieces, ranging from a working bookmark manager -- users can bookmark pages, but there's no way to retrieve a bookmark -- to a memory leak.

Google launched Chrome Sept. 2, 2008, as a Windows-only browser, but began taking names for a notification list for Mac users that same day, and for Linux users shortly after.


Chrome accounted for approximately 1.8 percent of those used last month, according to the most recent data from Web metric company Net Applications, a surge of 27 percent from the month before.




On Windows, Chrome comes in three flavors: Google's developer, beta and stable versions, in ascending order of fit and finish. Google releases more developer preview builds than betas, which in turn accumulate until the company's satisfied with their progress enough to roll out another stable build.



"[We're] trying to get Google Chrome on these platforms stable enough for a beta release as soon as possible!" added Smith and Grunberg.



Although the two program managers acknowledged that the developer preview crashes, Computerworld ran the Mac browser for several hours without a hitch.



Reblog this post [with Zemanta]

Thursday, November 19, 2009

Spice Up Your Blog - Choose From Thousands Of Gadgets

Shine On You Crazy DiamondImage by ZedZap(Nick) via Flickr

Choose from thousands of gadgets


Watch this video on how to spice up your blog -
Choose from thousands of gadgets to add to your blog.


Google to provide update on Chrome OS

Google to provide update on Chrome OS


by Nancy Gohring, IDG News Service
Source: macworld.com

Google is getting ready to shed a little more light on its Chrome OS this week.

The search giant has arranged an event for journalists Thursday at its headquarters in Mountain View, California, just days after rumors circulated that the code might soon be released.

When Google announced it was building its own Linux-based operating system, it said it would release the open-source code at the end of this year. It has said Chrome will be designed initially for netbooks, with the first devices hitting the market in the second half of 2010.

Branching out into the operating-system market could ultimately help Google find new revenue streams, since it is almost entirely reliant on search advertising.

The Chrome OS could also pose a threat to Microsoft, which worked hard to gain its share of the netbook market, which was initially dominated by Linux.

Google has said it is building Chrome because the market needs an OS built specifically for the Web. Most of Google’s non-search activities are Web-based applications, such as Google Docs, Gmail and Maps.

Wednesday, November 18, 2009

Design your Web site using CSS content boxes

Multiple Background Images?! Oh My!Image by B Tal via Flickr

Design your Web site using CSS content boxes

Design-your-Web-site-using-CSS-content-boxes

Coloured content boxes are a great technique for creating visually-pleasing CSS layouts and content. All it takes is assigning a background colour to a
element or setting an image as the background if you want a sleeker look.

To begin create a <div> element and assign it an ID.


<div id='contentBox'></div>


We then need to define the styles for the contentBox ID. Let's start by setting the font type, size and colour.


#contentBox
{
font-family: sans-serif;
font-size: 80%;
color:# 2E2E2E;
}


Next we are going to add some filler text to the
.


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat neque sit amet ante tincidunt hendrerit. Vestibulum eleifend erat et enim. Cras nisi arcu, malesuada malesuada, accumsan non, venenatis eget, purus. Mauris pulvinar tincidunt turpis. Aliquam enim. Vestibulum tristique risus eget elit. Fusce urna arcu, dictum sit amet, luctus non, bibendum eu, leo. Vestibulum at diam. Nunc pretium. Maecenas dapibus laoreet leo. Mauris pretium quam. Nulla ultrices. Donec iaculis laoreet diam. Suspendisse a felis quis mauris porttitor mattis. Duis aliquet lacinia odio.
So far we have some text in a
. Let's make this look more like a content box, by adding a background colour and a border around it. Add the code below to #contentBox.


background-color:#FFFF99;
border-style: solid;
border-width:2px;
border-color:#FF9933;


Set the width and height attributes of the box, like this:


width:20%;
height:35%;

We're going to add some padding around the text to make it look better.

padding:1%;

Our text fits nicely within the box at the moment, but if we added another paragraph it would flow over the box. To prevent this we need to add a scrollbar.

overflow: scroll;

Alternatively, you can set the overflow property to auto to display a scrollbar only when needed.

We're going to position the box 10 pixels from the start of the page:


position:absolute;
left:10px;


You can position the box anywhere on the page where you see fit, by adjusting the position attribute.

And tying it all in:




Content Box


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas feugiat neque sit amet ante tincidunt hendrerit. Vestibulum eleifend erat et enim. Cras nisi arcu, malesuada malesuada, accumsan non, venenatis eget, purus. Mauris pulvinar tincidunt turpis. Aliquam enim. Vestibulum tristique risus eget elit. Fusce urna arcu, dictum sit amet, luctus non, bibendum eu, leo. Vestibulum at diam. Nunc pretium. Maecenas dapibus laoreet leo. Mauris pretium quam. Nulla ultrices. Donec iaculis laoreet diam. Suspendisse a felis quis mauris porttitor mattis. Duis aliquet lacinia odio.

Nullam cursus erat id magna. Sed eget lectus. Phasellus dignissim. In purus. Duis scelerisque. Sed suscipit risus nec velit. Sed et neque. Maecenas eget nunc. Ut turpis tortor, varius ut, dapibus quis, lobortis
et, erat. Aliquam vitae odio vitae tellus ultricies adipiscing. In ut diam.


Reblog this post [with Zemanta]

Free Search Term Suggestion Tool by KeywordDiscovery.com

Free Search Term Suggestion Tool by KeywordDiscovery.com

Here is a great tool for keyword research and discovery:

www.keyworddiscovery.com/search.html


Free Search Term Suggestion Tool by KeywordDiscovery.com

Thursday, November 12, 2009

reBlog from Brightmark: Steps to Freedom

Picture of the "Gingerbread House" i...Image via Wikipedia


I found this fascinating quote today:



Your property investing success starts with your attitude to your investments. Look at each piece of real-estate you buy as a long term investment & it will turn into a new stream of income and work for you all the time making you wealthy.Brightmark, Steps to Freedom, Nov 2009



You should read the whole article.


Reblog this post [with Zemanta]

Wednesday, November 11, 2009

Must Have Resources for the Web Developer's Toolbox

Fuel Your Creativity - Must Have Resources for the Web Developer's Toolbox
Must Have Resources for the Web Developer's Toolbox

If you are a web designer, especially if you are fairly new, you search around for the best and easiest tools to do the tasks you want to do. Here is a summary of this really helpful article.

Summary:

In every creative field, there are certain tools that one always keeps handy in order to get the job done.

As developers (who also design) the toolbox inventory needs to be broad to encompass all the necessary areas to keep you moving and productive.

Below is a list of the resources that we felt should be included in any developer's toolbox.

We have broken it down into different categories to help you keep your tools organized a little bit better.

We hope that the list proves useful.

GIMP is a close second whose price you can't beat (free), especially for web designers who don't need all of the features of Photoshop.

Graybit is an online accessibility testing tool designed to visually convert a full-color web page into a grayscale rendition for the purpose of visually testing the pageâ¬(TM)s perceived contrast.

It returns a set of hue, saturation and tint/shade variations of your color, and suggests color schemets based on your color's complementary color, split complementary colors, and other variations.

FavIcon Generator allows you to easily create a favicon from an image.

The Grid System is an ever-growing resource where graphic designers can learn about grid systems, the golden ratio and baseline grids.

The 960 Grid System is an effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels.

jQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

The jQuery Visual Cheat Sheet is an useful and practical 6 page reference to jQuery 1.3 for web designers and developers containing the full jQuery API reference with detailed descriptions and some sample code.

jQuery Plugins contains plugins, extensions and tutorials developed by jQuery contributors for the jQuery JavaScript Library.

Code Beautifier is a free online CSS formatter, optimiser, and parser.

Notepad++ is an open source code editor and Notepad replacement that supports several languages.

TextWrangler is a powerful and richly featured tool for composing, modifying, and transforming text stored in plain-text files for Mac.

The WordPress Codex is the place to go if you have any WordPress related questions.

The Spoon Browser Sandbox allows you to run any browser directly from the web.

IETester is a free WebBrowser that allows you to have the rendering and javascript engines of IE8, IE7 IE 6 and IE5.5 on Windows 7, Vista and XP, as well as the installed IE in the same process.

Web Developer's Tools for Firefox is a collection of firefox plugins to speed up the development process.

WampServer is a Windows web development environment which allows you to create web applications with Apache, PHP and the MySQL database.

CSS Tricks Code Snippets is a large repository of useful code snippets in the areas of HTML, CSS, JavaScript (raw), JavaScript (jQuery), PHP, and WordPress.

Angies list includes 26 items in all make sure you check it out at: Must Have Resources for the Web Developer's Toolbox


Angie is a freelance web and graphic designer who brings her love of community to the online design collective as co-editor of Fuel Your Creativity.