Live data from Hacker News

How to build a website without frameworks and tons of libraries

kodingkitty.com

181–190 of 270 posts

Re: How to build a website without frameworks and tons of libraries

#183

"as simple as possible but no simpler" - (not Albert Einstein, probably) Pure HTML + CSS, with the CSS in the or inline in each html tag... this is a fine way to get something going. And then when you have two pages, you pull the CSS out to a separate file. But once you start making any site which has multiple pages of the same format, you want some kind of template system with includes and a (static page) generator.…

Have you open sourced this or found a similar project?

Does it make an API guy to the google sheets api client side to populate the data, if so is there a caching layer or does each client get a fresh copy.

Re: How to build a website without frameworks and tons of libraries

#184

"as simple as possible but no simpler" - (not Albert Einstein, probably) Pure HTML + CSS, with the CSS in the or inline in each html tag... this is a fine way to get something going. And then when you have two pages, you pull the CSS out to a separate file. But once you start making any site which has multiple pages of the same format, you want some kind of template system with includes and a (static page) generator.…

> when you have two I tend to refactor on two, but I've heard that letting DRYness lapse until three tends to be the sweet spot in terms of likeliness to break even in effort. Although I guess pages per site is almost guaranteed to hit 3 anyway, whereas in general a block of code being used 3+ times doesn't necessarily have that same likelihood.

I agree on 2 vs 3, but with CSS and other formatting rules it is too easy to become inconsistent on 2. And I hate inconsistency.

Re: How to build a website without frameworks and tons of libraries

#185

"as simple as possible but no simpler" - (not Albert Einstein, probably) Pure HTML + CSS, with the CSS in the or inline in each html tag... this is a fine way to get something going. And then when you have two pages, you pull the CSS out to a separate file. But once you start making any site which has multiple pages of the same format, you want some kind of template system with includes and a (static page) generator.…

Have you open sourced this or found a similar project? Does it make an API guy to the google sheets api client side to populate the data, if so is there a caching layer or does each client get a fresh copy.

I assume it's a hook to rebuild on changes and data is statically embedded during build. Happy to also see the details of OP's work. Sounds great!

Re: How to build a website without frameworks and tons of libraries

#186
I fondly remember writing a bottle.py+jinja based dashboard wrapped into a windows utility that allowed to let that run as a service. My first web app, only for my team's internal use, without any autoscaling etc but boy did I have fun writing it!

It's a scale thing - today I would reach for a framework for bigger things but lightweight setups have their own place.

Re: How to build a website without frameworks and tons of libraries

#187

"as simple as possible but no simpler" - (not Albert Einstein, probably) Pure HTML + CSS, with the CSS in the or inline in each html tag... this is a fine way to get something going. And then when you have two pages, you pull the CSS out to a separate file. But once you start making any site which has multiple pages of the same format, you want some kind of template system with includes and a (static page) generator.…

Have you open sourced this or found a similar project? Does it make an API guy to the google sheets api client side to populate the data, if so is there a caching layer or does each client get a fresh copy.

I have not open sourced it. I probably wouldn't go to that trouble, but I might write a good blog post illustrating it.

The Google Sheet has a script associated with a button which the sheet editor uses to "publish" the changes. That triggers a rebuild on Netlify, and the build does the sheet data fetch. This was better than automatically triggering the build on sheet save, since the save happens within a second or two of every change.

Netlify has an unpublished URL trigger to force a rebuild, and that URL requires no authentication. Thus, one must be careful about making that URL public. But worst case scenario, the free tier Netlify build credits get used up for a period.

Re: How to build a website without frameworks and tons of libraries

#189

Earlier quoted context omitted.

I'm with you. Jinja and watchdog.py taking somefile.src.html -> somefile.html feels a bit static-site-gen-ish.

[flagged]

Can you please stop posting unsubstantive comments? We're trying for something different here.

https://news.ycombinator.com/newsguidelines.html

Re: How to build a website without frameworks and tons of libraries

#190

> Mind you, Hetzner webhosting starts at 2 EUR! How crazy is that? Oh yeah? and netlify is totally free for an infinite amount of sites! how crazy is that? > We use a short Python script with exactly 45 lines of code. Including comments and blank lines. > > In summary, this is the simple toolchain for building our web: > > Developer updates index.src.html > Watchdog.py detects the file change and ... > ... renders Ji…

Take a deep breath and go for a walk, there's no reason an inconsequential blog post should make you this angry.

Anyone who has spent a good chunk of their life trying to keep things as minimal as possible after being “inspired” by such articles can understand the reaction. There’s no reason a sensible comment, even if it’s a bit emotionally charged, should trigger your zen master spidey sense. I’m sure they’re speaking from experience and are trying to prevent others from taking the oh so tempting bait.
Post reply on HN