Wee_ has been built to fit a very specific goal, that of having a system that allows me to write without getting in my way. This latest version is a complete rewrite of the original to cut down on size and improve loading times. It has also added a lot of flexibility to the original, including:
- Built in commenting
- Contact form integration
- Improved site configuration
These functions were both available if you manually added them, which wasn't ideal. Now they're both available anywhere you'd like them.
About Wee_ CMS
Wee_ is a flat-file Content Management System. It allows you to create posts, pages, and a great many of the things that you would like to do with a site. It doesn't use a database. It uses a file system, much like you would use to organise documents on your computer. There is no admin interface, no usernames or passwords, and there isn't a "What You See is What You Get" interface.
Because of this you need to be used to dealing with text, with editing files and with using FTP software. It's different from any other CMS that I've used, but it was designed to be different. Sometimes different is good.
A Few Disclaimers
Before we get started on playing and breaking things, I want to make a few statements, to cover myself and to help prevent unfortunate accidents:
- Wee_ is still in development, it's not 100% ready for use unless you know what you're doing.
- Wee_ doesn't really have themes, it's aimed at handling content, letting you focus on the pretty.
- You should, ideally, have an understanding of Markdown for content formatting.
- Currently Wee_ needs to run as a domain, or subdomain. You can't run it in a folder of a site.
With that said, if you are willing to play around with things then it is definitely possible to create a functional site using Wee_. Examples of Wee_ in action:
- University Learning Logs
- My Portfolio
- Simon Fraser's Portfolio.
- Tami Olsen's Writing Journal
- Colm Morgan's University Blog
- Phillip Patterson's University Blog
The original goal for Wee_ was for it to be used to create a blog, or journal, of posts in a specific order. So far Wee_ has met this goal very well.
Setting up Wee_ CMS is quite simple. I think it even beats WordPress's famous five minute install, it's that easy. The steps required for setup are:
- Edit config.php to include your information, such as the site name, description, and author
- Upload the entire file structure to your server using FTP
- Open the site in your browser
Of course, to actually have your own content loading in the site requires a bit more work, but that should provide you with a functioning site.
Once you have Wee_ set up, there are probably 2 things that you would like to do:
- Create content
- Style your site
Both are pretty important aspects of a site, and I'll cover both in brief here to help you get started with using Wee_.
Content in Wee_ is, as mentioned previously, done using a flat-file structure. In particular it is done using Markdown files organised into folders. I've used Markdown due to the immense amount of flexibility that it affords to content creation.
Markdown allows content to be written in a format that can be easily parsed into HTML for a site. This means that you can craft your content, and get your thoughts written down, without needing to worry to any extent about marking things up correctly. For the most part it is handled for you.
One of the great things about Markdown is its sheer amount of flexibility. You can write your posts without writing a single line of HTML. If you would like to then you are certainly able to write your posts in pure HTML. The choice is yours.
Additionally, if you want to mix HTML and Markdown this is possible. Initially you couldn't use Markdown inside of HTML, but thanks to the wonders of Markdown Extra it is possible to do so. Simply add an attribute to the HTML element you would like to use Markdown in, setting an attribute of markdown="1".
All content is treated the same in Wee_. A post is created in the same way as a page. All content lives in the folder
/categories/. In the downloadable version you will find four folders:
drafts folder is somewhere you can use to save in-progress posts. This isn't strictly necessary, and is included for use with a plugin I am working on.
errors folder contains error messages that might be needed by Wee_. Currently the only one used is the
journal folder is a category of posts. Inside of this folder are all of the posts that will be viewed if you visit the
journal page of your site. Pagination is handled for you, but you can define how many posts you want per page in the
config.php mentioned earlier.
pages folder is where all of your pages live. The downloadable version of Wee_ will have two folders inside,
colophon. The home page is the default home page, but that can be changed in
colophon is set up to display a colophon of the site. If you keep this in the final version of any sites, you will need to add information regarding your own site.
There is a structure to content in Wee_. Posts need to be named
post.md, inside the appropriately titled folder. Folders should be named without using spaces, or other odd characters. There is also a structure for handling some elements of meta data, and the title of the page. It is as follows:
Pubdate: 26-08-2011 12:27 Tags: Tags, For, The, Post Desc: Post Description Title: Post Title =-=-=
The =-=-= is used to separate the meta information from the content of your post. To see an example of this, check out the content of my portfolio's colophon. There are a few extra options that can be set, the main one that might be of interest is:
Author: New Author Name
config.php there is a setting for the default author of posts. Adding this to a post allows you to set an author specifically to that post. This was implemented for people who might have guest posts, or who manage sites with more than one author.
Setting this in the top area of a post that typically allows comments to mark the comments as closed. This will still show comments that have been made, but will prevent new comments from being added.
Additionally, there are some extra tags that can be used when writing posts for use in Wee_. These (currently two) extra tags are based off of some nice functionality implemented in WordPress, and cover defining a break point as an introduction and showing a "posted on" string of text. These can be used by doing the following:
<!--[More]-->is used to define a break point in content, used to create an introduction on category pages. It doesn't need to be used.
<!--[TimeStamp]-->is used to display the published date of posts. Uses the HTML5
timetag, without the
pubdateattribute on categories, but with it on single page views.
Obviously when it comes to posts and pages, it's usually very nice if things are more than just text, regardless of the quality of the typography. This is catered to in Wee_, and even lets you keep images organised with their posts. Images linked to in a post should be contained inside a folder called
img that resides in the folder containing your post. When using images, their links should not include an opening slash, Wee_ will do everything that it can to rewrite the URL to work. This might not work everywhere, and is an experimental feature of Wee_.
Organising Category Content
The single biggest issue with Wee_, or any flat file system, is ordering content properly. PHP, the server language powering Wee_, is capable of reading files, but only in alphabetical order, from one end to another.
The original solution that I came up with for this was to order content sequentially. Whilst this works, it requires a level of effort that becomes frustrating... it gets in the way of creating content. A better solution was needed.
In the end I settled upon a simple solution. In the same way that each post is a file referenced by the system, you can optionally create a file in each category called
index.md. The purpose of this file is simple, to store a list of publicly available posts for the system to display. These are listed in order of most recent post, through to oldest. Each line should contain the folder name for the post.
This provides an added bonus in that you can create posts that are part of a category, but that are hidden from view, simply by not including them in the
index.md file. This very post is an example of the concept in action. You can still view the files through a direct link, but they will not be listed on your site anywhere.
Wee_ makes use of a very rudimentary theming system. Themes are saved in the
themes folder. In the new version of Wee_ I have removed my personal portfolio and university blog themes. This leaves
starkers as the only theme currently.
starkershas it's name blatantly stolen From Elliot Jay Stock's fantastic WordPress theme, Starkers. It is designed as a starting point for themes, and works off of the HTML5 Boilerplate for structure.
I am currently working on a new theme, entitled
basic that is aimed at being usable as a starting theme, but also as a template for writing your own themes, using the
New in the latest series of updates is the ability to force file downloads. Any files you want users to download can now be stored in the
media folder. To link to them, and force the download, link to
force-download/[filename]. Wee_ will work out what needs to be done, and start the download process.
If you include
[[tags]] in the content.php of your theme, or place
<!--[tags]--> in posts, then tags will be added to the post. Tags are taken from the meta area in the post.
A new page has been created, as a way to list all posts on your site. The page
/archive/ will list all published posts available on the site from newest to oldest, broken into monthly sections.
Some of the recent features in Wee_ wouldn't have been possible without the help of a few other people along the way. These ideas, and the people behind them, are: