Live data from Hacker News

How to build a website without frameworks and tons of libraries

kodingkitty.com

51–60 of 270 posts

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

#51

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…

I've been meaning to do this and move away from Smugmug. Would you be okay to share your portfolio and/or source?

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

#52
The article says "Unfortunately, Jamstack tools require an initial setup and an initial (and continuous) learning" but with the bare minimum, static website generators are nothing more than glorified template engines.

I'm using Hugo and for my purposes, I always start without any theme. Basically, I start to write a markdown file for each page, and an HTML template, then if I need more complexity I have the power available underneath.

Static website generators are not necessarily complex to use, and they generally stay compatible from version to version so you only need to learn the new features and only if you want to use them.

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

#53
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 localstorage.

So what to do? My preferred choice is having an inline style element of:

body {visibility: hidden; opacity: 0;}

This will maintain the previous page until DOMContentLoaded, at which point you can query prefers-color-element and localstorage, set the body class correctly, and let the page paint.

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

#54

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…

I've been meaning to do this and move away from Smugmug. Would you be okay to share your portfolio and/or source?

On their profile they have their website linked (https://jamiedumont.com/)

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

#55
post #21

Slightly off-topic: His single "index.php" with jQuery is helping him to earn thousands per month. https://twitter.com/levelsio/status/1675829733668319233/phot...

His business ideas and the fact that he just ships is what earns him thousands per month.

End users don't give a shit what you build it with, but none of it matters unless you're willing to shit products out.

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

#56
post #21

Slightly off-topic: His single "index.php" with jQuery is helping him to earn thousands per month. https://twitter.com/levelsio/status/1675829733668319233/phot...

Congratulations to him, but 14,000 lines in a single script? I would pay to not give maintenance to that.

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

#57
post #17

I'd go with Astro. Super easy to get started and has lots of goodies to generate static HTML. You can scale it up later if you need more than just a static website.

This is the thing with digital stuff, nor simple nor simplistic stays enough.

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

#58

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.

Ya, or any server side scripting language. You just want the ability to refactor your site, as in, name, save, and load data and code blocks. And if html allowed inserting html as it does css or js from external files, even that would be mostly be redundant. If only it let you use at will.

If the http server supports it and it is enabled, you can do Server Side Includes

https://en.m.wikipedia.org/wiki/Server_Side_Includes

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

#59

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…

You could use server-side includes to get the basic prev-next navigation and consistent menus, headers and footers.
Post reply on HN