
JSON Configurable Personal Site - christophior
https://github.com/christophior/JSONConfigurablePersonalSite
======
avidas
Great to see a fellow PayPal Austinite on HN Chris! For a lot of people really
quick and easy way to have a personal site up and running. Couple suggestions,
possibly add system requirements and deploy instructions (possibly deploy to
heroku/or deploy to digitalocean button) ?

~~~
christophior
Just saw this, thanks for the suggestions Avi! I'm currently messing around
with it, I was already looking into one click deploy. I recall some time prior
that Github unveiled a one click deploy button so I was going to try and
integrate that into the repo.

------
fiatjaf
You know you could do this as a Jekyll site, right? And then you wouldn't even
need to install Jekyll, you could just put everything on GitHub and it would
render it for you. Then you could let people fork and modify the links and
they would have their own sites too, without even downloading anything.

Doing these with a backend is not fun at all: it is too easy to program (you
know that with a node server you could do way more than a "JSON configurable
personal site"), but it also consumes too much resources to run. So if you
could do it without a backend, why not?

~~~
christophior
Never used Jekyll before, thanks for the heads up. I'll look into it.

~~~
fiatjaf
It is not that I like Jekyll, but that GitHub pages supports it -- and
compiles its sites on every deploy --, so it works well.

------
exodust
Do we know what's behind this on the server? Is this a Node.js thing? (perhaps
obvious to many, but I'm not down with the server-side js scripting and
templating lingo.)

Creating a site from a json file sounds good. I defintely want to play with
that, but what is required on server?

~~~
avidas
The site is a node app, so you would need node and npm (the package manager
for node) on your system.

------
raziel2p
I hate editing JSON by hand. Why not YAML?

~~~
WorldWideWayne
I can give you my own reasons. I avoid YAML because it's not simple like JSON.

Just look at the YAML spec -
[http://www.yaml.org/spec/1.2/spec.html](http://www.yaml.org/spec/1.2/spec.html)

compared to JSON - [http://json.org/](http://json.org/)

and JSON is already everywhere (as a built-in library, a known mime type,
etc). I have to go out of my way in order to use YAML.

I guess the other reason is that I never trust projects with names like "Yet
Another..." because I feel like it conveys a lack of craftsmanship. Looking at
that YAML spec again today, it looks like every feature was thrown into it
with little to no discrimination.

~~~
bpicolo
The parts you generally use and the length of the spec are entirely different
things. This argument is always silly.

~~~
WorldWideWayne
There's no need to be rude about it. Your first statement would have sufficed
to make your point.

Anyway, I didn't say that I don't use it because of the length of the spec. I
said I don't use it because it's orders of magnitude more complex than JSON
and I used the spec as an example of that. A bigger spec means a bigger parser
and a higher probability that other people will not limit themselves to the
parts that "you generally use".

To that, I added that JSON is everywhere already and YAML isn't. My point
about the name seems a little silly, but my intuition has served me well over
the years.

------
amelius
I don't understand why we should use JSON to configure a server, when a much
more powerful language exists: Javascript.

For example, instead of hardcoding some setting in JSON, a Javascript
configuration file could perform queries before configuring, or it could
install callback functions as part of the configuration.

~~~
JimDabell
> I don't understand why we should use JSON to configure a server, when a much
> more powerful language exists: Javascript.

 _Because_ it's more powerful. More powerful, in many cases, is a worse thing.
Executable imperative code isn't as flexible as a data file because all you
can really do with it is execute it and take the output, rather than process
it as you see fit.

See:

Rule of Least Power –
[https://en.wikipedia.org/wiki/Rule_of_least_power](https://en.wikipedia.org/wiki/Rule_of_least_power)

Principle of Least Power –
[http://c2.com/cgi/wiki?PrincipleOfLeastPower](http://c2.com/cgi/wiki?PrincipleOfLeastPower)

~~~
amelius
These articles are phrased as if they are facts. However, they are just some
opinions that some people feel are useful.

Take for instance the idea of the "semantic web", where information is stored
neatly into proper html tags. It has turned out that this is not a very useful
approach to storing information, and nowadays big search engines use machine
learning techniques instead to extract the information.

