Live data from Hacker News

How to build a website without frameworks and tons of libraries

kodingkitty.com

171–180 of 270 posts

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

#171

Earlier quoted context omitted.

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

[flagged]

Why are discussions of web development and JavaScript unique in that we can’t discuss alternative methods and trade offs without the discussion devolving into personal attacks and defensiveness?

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

#172
emacsformacos.com still uses a CGI script written in Perl which is just a very simple wrapper around Template::Toolkit. It _used_ to be CGI even in production but it had to change for silly reasons (_not_ related to speed!). The CGI script still exists but has a small tweak to loop over all the pages and save the output of each. Then I just rsync the output to the production server (which still runs Apache, lol).

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

#173

Earlier quoted context omitted.

Jinja is a templating framework. You can use it with ansible for example, to replace config values or secrets in a configuration file for different servers, etc

after some research i now know that, but there was no clear link or description of what the heck was going on

There is literally a link on the word Jinja to the Jinja docs...

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

#174

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

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

#175

Earlier quoted context omitted.

after some research i now know that, but there was no clear link or description of what the heck was going on

[flagged]

I know of Jinja only because I have dabbled in some Ansible and Python. Had I not done either I probably would have been none the wiser too.

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

#176
My advice would be to use github and github pages. It uses jekyll by default which is good enough for static website. It's easy to add domain. You can use HTML or Markdown and you don't need to write anything. I read jekyll starting guide and didn't do anything else, it was enough for everything I wanted to implement.

I also use cloudflare for caching, but that's more because I wanted to tinker with it. Surely GitHub can withstand personal blog.

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

#177

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

Most such blogs are that way--not telling you everything to reproduce what they did--but I did this for 23 years. I never used a framework of any kind. I rarely used someone else's code unless I had to. I had to use npm cause the credit card service required it. I didn't build our own server software. I did use my operating system's builtins.

And I can guarantee that at some point, most of you have visited one of two web sites I created. (My company created far more than that.)

It wasn't hard to do what I did. I'm a programmer, damn it. And I hired programmers to do the same thing. None of them struggled with it.

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

#178

Earlier quoted context omitted.

Doesn't that make the page completely unreadable for those few who have Javascript disabled though?

You add a simple tag to the top of the body that does the right thing for them

Too bad that visibility:hidden will hide this noscript tag.

Disabled JS != disabled CSS.

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

#179
post #116

Earlier quoted context omitted.

In 2005 maybe

Perhaps not 99%, and perhaps not new sites, but I'll bet those three environments combined run more than 80% of sites right now.

99% of code is boring, closed source, and provides business value. Most people do not work at FAANG, and do not want to. People mostly work at SMBs doing things that are not super exciting, and that's OK.

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

#180
post #103

Alright, I’m gonna be that guy. Right now, sveltekit + skeleton has absolutely blown my mind at how fast you can make a usable prototype. It’s honestly insane. You don’t even need to know svelte, really. As long as you can understand the file based routing thing, the rest is just html unless you really need more. Especially with the tailwind stuff built right in and a mostly vanilla looking theme. I’ve tried probably…

I'm not finding a "here's what you type and here's the final page" style example. Is there one? Id prefer not to install something and run through the steps just to see it.

try the tutorial? https://learn.svelte.dev/tutorial/introducing-sveltekit
Post reply on HN