News for hackers. Stuff that matters.
Re:Site.js: Small Web construction set by raajg on Saturday January 23, 2021 @06:46PM (#25887257)
Followed the links and came across https://small-tech.org/ which is pretty interesting. An example of how technologist can make a dent in how technology has been progressing thanks to an ad-driven internet.
Re:Site.js: Small Web construction set by 0xmohit on Sunday January 24, 2021 @03:09AM (#25890295)
For the rationale behind building site.js, refer to the post "What is the Small Web?" [0] by Aral Balkan.

[0] https://ar.al/2020/08/07/what-is-the-small-web/

Re:Site.js: Small Web construction set by santa_boy on Saturday January 23, 2021 @09:04PM (#25888270)
Absolutely! Very impressed and inspired too!
Re:Site.js: Small Web construction set by grantcarthew on Sunday January 24, 2021 @06:50AM (#25891297)
For small sites I much prefer straight HTML, CSS, and JavaScript. I made `htmlsync` to help with the header and footer content: https://github.com/grantcarthew/deno-htmlsync
Re:Site.js: Small Web construction set by superkuh on Sunday January 24, 2021 @01:45AM (#25889898)
Wow. That looks super complicated. For a small website I'd recommend just using your system repo to install nginx and then putting html and media files in the web directory.
Re:Site.js: Small Web construction set by nmstoker on Sunday January 24, 2021 @06:33AM (#25891210)
It didn't strike me as that complicated or hard to follow.

The method you describe is fine but the average user will quickly run into a lack of features that are taken for granted with that approach, and if they then progress to something more "mainstream" it will probably be way more complicated than this.

Re:Site.js: Small Web construction set by superkuh on Sunday January 24, 2021 @12:15PM (#25893691)
For the vast majority of simple sites a static nginx web directory is perfect. For anything more dynamic they'd be better off using a real setup and not some opaque javascript all-in-one binary full of unintentional (to the user who didn't explicitly set them up) attack surfaces.
Re:Site.js: Small Web construction set by nmstoker on Sunday January 24, 2021 @03:37PM (#25895691)
Ah, like another left-pad situation?
Re:Site.js: Small Web construction set by divbzero on Friday February 05, 2021 @04:31PM (#26041473)
For a small website, double-clicking to open an HTML file in the browser would work just as well as nginx. You’d have to stick with relative URLs for links and image sources but that is a minor limitation.
Re:Site.js: Small Web construction set by thunderbong on Sunday January 24, 2021 @03:16PM (#25895466)
In a way you're right, there are a bunch of commands. However, they are pretty straight-forward and simple. And that's only required for the initial setup.

Your comment already assumes that just because a person can type in commands on a terminal, they need to know about version management, nginx configuration and letsencrypt setup.

If you look at the site docs [0], it further syncs from local to remote.

Also, in many cases all the overhead that we, as software developers assume we should have for everything, need not be the case for just a simple website.

[0]: https://github.com/small-tech/site.js/blob/master/README.md

Re:Site.js: Small Web construction set by superkuh on Sunday January 24, 2021 @11:14PM (#25899018)

    sudo apt-get install nginx
Check where nginx puts the www directory by doing a google search, "myos version nginx default directory".

    cp index.html /var/www/
    cp latestphoto.jpg /var/www/
    # or use your OS GUI file manager
Set up the port forward from the router to localip:80 and you're done.

You're assuming you need HTTPS but it's a personal static site so no letsencrypt is needed yet. You're assuming they need to configure nginx, but they don't the debian/ubuntu defaults are fine. You're assuming they need to learn version management for some unfathomable reason but I can't even understand that. You're assuming people need some sort of 'sync' but they don't. That's what an OS file manager is for.

It's really not that complex unless you make it so.

Re:Site.js: Small Web construction set by shipstain on Sunday January 24, 2021 @10:57AM (#25893016)
It's strange that plain old html and media files are so shunned for simple sites.

Buying a domain name, buying web space, pointing the domain name to the web space, uploading files. Does seem ever so simple compared with a million other complex workflows.

And yet, it didn't really catch on.

Give someone a one-click installer and the bottleneck will still be content creation and design by committee.

Re:Site.js: Small Web construction set by vittore on Monday January 25, 2021 @03:14AM (#25900705)
I like the idea, but i feel like it should be dumb-ed down even more.

For simple things I like using next.js with vercel (ex zeit, ex now). You also get simple file-system based routing if you want it (thanks to next.js) and very easy deploy, that is also gets you letsencrypt certificate automatically. It does not have database part of the story atm, but you can use dynamo/fauna/mongo and alike.

Really simple thing is dark lang though! it has all of these concerns integrated in, have IDE and incremental automatic deployment. Absolutely love it. But it is still quite early beta.

Re:Site.js: Small Web construction set by chrismorgan on Sunday January 24, 2021 @05:49AM (#25890981)
Meta on the site’s presentation:

If you’re going to use thick light link underlines (text-decoration-color: #ccd6ce; text-decoration-thickness: .2em; text-underline-offset: .25em), please also turn off descender skipping with `text-decoration-skip-ink: none`. With this style of underline, descender skipping becomes a surprisingly large distraction if it kicks in, achieving precisely the opposite of what it was introduced to achieve (reducing distractions and improving readability).

(Tested in Firefox and Chrome on Windows on a 2× display. In Firefox, shifting the underline about half a CSS pixel further clears the ink skipping. In Chrome, it already clears it by about 2.7 CSS pixels, because the default underline position already takes font metrics into account, which seems a very-dubious-to-wrong choice to me once you’re offsetting, but is currently within spec since the `text-underline-position: auto` spec just says “The user agent may use any algorithm to determine the underline’s position; however it must be placed at or under the alphabetic baseline.” `text-underline-position: from-font` explicitly opts into this behaviour (works on Firefox), and there is no way of opting out (so I don’t think there’s any way to instruct Chrome to draw the underline touching the text baseline).

Re:Site.js: Small Web construction set by kderbyma on Sunday January 24, 2021 @12:25PM (#25893783)
shameless plug. I am working on an open source project for something similar. it is a all-in-one website and generator. you can use it to generate static sites in zips and or host a live server and an admin panel for editting.

I just pushed demonstrable alpha out yesterday.

it's called Calliope.

(https://calliope.site)

Re:Site.js: Small Web construction set by kderbyma on Sunday January 24, 2021 @02:50PM (#25895170)
Netlify Routing is Down Presently - Using their subdomain works.

(https://calliope-demo.netlify.app/)

Re:Site.js: Small Web construction set by x86ARMsRace on Saturday January 23, 2021 @06:36PM (#25887183)
This looks really cool, however the long setup leads me to wonder how much time I'll spend maintaining this over something like a Ghost droplet on Digital Ocean.
Re:Site.js: Small Web construction set by fedorareis on Saturday January 23, 2021 @07:49PM (#25887670)
The 3 basic setup options are all either 3 or 4 steps. If you want websockets and the DB setup it is a little more involved. But having read through the “Get started in seconds” section I wouldn’t consider the setup for this long.
Re:Site.js: Small Web construction set by janaagaard on Sunday January 24, 2021 @03:25AM (#25890357)
The intro banner says “Sync and deploy to your own VPS”, but I can’t find info about setting up a custom domain and the likes.
Re:Site.js: Small Web construction set by tluyben2 on Sunday January 24, 2021 @06:20AM (#25891142)
Small web and simple web is html. Why this?
Re:Site.js: Small Web construction set by pmlnr on Sunday January 24, 2021 @11:43AM (#25893393)
Because then aral couldn't reinvent the wheel.
Re:Site.js: Small Web construction set by ljm on Saturday January 23, 2021 @07:03PM (#25887380)
> start the server using site enable and you’ll have a secure production web daemon that survives errors/reboots and auto-updates itself

Is an auto updating daemon what you want? And does it run under its own account? I wouldn't run this as root or under an account with sufficient sudoers privileges.

Re:Site.js: Small Web construction set by dylkil on Saturday January 23, 2021 @07:49PM (#25887669)
i think they mean it hot reloads
Re:Site.js: Small Web construction set by ChrisArchitect on Tuesday January 26, 2021 @01:11PM (#25919209)
what is this tho? This reads like any other small open source node based site generator page on github..... You're encouraging people to run their own sites/put up their own pages/own domains etc...... why the giant page of stuff and engine that's duplicating much of the other independent projects out there? what's the differentiator?
Re:Site.js: Small Web construction set by drizze on Saturday January 23, 2021 @10:51PM (#25889033)
following the dynamic part of this, it looks like they recommend DotJS.

https://sitejs.org/#dynamic-sites

I am not too familiar with DotJS, but it looks like its depreciated/unmaintained for years.

https://github.com/defunkt/dotjs

Re:Site.js: Small Web construction set by gbuk2013 on Sunday January 24, 2021 @08:01AM (#25891684)
https://github.com/olado/doT is what they are talking about I think.
Re:Site.js: Small Web construction set by rockwotj on Saturday January 23, 2021 @11:17PM (#25889189)
That dotjs is for user scripts (ie a chrome extension) not for the thing their talking about which is php for node.
Re:Site.js: Small Web construction set by fiatjaf on Saturday January 23, 2021 @08:57PM (#25888223)
Another JavaScript static website generator? Maybe what we want is actually to move these efforts to something like https://gemini.circumlunar.space/.
Re:Site.js: Small Web construction set by d--b on Saturday January 23, 2021 @10:34PM (#25888907)
That is not what it is.