Show HN: Nash, I made a standalone note with single HTML file
49 comments
·March 14, 2025cxr
Great work.
Consider changing the behavior so that when the page is opened in the browser from the local disk, then it opens edit mode automatically, but when it's published to someone's website and accessed on the open web (check if the address is http/https), then it's a normal, read-only view expected from most pages.
Of course:
1. there should be a way to override this (a query string param or magic URL fragment) so you can look at it in edit mode, too
2. there should be a blanket exception for certain domains/URL prefixes—defaulting to keepworking.github.io (or <https://keepworking.github.io/nash/>)—so it activates edit mode on that site, too, which means that you personally don't have to do anything special to make the demo work (best if this exception is user-modifiable, so e.g. someone else can get the same behavior if they want without using the trick from #1)
zaphod420
I actually really like the idea of websites that allow you to edit the content and save it locally... IMO, this is brilliant and should stay as is.
genshii
This is cool. It's funny how we are (or maybe just I am) so used writing the JS parts of websites outside of the actual HTML that my first thought upon seeing this was "wow it's crazy that this can be done with just HTML". And then looking at the source and seeing all the JS in plain old script tags made me remember that that's a thing that you can do.
hakaneskici
HTML is underrated. Most of the screens we look at daily, including our code editor are HTML pages.
OtomotO
Eh, no?
My Code editor is NeoVim or it's IntelliJ
But there is no HTML page involved at all.
What I want to hint at: You're extrapolating the usage of VSCode.
hakaneskici
As a side joke regarding vim; I have a theory that my exposure to typewriters as a kid prevented me from adopting vim as an editor :)
Pressing the letter keys for anything other than typing feels so weird to me. My brain might still be thinking of the SHIFT key as a physical modifier that literally shifts the typewriter letters from uppercase to lowercase position.
I admire fast vim users, it's a joy to watch them code.
sanex
According to the latest stack overflow dev survey 74% of respondents use vs code. I think it's a pretty safe statement.
harrisonjackson
Pretty sure IntelliJ contains a bunch of bundled webviews for various things.
Also, extrapolating usage of vscode seems pretty fair since they said "most"
alwayslikethis
I wish browsers had better support for local web apps. If local files can access persistent storage easily, this can open it up a lot of opportunities for quick and easy GUI apps. Basically the opposite of electron.
mikae1
You could make this self contained and truly portable with "real" save using https://rpdillon.net/redbean-tiddlywiki-saver.html
Alive-in-2025
Yes, please make it offer to save a file. That gets us much closer to the capability of having private bookmarks if we want to
hakaneskici
Nice job! There was a previous discussion about this idea with a mention of TiddlyWiki:
lifthrasiir
Suggestion: It should warn when you have edited it and are about to close the page without saving. Consider adding an `onbeforeunload` handler.
czhu12
I actually was hoping to find something like this, but that uses local storage as a backend so it can be plugged into my reframe [1].
It would be nice to have a reasonably nice text editor for notes and whatnot everytime I open a new tab.
null
croisillon
recently i tried to write a local wiki with tiddlywiki and failed lamentably, ending up writing directly an html file *
Nash appears to simplify my job, thanks!
* plus this for an easy TOC https://codepen.io/cgurski/pen/qBrNrPo
pgreenwood
This is quite cool, but I am not sure I understand the difference between 'Save' and 'Share'. They both seem to just save a file.
layer8
Save uses an a href (link) with download attribute (https://developer.mozilla.org/en-US/docs/Web/HTML/Element/a#...), which will usually trigger a normal file download.
Share uses Navigator.share (https://developer.mozilla.org/en-US/docs/Web/API/Navigator/s...), which should invoke the browser’s “share” menu if it has one.
joleyj
Is this similar to TiddlyWiki https://tiddlywiki.com/ ?
melvinroest
The HTML part of it perhaps but tiddlywiki is also about connecting ideas.
I think this focuses much more on the standalone HTML part of it.
In the same vein, one could also distribute P2P apps via a standalone HTML file by hooking it up via WebTorrent and using their STUN servers. Or at least, I know that it's possible in the past. Just an example, standalone HTML files can be fully fledged apps is my point.
20after4
Certainly a similar idea.
colonCapitalDee
Nice. I do backend web dev, and it's sometimes useful to have a lightweight testing frontend that's more flexible than Swagger. I've had a lot of success vibe coding my way through these frontends with Claude by rapidly iterating on a single file containing HTML + CSS + JS. It's quite fast to get something good enough working, and putting everything in a single HTML file format keeps it simple enough for me, a guy who doesn't do frontend, to mostly understand what's going on. "All in one" HTML file is a good trick :)
nextts
Noice!
UX suggestion. You don't need the "as read only" save options if when you do a normal save the page tells you if it has been changed. That'll get you down to 2 menu options and make me think less.
Hello HN, I hope it will posted as well. I made a note in single html file. This does not require a separate membership or installation of the software, and if you download and modify an empty file, you can modify and read it at any time, regardless of online or offline. It can be shared through messengers such as Telegram, so it is also suitable to share contents with long articles and images. It is also possible to host and blog because it is static html file content.