5 ms·
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
by fimdomeio 3y ago
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.
- asddubs 3y agoif you want simple, you can't beat PHP + HTML. I wouldn't actually go that simple for anything that's more than a single purpose script, usually I would at least have a separate templating library, but it's really nice that you can do it.
- SoftTalker 3y agoYeah the advantage of PHP is that it is its own templating language. You don't need anything else.
- bluGill 3y agoThere are a number of simple frameworks, but soon you are back to the common bloat from adding too many frameworks.
- pickingdinner 3y agoYa, 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 <html src="" /> at will.
- sseagull 3y agoIf the http server supports it and it is enabled, you can do Server Side Includes https://en.m.wikipedia.org/wiki/Server_Side_Includes https://en.m.wikipedia.org/wiki/Server_Side_Includes
- mobilio 3y agoEven better - Edge Side Includes: https://blog.cloudflare.com/edge-side-includes-with-cloudflare-workers/ https://blog.cloudflare.com/edge-side-includes-with-cloudfla...
- pickingdinner 3y agoEven better better just <html src="" /> or even <div src="" /> Functionality should be considered based on potential utility. Not sure what politics are involved at the w3c, but if it's not that, then maybe it's their philosophy and approach that has them not going for that which is most useful.
- 8n4vidtmkvmk 3y agoYou can build a router and layout in about 100 lines with no libs. If the router just checks the existence of the file and the layout just includes header.php, pagename.php and footer.php. I do that for simple sites. Very easy and fast.
- michaelteter 3y agoI 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.
- ehnto 3y agoAgreed, with the caveat that it's only so easy if a server is already set up for it. Otherwise it loses a bit of it's edge, but not by much. We are being simple, and I consider a simple PHP site about one step above HTML and CSS in required complexity, and about 5 steps below anything else in regards to tooling/setup/execution.
- yurishimo 3y agoI think every flavor of Linux except Alpine includes PHP by default if you go the VPS route and every $2 shared host also has PHP. Seems like a bit of a moot point.
- XCSme 3y agoWorking with PHP has always been such a breath of fresh air. No build process, just upload the files via FTP and it works. You can keep it as simple as you want (just include() files, write functions directly, I never really need to use classes in PHP).