[HN Gopher] Show HN: Glossary page template with a built-in editor
       ___________________________________________________________________
        
       Show HN: Glossary page template with a built-in editor
        
       This started out as a static HTML file, being used by some
       developers at my current employer to document "domain terminology"
       relevant to products we're building.  Soon it became too much work
       to update the items in the HTML manually, so I added a JavaScript-
       based editor. It relies on a tiny Node.js server to write changes
       back to the HTML file.  Not as user-friendly as a "normal" web-
       based application, but it does mean we can keep the HTML file under
       version control and follow our normal development process for
       making/tracking changes.
        
       Author : hilverd
       Score  : 45 points
       Date   : 2022-06-26 15:37 UTC (7 hours ago)
        
 (HTM) web link (glossary.page)
 (TXT) w3m dump (glossary.page)
        
       | ivan_ah wrote:
       | So what is the deploy path here?
       | 
       | Am-I supposed to save the html to a given dir, then run the
       | server in the same dir? https://github.com/hilverd/glossary-page-
       | template/blob/main/...
        
         | michaelsmanley wrote:
         | If you just open the file in a browser, it provides deployment
         | instructions.
         | 
         | I thought it might work like Tiddlywiki, so I tried that first.
         | Not a bad little hack.
         | 
         | Every time I start work in a different business, I start a
         | glossary. I have considered a specialized web application for
         | that purpose, but always end up just creating a Google Doc or a
         | wiki page, depending on what the company uses.
        
           | hilverd wrote:
           | Yes -- you beat me to it :-).
           | 
           | The built-in server is meant to be run only locally/offline
           | (typically by a developer), just for making changes to a
           | glossary. If you download and open the template (not one of
           | the "full" examples) in a browser, then it tells you how:
           | 
           | sed -n '/START OF editor.js$/,$p' glossary.html |
           | FILE=glossary.html node
           | 
           | Then you would host glossary.html (and maybe the CSS and JS
           | if you don't want to point to the CDN) wherever you want, as
           | it's just a static web page.
           | 
           | I will make this clearer in the documentation -- thanks!
        
       | 1023bytes wrote:
       | It might be possible to do this without the Node.js server by
       | using the File System Access API
       | 
       | https://web.dev/file-system-access/
        
         | hilverd wrote:
         | Interesting, I hadn't considered that -- thanks. I was just
         | having a look and it seems that right now, only Chrome and Edge
         | (and Brave?) support that API. I'll keep an eye on it, because
         | it doesn't seem like a viable option yet until Safari and
         | Firefox also do.
        
       | oefrha wrote:
       | Maybe render the Jargon File in this format? Although it might be
       | too large for a single page.
       | 
       | http://www.catb.org/jargon/html/
        
         | hilverd wrote:
         | Thanks, I had been looking for existing glossaries with
         | permissive licenses to use as examples, and this one wasn't on
         | my list yet. It does look way larger than any of the other
         | examples. But it would be interesting to explore what sort of
         | changes would be required to the template to keep it usable in
         | practice.
        
           | tutuca wrote:
           | The jargon file is trully an amazing relic. I love to get
           | back to it from time to time. Your tools looks like an
           | amazing overvamp for it! Great work!
        
       ___________________________________________________________________
       (page generated 2022-06-26 23:00 UTC)