{"id":32558015,"url":"https://github.com/tycobbb/www-os","last_synced_at":"2026-07-08T15:31:44.330Z","repository":{"id":142119878,"uuid":"460575293","full_name":"tycobbb/www-os","owner":"tycobbb","description":"a one-file \"spa\"","archived":false,"fork":false,"pushed_at":"2022-02-18T03:20:23.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-28T23:53:09.192Z","etag":null,"topics":["420","69","dumpling","framework","single-page-app","static-site","web0"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tycobbb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-02-17T19:19:44.000Z","updated_at":"2022-10-26T23:47:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"6c8fbcfc-48e0-4197-8e7e-01c034dc5ccf","html_url":"https://github.com/tycobbb/www-os","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tycobbb/www-os","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tycobbb%2Fwww-os","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tycobbb%2Fwww-os/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tycobbb%2Fwww-os/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tycobbb%2Fwww-os/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tycobbb","download_url":"https://codeload.github.com/tycobbb/www-os/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tycobbb%2Fwww-os/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35270196,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["420","69","dumpling","framework","single-page-app","static-site","web0"],"created_at":"2025-10-28T23:52:30.894Z","updated_at":"2026-07-08T15:31:44.322Z","avatar_url":"https://github.com/tycobbb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# www-os\n\na one-file \"spa\" for static sites. think you need react, svelte, vue, turbo, pjax, whatever? think again. \n\ncopy [this one file](https://github.com/tycobbb/www-os/blob/main/os.js), it's not perfect, it certainly has some bugs, it's definitely missing features, into your project and modify it as you see fit. now your static site is \"single page\".\n\n## installation\n\ncopy [this file](https://github.com/tycobbb/www-os/blob/main/os.js) into your project and load it like:\n\n```html\n\u003cscript type=\"module\" src=\"os.js\"\u003e\u003c/script\u003e\n```\n\n## usage\n\ncreate a template for your pages where all the page content is in an element with a consistent `id`, like:\n\n```html\n\u003chead\u003e\n  \u003cscript type=\"module\" src=\"os/os.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n  \u003c!-- the page content --\u003e\n  \u003cdiv id=\"page\"\u003ethis will change if click a link\u003c/div\u003e\n  \n  \u003c!-- the persistent content --\u003e\n  \u003cdiv id=\"persistent\"\u003ethis will not\u003c/div\u003e\n\u003c/body\u003e\n```\n\nas long as the string on [this line](https://github.com/tycobbb/www-os/blob/62e25c6ee562ba905681bd3464f41d878236f34f/os.js#L4) \nmatches the `id` of the element w/ your page content, you're good.\n\n```js\nconst kId = {\n  Page: \"page\",\n}\n```\n\n## how it works\n\nevery time you click a link, the contents of the element w/ the id `page` element (in our example) will be replaced with whatever is in the new page's `page` element. nothing else, like the `persistent` element, will change (e.g. you can put audio elements in there that live across multiple pages).\n\nsimilarly, everything outside the new page's `page` element is ignored (though this is [a bug or a few](README.md#todos)).\n\n## is this for me?\n\nif you already know the answer, no need to read further.\n\ndo you want to avoid learning a bunch of complicated stuff that will make your life harder? that will make your site slower? harder to maintain?\n\ndo you need a piece of technology at all? does your site really need a backend? if it can be powered by a cms, the answer is no. could you isolate the part of the site that needs a backend into a much smaller service?\n\nif answering any of these questions made you twink twice about technology decisions, then this library may be for you. \n\n## todos\n\n- [ ] the new page's `\u003ctitle\u003e` should be merged in\n- [ ] you [tell me](https://github.com/tycobbb/www-os/issues)\n- [ ] or better yet, [implement it](https://github.com/tycobbb/www-os/compare)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftycobbb%2Fwww-os","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftycobbb%2Fwww-os","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftycobbb%2Fwww-os/lists"}