Live data from Hacker News

How to build a website without frameworks and tons of libraries

kodingkitty.com

91–100 of 270 posts

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

#91

I believe the most minimalistic and productive way is to just use php. The language was specifically just created for that. If it's a simple site then you don't need composer you don't need router logic. just create separate files for header footer navigation and include them on each page.

I agree with your sentiment, but with just 5-20 hours of effort one can make an effective Eleventy-based custom site generator which is then deployed on Netlify for free (and edge-available globally).

Edit something, git commit/push, and within 30 seconds your changes are live everywhere. It's pretty awesome, and it requires no "server" hosting.

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

#94
post #10

This seems to fall into the 'simplistic, not simple' school of thought. You can have a relatively simple website if it doesn't do anything and if it cuts corners. Take your dark mode, which is just about the only nontrivial feature I see on this page. (One could also criticize the low contrast of the appearance and other problems, but that's less relevant to the simplicity thesis you're claiming.) First, your dark mo…

> First, your dark mode is implemented wrong in the lazy corner-cutting way of doing JS post-load ... I agree with your whole comment, but the media query approach is also tricky. You typically still want to offer a toggle while respecting prefers-color-scheme, and you may want to give priority to whatever choice the user has made with that toggle if they've used it on your site before. This still requires JS and loc…

Prometheus Modern UI has a pretty good system/dark/light toggle - and picks the system one first.

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

#95

Earlier quoted context omitted.

Instead of using an off the shelf framework, they made their own. And that's cool. Making stuff is fun.

For sure! I'm all in favor of bespoke new tools. If anything I'm just confused about the way they describe this in contrast to SSGs (and why a SSG wasn't a good option for them), and then go on to create a tool that literally generates a static site. :P Maybe I'm being obtuse, but the reasons they gave for not using an established SSG primed me to expect a radically new solution. Versus "we didn't like any existing S…

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

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

#96

I've landed on the same approach for my photography portfolio. Benefit of jumping ship from development to photography is that I don't have to rely on Squarespace like most other photographers! After trying a few server-based options like Ghost, Statamic and self-built ones with Phoenix or Vapor (I've covered some ground as a dev) and the usual SSG options I ended up just writing everything as straight HTML without a…

How was your experience with Vapor?... Also, you might find some value in an approach that I used recently ( https://news.ycombinator.com/item?id=36592641 ). Using a Google Sheet as the data driver was easy, but it could have just as well been a filesystem of photos.

I really want to like Vapor because it's just a simple stripped back server-side framework; but I always get frustrated building with it. I've loved learning SwiftUI, but Vapor - even with Leaf swapped out for Plot - just isn't as ergonomic.

Plus I have the lingering memory of working with Elixir and Phoenix LiveView which is kind of the gold standard for web frameworks at the moment in my opinion.

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

#97

Did anyone else notice the fact that on the home page, for any window width >= 1280px, the text "Your design. Our HTML and CSS" (in the body) overlaps the text in the footer (and is strangely hard to select for copying to the clipboard). In fact the footer tends to overlap the body at various window sizes. Can't help but think that you'd wanna at least get a simple thing like that right on such a page... Edit: I noti…

On my Chrome/Android I have the default font size larger. And sometimes HN loads with my preference - and others it loads tiny. No rhyme/reason.

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

#98
This is the same approach I took when trying to set up a small project site at SDF.org. It was a great way to build a site, and learn some new things while having a bit of fun. Sadly, I just don't have the time to generate the content I wanted to do, so the site sits.

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

#99
> 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 Jinja template into index.html and ... > ... calls Tailwind CSS CLI to generate styles.min.css.

love posts like these that insult literally any other way of doing things except their way, claiming it's "simple" when in the end they don't even show the step by step code or link to any repository that shows how it's done. regardless of "without frameworks or tons of libraries", its esoteric and definitely not an average or common way of doing things (to the rest of us), and clearly DOES use codes (and/or?) a framework!!!

no description of what the heck "Watchdog.py" is, no description of what Jinja - I for one don't know what either of those are, sorry if i'm an "ignorant normie"

simply put, it's quite clear you ARE using frameworks, just in your mind, perhaps, you "aren't"

this whole framework vs no framework vs BS vs BS vs BS has gotten really out of hand, and 99% of devs cant see the forest from the trees

what in the world did i just read

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

#100
I recently built AI Search with 0 frameworks and dependencies (please don't hate because of the word AI)

For comparison, similar sites are a lot heavier (not criticizing anyone here)

phind.com = 1.09MB

you.com = 1.3MB

aisearch.vip = 0.035MB

I still find the ~1MB of other sites to be ok, but 35kB is the smallest I've ever made a full SPA and that's simply because every single letter in the code is specifically made for this one and only site (and uses vanilla everything)

Post reply on HN