52 points · by hilverd · 4y ago · 10 comments
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.
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/...
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.
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!
You can see this in the demo here: https://googlechromelabs.github.io/text-editor/