TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

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

74 点作者 deadwait大约 12 年前

10 条评论

carlesfe大约 12 年前
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 未加载
eksith大约 12 年前
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 未加载
FraaJad大约 12 年前
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 未加载
sigil大约 12 年前
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>
p4bl0大约 12 年前
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 未加载
tquai大约 12 年前
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.
pixelbeat大约 12 年前
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 未加载
mgi大约 12 年前
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 未加载
danso大约 12 年前
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 未加载
bensw大约 12 年前
Markdown Support?