Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Bruno Calheira
Bruno Calheira
12,625 Points

The return of the static sites?

For some time I have been developing websites with WordPress, so I decided to research about Git and how to use it to improve the development of sites. Then I discovered the possibility of publishing sites on GitHub Pages. Besides the advantage of being a free service, my site would be faster because all pages are static. And so I met the new wave of sites and static blogs created with the help of generators such as Jekyll, Octopress, Hugo and many others.

Create websites with WordPress has a number of advantages: it is a known software, it is easy to teach the client to use it, there is a plethora of plugins (paid and free) for almost any task you can imagine.

However, there are also many disadvantages, especially on issues related to security and performance. I recently had a hacked site because the premium theme used a plugin that has a backdoor. Now I get all the time worrying about me updates of the various software components that need to keep updated. Besides, I need to make sure I the update of one of them will not affect the behavior of others, which is quite common.

I realize that there is a movement to encourage the use of static websites generators.

http://davidtucker.net/articles/move-to-static-site-generator/

http://gohugo.io/overview/introduction

http://www.phillipadsmith.com/2014/01/the-return-of-static-site-generators.html

https://www.bitballoon.com/blog/2013/11/18/ecstatic-on-static-sites-and-fixies

http://jungleg.com/posts/2014/07/why-use-a-static-site-generator/

I'm starting to experiment with some of these software and would like to meet other experiences.

Do you use generators of static websites? Share your experience.

:)

3 Answers

Kris Phelps
Kris Phelps
7,609 Points

This is something that Caching plugins were designed to address. Caching plugins create a static HTML version of your content and serve that up rather than having WordPress re-query and create the same page over and over. At the same time, you don't lose the benefits of a dynamic site, such as comments, automatically updated homepages with the freshest content and so forth.

Caching plugins give you the performance improvement of static sites while maintaining the dynamic nature of a CMS. Security is another concern, but remember that your CMS and its plugins are just 1 additional vector for attack. There are tons of ways to hack a static HTML site, but most of them will center around the security of your web host and the passwords you've created to log into your control panel or FTP account.

It really comes down to using the right tools for the right job. You shouldn't use a stapler where you should be using a hammer and nail. Additionally, while staplers might be safer, they aren't without their risks. Static sites are still susceptible to being hacked, it just requires different tactics.

Kevin Korte
Kevin Korte
28,149 Points

I'm basically the same boat. I'm building my portfolio site with Jekyll, which I'll likely host on github pages. I think it's a fantastic solution for something like this.

At the end of the day, it's about picking the right tool for the job. Obviously, a static site generator wouldn't work for a client site if your client doesn't know how to write in markdown, and than FTP it to the server. A CMS would be better here.

For my little portfolio site, a CMS is way overkill. I don't need a database.

Zac Gordon
STAFF
Zac Gordon
Treehouse Guest Teacher

I'm all about the right tool for the job. Of course WP isn't the right tool for every job, although I would argue against its downsides being performance and security since that seems to be more of a theme or plugin related issue, not WP specifically.

But that said if you like having different tools in your toolbelt I definitely suggest learning some of the tools you mentioned.

It's all about the right tool for the job.