This article follows on from Drupal Basics - Setting Up A Basic Drupal Site #1 which covers installing Drupal 6 and visiting your brand new basic Drupal site. If you're already familiar with the installation procedure, this article will be discussing how to turn that blank Drupal site into a personal blog.
STOP! I will be sticking with the default Drupal 6 theme, Garland. If you use a different theme to follow along with this tutorial you will potentially see different results.
The good news is that a lot of the default Drupal settings are what you'll need for a blog anyway, so this is probably the easiest type of site to set up, but I'll cover some slightly more advanced tips along the way to build on the basics.
Bear in mind that Drupal actually comes with a module named "Blog" that is turned off by default. This module actually does something other than turn your site into a blog, so don't be tempted to turn that on just yet.
Creating blog posts
By default, a fresh installation of Drupal will include a "story" content type. This will be set up to publish on the front page of your site, and to have comments enabled, so it's pretty much perfect for use as a blog post. Go to Create content > Story and familiarize yourself with the node creation screen (a "node" in Drupal is a piece of content, whether that be a page or story or something else altogether).
The title field is self-explanatory, this will be the title of your post.
You'll then notice a "menu settings" section which, when expanded, allows you to add this node to a menu. You wouldn't generally use this when writing a blog post.
The first thing any WordPress users will notice about the body field is the lack of a familiar editor with buttons for easy formatting of posts. This can easily be added using a module, but for now we're just experimenting so go ahead and some nonsense as your post content.
Take a look at the expandable sections below the body field, especially the comment settings and publishing options. As you can see, comments on story nodes are read/write by default but you can turn them off completely or prevent new comments being posted on a per-node basis.
Similarly, the publishing options are set to publish the story and post it on the front page, but you can instead create it as a draft or even mark it as a "sticky" node by changing these options for each node.
Click "save" and you'll find yourself viewing the published story. Clicking on the logo in the top left of your site will take you back to your homepage, where you should see a shorter, excerpt-style version of your new post.
Content will display on the homepage in reverse chronological order, just like most blogs, so technically this would be all you need to understand to start posting!
Adding static pages
No blog would be complete without at least an "about" page. Create a new node, this time choosing "page" rather than "story". The process is exactly the same as previously, except this time we'll add a menu link at the same time as publishing the page.
Expand the "menu settings" section and enter your page title (or whatever you like, really) in the menu link title field. The rest of the options can stay as they are.
Notice the different comment and publishing settings, by default pages will have comments disabled and will not be published on the site homepage.
Click "save" and you'll see a new link appear in the top right of your site. This is the position of the Primary Links menu in the default theme.
Viewing one of the nodes we just created, you may notice that your URL is something along the lines of drupalsite.com/node/2. That's not very user, or search engine, friendly so you're probably going to want to change that.
The Pathauto module is an absolute lifesaver, I've never built a Drupal site that didn't use it and it allows complete flexibility as far as your URL structure is concerned. It is in fact so flexible that I'll dedicate an entire article to it, but for now all you need to know is that it will let you set URL aliases both per individual node, and also per node type. For example you could set all story nodes to use the URL alias drupalsite.com/yy/mm/dd/post-title, and all page nodes to use drupalsite.com/page-title, but you could overwrite those settings on a particular node if you needed to.
Taxonomy - Categories, tags and more
Already we have a basic but perfectly functional blog, but now we'll jazz it up a bit with taxonomy. In this instance we'll use the Taxonomy module to add categories to our blog posts, but it's also used for much more. Let's concentrate on the basics.
The Taxonomy module should be turned on by default, but if not you can activate it at Adminster > Site Building > Modules.
Go to Administer > Content Management > Taxonomy > Add Vocabulary. A "vocabulary" is basically a group of taxonomy terms, in this case we'll call ours "Blog Categories". You may be thinking that "taxonomy", "vocabulary" and "terms" are needlessly complicated names for just creating categories but again, this is because the Taxonomy module also does significantly more.
Add a description if you like, "categories I blog about, and stuff". Tick "story" under content types since you only want to use categories on your blog posts and not your static pages. Choose "multiple select" and "required" from the next section and hit save, and you'll be taken back to the main taxonomy screen.
From here go into "add terms", and add some categories by filling in the name and clicking save. I've gone with "rainbows" and "unicorns". Now go all the way back to Create content > Story and you should notice a new field in the node form looking a bit like this:
The select box will be pre-populated with any taxonomy terms you've added to that vocabulary. If you then edit the vocabulary and tick the misleadingly named "tags" option, the field on your node creation form will change to this:
The difference is, with the former setup you're only able to select categories that have already been added. By ticking the "tags " option, you allow terms to be added directly from the node creation screen, though you can also add them manually. If terms already exist, they will autocomplete as you type, as shown in the image above.
For the purposes of our example site, go to the first story we created and click "edit". You'll see the new category field is added here too. Add some categories and once saved, you'll see the blog post now lists category links which when clicked will take you to a list of content filed under that particular taxonomy term. Simple and powerful, just the way I like it!
That's probably enough for one tutorial. As you can no doubt tell we've barely scratched the surface of what Drupal can do, but you should at least now be familiar with some of the more common screens. Those of you who have used WordPress in the past may be scratching your heads at how complicated Drupal can be, but as I've explained in my Drupal vs WordPress comparison this is down to a completely different approach by each CMS.
I have many more (shorter!) Drupal articles in the pipeline, so if this is of interest please feel free to sign up and subscribe to my feed.