I am looking for blogging platforms where I can share what I learn, share code snippets.
Please share your advices on what tools to use
Thank you
A year ago, I used Wordpress on shared hosting, then my service was terminated once I hit the front page of HN (~300 concurrent users). I've been using Jekyll + GitHub Pages since, and I've had no issues whatsoever, aside from the occasional GitHub outages.
[0] - https://github.com/prakhar1989/prakhar1989.github.com, http://getpoole.com/
The idea that your Markdown articles are definitive, that you can add custom grammar, and that your blog is strictly a view into your writing rather than a separate content platform, should be very appealing to programmers!
[1]: http://a-jekyll-blog.archagon.net/programming/2014/06/23/sec...
Whether or not it was actually working as intended on the shared environment, I'm not sure.
(and this makes me sad)
Jekyll is a great answer in this regard. You don't have to reinvent the wheel (pagination, RSS, categories, dates, etc.), but you can still customize it with great ease. (Kind of like the Backbone.js of blogging engines, I guess.)
Alternatively: it's good to see what's out there so that when you do (inevitably) write your own, you know /what you want/.
Just as a counterpoint, I've realized recently that using other things before making your own changes what you'd make, and not necessarily in a positive way. You find yourself thinking in terms of the constraints and features of what you've used, rather than starting with a blank canvas and coming up with something you haven't seen before.
...although I might not've hit submit, since I'm not sure I'd want to participate in the argument that'd be sure to come next.
* If you host yourself it is a lot of maintenance to keep wordpress patched, spam cleared, etc.
* It is dynamic, so each page needs to be built based on a query to the mysql database. For a handful of users this is no big deal. If you hit the HN front page your site will be overloaded.
On the other hand, Wordpress is good if you blog on the go and want to use the ipad app or whatever to post/maintain your blog. It might also be good if you have multiple contributors, or update your blog so frequently (minutes) that rebuilding the site to deploy it is an impediment.
Octopress / Jekyll is a good alternative:
* Content is pre-formatted HTML files, no database to get in the way or slow things down.
* Tons of people use it, so it is well known.
* Lots of publishing options -- github, heroku, s3 + cloudfront, etc.
* "Features" like discussion forums can be linked in from disqus or other purpose-built services.
* Publishing is easy via running a script, although that means lugging your laptop around or using an ssh client on your tablet.
* With static HTML the attack surface is substantially less compared to a PHP site with a back-end database, so security should be significantly better and easier to deal with.
* Wordpress now auto-updates, so you don't have to worry about patches.
* WPSuperCache is a Wordpress plugin that serves up static content. Only logged in users see a dynamic page.
The downside is that it's popular (thus a target), and left unpatched or unprotected it's easy to mess something up and become part of those Viagra ad rings ;) I've hosted, set up, or fixed dozens of WordPress blogs, and a few have been compromised for one reason or another (you find lots of PHP shells in upload directories).
Not to mention the fact that once you get outside the basic use case (blogging), and/or you start using plugins, things get convoluted FAST. There're a million plugins for WP, and if you're lucky the one you pick will do exactly what you want. But chances are it won't, and you'll spend hours digging through spaghetti code to get it to work for you.
Also I think the WP core is well secured. It's when you start adding plugins into the mix things can get dicey.
For spam, Akismet is pretty effective and comes with WP by default, just have to enable it. I consider WP very frictionless for publishing content so it's a good choice in my book.
See the pelican folder here for code examples - feel free to steal the theme, just write your own content.
I use S3 to host my blog. It's super cheap and it's really easy to push out changes with S3cmd [2]. Just a simple:
s3cmd put mydir/* s3://mybucket/
1. https://github.com/gjreda/gregreda.com/tree/master/theme[1]: http://kevinyap.ca/2014/06/deploying-pelican-sites-using-tra...
https://github.com/stucchio/Homepage/blob/master/pelican/dep...
It uses markdown, has lots of themes (some paid, some free, some OSS), you can host it yourself.
Not a dealbreaker, just something to be aware of. (And if anyone knows of other embeddable comment systems that can be used on static sites, I'd love to hear about them!)
Other things missing from a static site generator though include being able to post from a multitude of devices. To post to a static site generator you generally need a full desktop. Or at least that's my experience.
https://help.disqus.com/customer/portal/articles/665057-synt...
To do code snippets, try the <code> or <pre> tags.
I suppose if you want a full commenting system, then a platform makes sense. However, on low-traffic blogs I think the comments (or rather, lack thereof) make it seem like someone's talking to an empty room.
As in don't you want some tags to organize the posts? Don't you want an index of your tags, and an index of your posts? You'd need to edit by hand 10 files just to add a new post if you wanted those necessary features and yeah they are necessary if you're not just writing a diary for yourself. If that's the case you don't need a blog at all just a folder with text files on your machine.
But I agree with you in that I like to just open up a text editor and start writing, so I use a script called "Bash Blog" which lets me do just that.
The website it produces are static html files, and it uses a shell script to reassemble itself after every new post I created so I don't need to end up editing 10 files, but I still get all the useful features I mentioned above.
http://ghost.org/ https://github.com/proudlygeek/hipstadeploy
And demo: http://www.oddevan.com/
(I'm the kind of weird person that actually likes using a database and fancy backend to write/organize my posts, so I didn't want to use Jekyll.)
Rather than host your own, I prefer just going with tumblr or something slick. I do like tumblr for its social connectedness, easy sharing and liking. Whatever floats your boat, though.
Tech.pro is a blogging platform / professional network catered only to the tech world (primarily software development).
Our editor is markdown-based and handles code snippets etc. quite well in addition to having support for embedded frame sites such as jsfiddle/codepen/sqlfiddle/etc.
Although you're writing on the TP platform, you still retain full ownership of your data. You can even download a neatly organized archive of all your blogs (and revisions) in both Markdown and html format at any time.
My Blog: http://tech.pro/leland/blog My Profile: http://tech.pro/leland
- Jekyll + GitHub Pages (https://help.github.com/articles/using-jekyll-with-pages)
- Octopress/Jekyll + GitHub Pages (http://octopress.org/)
- Svbtle (https://svbtle.com/)
- Medium (https://medium.com/)
- Ghost (https://ghost.org/)
Octopress / Jekyll are sort of annoying at times specifically if you don't use ruby. For example, on my mac, i've had to deal with weird ruby related issues when upgrading OS X.
* I already have a server running under my desk, running Apache, and a git repo web-served via CGIT, where I can store any serious code snippets that require versioning. So I'm not interested in anything that uses third party hosting.
* I'm the only blogger: no multi-user capabilities needed.
* The publishing side doesn't even have to be web-based; the minimal requirements are that I can log in to a shell account and post a blog by creating a text file and running some command. This then updates the page nicely, including the RSS feed and whatnot.
* No user comment feature required; it's okay if users mail-in comments, and there is a way to publish selections from the mailbag.
That said, I use the static site generator mynt. Host the generated website on digitalocean droplet behind an nginx server.
If you want to go the static site route and want to try all the options that you like, (and lets be honest, that is a big part of the fun setting up a blog) here are some aggregated lists
For just having something already set to focus on your writing, I really like what I've seen from Jekyll, I don't have a need yet but I'm definitely keeping it in mind for future projects.
(for more tips, see my kickstarter project: http://kck.st/1sYmezD )
[1] http://blog.codepen.io/2014/06/19/can-write-blog-posts-codep...
Hosting Hugo blog on GitHub Pages ~ http://hugo.spf13.com/tutorials/github_pages_blog
It uses Sphinx markup which is great for embedding source code snippets and extending the blog with own extensions or pre-built ones.
I currently use piecrust[1] to statically generate my markdown through twig (templates) and push these to my site host nearlyfreespeech via ssh. It's pay as you go; I've not needed a dB or CGI, and those are not forced on me. Perhaps I'll be punished if I ever get front paged, but YNGNI.
I am trying out metalsmith[2] instead, as I'm more familiar with javascript than php and hence can make plugins for the various bits I need.
0. https://github.com/Raynes/laser
And yeah, it feels good.
I wrote my posts using Markdown and done with it. Pretty simple.
Platform isn't important. You can do what you are trying to do on ANY platform.
Some hip ppl might try to use a makerbot or w/e but to get any kind of height on the platform u will need a LOT of plastic.