TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Creating a simple blog system with a 500-line bash script (2011)

74 pointsby deadwaitabout 12 years ago

10 comments

carlesfeabout 12 years ago
Author here. Feel free to drop any comments, this was a "weekend project" as I couldn't find anything as simple as that.<p>By the way, I recently uploaded the code to github: <a href="https://github.com/carlesfe/bashblog" rel="nofollow">https://github.com/carlesfe/bashblog</a> and some people are using it to publish their blogs via dropbox and site44, cool!
评论 #5338710 未加载
评论 #5339732 未加载
评论 #5338243 未加载
eksithabout 12 years ago
I'm SO going to use this! If only because of the ridiculous simplicity of it all. Maybe I won't replace my main blog, but I can see this in use for something simple I've had in mind for a while.<p>And why did we stop using plain HTML files for simple blogs (that are self-hosted)? Do I really need a "CMS" and/or framework to spew some formatted content if I'm not even gonna have comments? I've seen blogs that use some custom Ruby app or PHP and they're just a combination of an archive index and posts.
评论 #5337960 未加载
FraaJadabout 12 years ago
The grand-daddy of bash based static site generators: <a href="http://nanoblogger.sourceforge.net" rel="nofollow">http://nanoblogger.sourceforge.net</a><p>Example use: <a href="http://www.cs.uni.edu/~wallingf/blog/" rel="nofollow">http://www.cs.uni.edu/~wallingf/blog/</a> (9 years)<p>Incidentally, the creator of nb announced that he is postponing the development of nb indefinitely last month.<p>OP: Do you think you might want to take up that development?
评论 #5337750 未加载
sigilabout 12 years ago
By the way, cperciva's blog is also generated by a shell script called "blogsh." Pretty similar to OP's here, except the templating is external rather than built into the script.<p>I got a copy by request back in 2008 -- good stuff.<p><a href="http://www.daemonology.net/blog/2005-09-12-blogsh.html" rel="nofollow">http://www.daemonology.net/blog/2005-09-12-blogsh.html</a>
p4bl0about 12 years ago
See also my little project fugitive [1] a blog engine running on top of git using hooks written in Bash (not much more than 500 lines either), well technically it's even written in bare sh.<p>[1] <a href="http://gitorious.org/fugitive" rel="nofollow">http://gitorious.org/fugitive</a>
评论 #5338775 未加载
tquaiabout 12 years ago
I did this once, too. It's so nice to hear other people appreciate the approach!<p>The "CMS" I wrote was about 75 lines of sh, and had slightly fewer features than the one linked here. That's the beauty of writing your own: you decide what to include, and no more. cp wc sort awk etc. is all you need. If you want it to look beautiful, that's where design and CSS come into play, both of which are outside the scope of content management.
pixelbeatabout 12 years ago
It's cool to see static web sites becoming popular. As for comments (dynamic) you could integrate with discuss, or as I do wrote my own simple comments app for google app engine.<p>Details here: <a href="http://www.pixelbeat.org/docs/web/feed.html" rel="nofollow">http://www.pixelbeat.org/docs/web/feed.html</a>
评论 #5337707 未加载
mgiabout 12 years ago
I like this. I used to have an emacs org-mode set up to edit/publish blog post (sadly just to discover that I haven't much to say in a blog). My set up allowed me to publish "data" content (mostly images) that can be linked into a post. How do you handle this with bashblog?
评论 #5337847 未加载
dansoabout 12 years ago
I know not everyone is a fan of Disqus, but it's as easy to implement (OK, the scripting side, anyway) as Google Analytics. Probably wouldn't be more than a couple of lines to have that option and then put Disqus comments at the bottom of the template.
评论 #5338280 未加载
benswabout 12 years ago
Markdown Support?