[HN Gopher] Injecting environment variables into static websites...
       ___________________________________________________________________
        
       Injecting environment variables into static websites using Nginx
        
       Author : kaeruct
       Score  : 31 points
       Date   : 2021-09-30 06:13 UTC (16 hours ago)
        
 (HTM) web link (www.innoq.com)
 (TXT) w3m dump (www.innoq.com)
        
       | joshe wrote:
       | Just for entertainment... In 1995 or so, netscape server came
       | with server side includes so you have your navigation come from a
       | separate page. You'd put this in your html
       | 
       | <!--#include file="header.html"-->
       | 
       | and the header.html file would be just inlined into the page.
       | 
       | You could also write plugins for Netscape server in c to do
       | whatever else you liked to the html page before serving it to the
       | browser.
       | 
       | It was all blazingly fast, the compiled binary code was in memory
       | and unix was doing a good job of keeping our frequent pages (out
       | of about 30,000 in total) in memory too. We easily saturated our
       | datacenter's networking with it. All with mid range for it's time
       | but now hilariously puny server.
        
       | slantview wrote:
       | Just because you do SSG doesn't mean you can't run _any_
       | javascript. This seems like a lot of work to just put a little JS
       | button on the site.
        
       | buzer wrote:
       | Oh wow, SSI. Now that's a term I don't remember hearing for
       | almost 20 years.
       | 
       | Surely you can still find some old site from somewhere that uses
       | it, but has someone actually used it even somewhat lately & what
       | use case you had? For most cases where it made sense you would
       | probably just use some static site generator and deploy different
       | version if required. Or do the replacing during the publishing
       | phase.
        
         | snorkie wrote:
         | I use it on my private site. Nothing fancy, just a couple of
         | static pages. I use it for including header and footer.
         | 
         | PHP is totally overkill, and even a site generator feels
         | overkill for this purpose; now I can just throw together some
         | html and upload, no need for running a script.
         | 
         | Also it's a bit of nostalgia (the reason I implemented it a
         | cople of years ago) since ssi was my first contact with web
         | development back in '96 or whenever :)
        
         | sourcecodeplz wrote:
         | Footers, headers, update date.
        
       ___________________________________________________________________
       (page generated 2021-09-30 23:01 UTC)