Live data from Hacker News

HTMLy: Databaseless Blogging Platform (Flat-File Blog)

github.com

31–40 of 66 posts

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#33
The biggest problem with static blogs is the lack of comments. I see this project uses either facebook or disqus which is a solution a lot of people like.

I prefer not to rely upon external comment-providers though, which is why I wrote my own self-hosted comment-server:

https://github.com/skx/e-comments/

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#34
post #26

Earlier quoted context omitted.

> PHP as a server-side 'clever templating' language really isn't that bad. I only touch PHP as little as possible, and work with a legacy PHP codebase, but AFAIK, it hasn't evolved a tag to automatically HTML-escape/JSON-escape content. So, it's as good a templating language as it is a programming language: pretty terrible. I'll trade PHP for something as barebones as Python with WSGI + Jinja2 any day.

It's not fair to compare to compare pure PHP and Jinja2. Twig is the PHP-equivalent of Jinja2, and it is an extremely well designed templating engine.

What's not fair about it when talking about PHP as a templating language? My point is that while PHP is often lambasted as a terrible programming language, people forget that its HTML templating part is even more abysmal. If you need to have a templating system in your "advanced templating language", this really tells you everything you need to know about its capabilities.

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#35

The biggest problem with static blogs is the lack of comments. I see this project uses either facebook or disqus which is a solution a lot of people like. I prefer not to rely upon external comment-providers though, which is why I wrote my own self-hosted comment-server: https://github.com/skx/e-comments/

I use jekyll for my blog and looked for ways to integrate comments. I ended up with a simple solution: Provide a per-post unique email address where people can send comments to. The idea was then to manually process the comments and only put the most useful ones on the website.

I wanted to think that the hurdle is very low. It's a bit higher than just entering text in a text box and clicking a button. But sending an email isn't that hard either.

I received maybe half a dozen emails since I introduced my form of static comments. Most in the form of 'Does this work?'. For obvious reasons I didn't publish them. I redesigned my blog a few weeks ago and didn't add the comment feature back in.

https://caurea.org/2012/03/31/this-blog-has-comments-again.h...

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#36
post #27

I hate non-standard stuff like this, even though I myself do similar things all over the place. It's the kind of the thing that's OK if you do it to yourself, but immediately rings an alarm when it is distributed to the general public. When you're already doing something non-standard by using a flat file instead of a well-known DB format, you might as well use standards in other places so that people have fewer reaso…

The initial version was using a standard markup for the title but I change it due to avoid if there is a double h1 :)

For the next point as tags, dates, I chose to put it as a filename for the sake of speed.

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#37
post #28
post #21

Earlier quoted context omitted.

cp/tar/rsync/git/svn to name a few. HN is apparently flat file based. I actually have a 100% static site deployed in production. It is served off nginx, built with make, shell and sed (does some include processing and index generation) and is deployed with rsync from make and uses git for version control.

The design of news.arc is notoriously quirky. Given the fact that paging is entirely based on continuations, I don't think "flat-file-based" covers it.

That explains a lot. I get the principle of why this might be done but boy is it ugly. You'd have to maintain state between pages. State is bad. Which probably explains all those link expired errors...

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#38

The biggest problem with static blogs is the lack of comments. I see this project uses either facebook or disqus which is a solution a lot of people like. I prefer not to rely upon external comment-providers though, which is why I wrote my own self-hosted comment-server: https://github.com/skx/e-comments/

It's interesting that we're still writing such applications by hand. One thing that interested me when I learned about CouchDB was the possibility of skipping that and just exposing the database to the browser, with a few schemas and a couple of data validation functions configured. After all, that system is almost a dumb HTTP storage mechanism.

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#39
post #15

Don't take this the wrong way, but why PHP?

Interesting choice. A lot of places still use it, but it definitely feels dirty. Not the kind of thing you usually see around here. While it is still used a lot, I have to say, when I saw PHP I immediately closed GitHub.

Do you close your browser when you find out it is written in C++? Or shut down your OS when you find out it is written in C? Or angrily close the browser tab when you find out something on the page uses JavaScript? Do you then go and wash your hands and wipe the nervous sweat from your brow?

If a tool gets a job done, does the language matter?

No language is perfect. I know PHP feels "dirty" but the misuse of it is likely the cause of widespread disparaging. Even the English language is not perfect. Does this stop you using it?

Just a thought. I tend to close tabs when I come across stuff written in languages I can't write in... :-)

Re: HTMLy: Databaseless Blogging Platform (Flat-File Blog)

#40
post #13
post #7

Earlier quoted context omitted.

> It's only awful when used to build anything massivly complex (such as joomla! or drupal...) Or a Bitcoin exchange

If only Mark Karpeles had simply written mtgox in another language, there's no way he would have lost 750,000 bitcoins.

Wouldn't he have just recreated the same bug in another language? I think you are confusing a bug in implementation/code with the language.
Post reply on HN