Categories
Default

Brand new minimalist open source WordPress theme

githubelweb3

This is it. You are looking at the brand new design of this blog. I named the theme elweb3 and its completely open source and licensed under the MIT License.

The main features of this new design are responsiveness and simplicity. It works on virtually any screen size, it’s super easy to read and it loads fast. Nothing fancy, it just works.

You can download the theme from GitHub and submit pull requests if you find something that needs improvement.

Let me know if you like it.

Categories
Default

WordPress as a static website generator

wp2static

I’ve been blogging for 5 years now. This site is something like my 3rd or 4th attempt at having a blog that actually was maintained and did not die in a few months. It’s been hard work. The whole first year I wrote every day, just to get into the habit and it payed off. I often get job offers and meet interesting people through my writings.

When I first started my choice was to use Tumblr, because at the moment it seemed like if I used something very simple it would be easier to maintain and it would help me keep my interest. For the most part it worked. The first years I did a lot of posts and kept the momentum going. Tumblr allowed me to publish little pieces of content that kept the blog active and in the top of my mind.

After a few incidents with the Tumblr service (they where down for a few days) I decided that elweb was mature enough to get a makeover and also it’s own hosting. I was already paying for a VPS that wasn’t getting a lot of use so it was perfect. This blog became a WordPress site and it got a new look courtesy of the iA Template for WordPress. I really love that template. The only bad thing about it was that every few days someone accused me of stealing their design. That’s not a good thing if you earn a living designing websites.

After a while on WordPress, the site started feeling a little slow and Jekyll and Octopress where the cool kids on the block. The idea of having my site hosted as static files seemed great so I gave Jekyll a try. After a few hours of playing, it seemed that the transition would be very complicated. I had hundreds of blog posts that needed to be converted to markdown and also I had to figure out how to do forwards for all the old urls. I gave up.

Then I tried Octopress just to confirm that I was not giving up too easy and I have to say that it looks a lot better out of the box and it has everything I want except a custom template. So the idea was to hack a very simple template, just like the one this site uses now and maybe take advantage of some of the cool plugins Octopress has. Turns out it’s a lot harder that I thought. After spending a whole day trying to get to a point where I could actually understand how to implement a custom theme I was really frustrated and decided that maybe I was not beign successful because I was using a Ruby tool and I’m not a Ruby expert. So the next idea was to try something made in Python.

I found Pelican, a static site generator written in Python and using a lot of the ideas I’m used to. Again after a few hours I was frustrated and tired, so I gave up.

This “cool idea” was taking me too much time. This is just a blog not my job.

Frustrated with my failed attempts I decided just to try to optimize my WordPress site. I did a lot of research and learned a lot about WordPress optimization but the one thing that changed everything was a very cool plugin called WP Super Cache. I also tried W3 Total Cache which seems to be a lot more popular and polished but it’s just not as good. WP Super Cache FTW!

This plugin is great. Basically it generates static versions of all your pages on demand and from that point on it serves the static version instead of hitting the database or even the PHP scripts. You can even integrate with Amazon S3 and Cloud Front so you get CDN distribution of your site with just a few clicks.

My site has been featured on reddit and on Hacker News a few times and it has received tens of thousands of visits in a few minutes without failing or even slowing down.

This setup made me so confident that I moved my site from the VPS to the cheapest plan that Dreamhost offers and with this plugin installed the site is just as fast. The only down side is that the admin part of WordPress is super slow because I’m hosting on a shared server. My solution for this is that I do all of my writing on Evernote and just copy paste when I’m done.

The only thing that I have to do differently is that when a post is published I just click on the Delete cache button that appears on my toolbar and that’s it. The site re-generates all pages and the site becomes super fast again.

The plugin has many options you can tweak if you are into that. But for me I just delete the cache every time I publish a new post and that’s it, no preloading or garbage collection.

So there you have it. Just install the WP Super Cache plugin and you can make your WordPress site behave like a static site from one of the popular generators out there.

The difference is that you also get to use any of thousands of WordPress plugins and themes available, an easy to understand interface that works great with non-technical collaborators and best of all, making custom themes for WordPress is super easy. Who knows, you might event get inspired and make a theme that you can sell for beer money.

As always, I want to know what you think. Do you know of better ways of doing this?

Categories
Default

Blog re-design for sale

 

This blog has gone through many transformations over the years, but I’ve never taken the time and effort to design and code a custom theme from scratch. So, that’s what I did and this is what I made. This new design features the full content of the latest post on the home page and one post per page. The idea is to remove as much as possible and focus on just delivering content.

For this design I used Skeleton, a very cool boilerplate project to create responsive websites. Almost all of the mobile support magic comes from skeleton. I wrote all the initial styles in stylus using brunch to handle the pre-processing and concatenation of files. Once the markup was done and the templates converted to WordPress I did all further css editing by hand to avoid re-configuring brunch to put files in the proper WordPress directories. I focused on finishing the website as fast as possible. The whole thing took 8 hours from wireframe to what you see here.

I intend to get the project back to working with brunch pretty soon. Writing the styles in stylus, less or scss is much better than doing stuff by hand. I also want to convert the JavaScript to CoffeeScript, right now the theme has very little JS but I plan to add some functionality very soon and I prefer writing CoffeeScript.

The only plugin dependency is CodeColorer for syntax highlighting. I’m using disqus for comments but it’s optional. The default WordPress comments work, but I have not applied any style to them. They look pretty bad. I use a few other plugins but they are completely optional.

Finally, what I would like to know is if anyone is interested in buying a copy of this WordPress theme. I thought that if I sell a few copies, that will allow me to make the theme better in a shorter amount of time. I would charge something like $15 per website. Are you interested? Leave a comment, @reply on twitter or send me an email.

Update
The theme is finally available for sale.
Get it today.