Live data from Hacker News

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

mmb.pcb.ub.es

11–20 of 31 posts

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

#11
post #6

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. 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 c…

Just wondering, but have you heard of Jekyll or Octopress? Both are static HTML generators (Jekyll is done in ruby, octopress is a layer on top of it)

https://github.com/mojombo/jekyll http://octopress.org/

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

#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.

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

#14
post #11
post #6

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. 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 c…

Just wondering, but have you heard of Jekyll or Octopress? Both are static HTML generators (Jekyll is done in ruby, octopress is a layer on top of it) https://github.com/mojombo/jekyll http://octopress.org/

Yes, I have, but... Jekyll is done in ruby, octopress is a layer on top of it

This kinda defeats the "simple" bit doesn't it? ;)

I have nothing against these and if that floats your boat, then by all means, use it. But just the idea of not having to install anything (in fact, nothing) extra and just having this all work with a single file is very appealing to me.

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

#16
post #14
post #11

Earlier quoted context omitted.

Just wondering, but have you heard of Jekyll or Octopress? Both are static HTML generators (Jekyll is done in ruby, octopress is a layer on top of it) https://github.com/mojombo/jekyll http://octopress.org/

Yes, I have, but... Jekyll is done in ruby, octopress is a layer on top of it This kinda defeats the "simple" bit doesn't it? ;) I have nothing against these and if that floats your boat, then by all means, use it. But just the idea of not having to install anything (in fact, nothing ) extra and just having this all work with a single file is very appealing to me.

Ah yes, it's true...but for a Ruby developer, something that involves Ruby is just about as good as something that involves bash :)

I guess I was thinking of "simple" in terms of the static HTML and deploy. I don't think you actually have to run any Ruby commands, you just run a command line task and it reads the textfiles from the specified directory.

Unless I missed it in the OP's description, one huge advantage that Jekyll has over the OP's bash solution is the ability to write in Markdown, made possible by the inclusion of Markdown parsing Ruby libraries. So the complexity added in the framework part, IMO, is more than made up in the simplicity of actual content-production.

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

#17
post #3

Author here. Feel free to drop any comments, this was a "weekend project" as I couldn't find anything as simple as that. By the way, I recently uploaded the code to github: https://github.com/carlesfe/bashblog and some people are using it to publish their blogs via dropbox and site44, cool!

1. Thanks!

2. I referenced this in a sub-comment: what are the options of parsing Markdown using a bash-only blogging utility?

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

#18
post #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.

Problem with using Disqus (and similar solutions) is that comments are at Disqus, so you have no real control over them. Yet not many people care about it.

Ask HN: Open source commenting systems for static pages - alternatives to Juvia?

https://news.ycombinator.com/item?id=4125787

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

#19
post #17
post #3

Author here. Feel free to drop any comments, this was a "weekend project" as I couldn't find anything as simple as that. By the way, I recently uploaded the code to github: https://github.com/carlesfe/bashblog and some people are using it to publish their blogs via dropbox and site44, cool!

1. Thanks! 2. I referenced this in a sub-comment: what are the options of parsing Markdown using a bash-only blogging utility?

It is theoretically easy, one would only have to add a parse_markdown() function which converts MD to HTML, there are many parsers out there.

For me, after many years of making web pages, HTML is easier than Markdown.

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

#20
post #14
post #11

Earlier quoted context omitted.

Just wondering, but have you heard of Jekyll or Octopress? Both are static HTML generators (Jekyll is done in ruby, octopress is a layer on top of it) https://github.com/mojombo/jekyll http://octopress.org/

Yes, I have, but... Jekyll is done in ruby, octopress is a layer on top of it This kinda defeats the "simple" bit doesn't it? ;) I have nothing against these and if that floats your boat, then by all means, use it. But just the idea of not having to install anything (in fact, nothing ) extra and just having this all work with a single file is very appealing to me.

That's a nice idea, but it gets complicated when you want to create a uniform layout across all of pages, etc. Jekyll automates that so that you don't have to copy and paste header and footer blocks and things like that.
Post reply on HN