commit f7c5a9a1c6d17fc03a9ca23bd71eebb37c3a3543 Author: Duc-Tam Nguyen Date: Sun Jun 14 18:21:50 2026 +0700 Add license and readme Start the kage repo: a tool that clones a website into a self-contained folder you can browse offline, with the JavaScript stripped out. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d7b20e6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,11 @@ +/bin/ +/dist/ +/kage-out/ +*.out +.DS_Store + +# Built docs site (tago output) and its cache +/docs/public/ +/docs/public-pages/ +/docs/public-cf/ +**/.tago-cache.db diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d2f84c4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "docs/themes/tago-doks"] + path = docs/themes/tago-doks + url = https://github.com/tamnd/tago-doks diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..7679c4b --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Duc-Tam Nguyen + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..4f02fe2 --- /dev/null +++ b/README.md @@ -0,0 +1,142 @@ +# kage + +**kage** (影, "shadow") clones a website into a self-contained folder you can +browse offline, with all the JavaScript stripped out. It renders every page in +headless Chrome, snapshots the final rendered DOM, removes every script and +event handler, and downloads the CSS, images, and fonts and rewrites them to +local paths. The result looks like the live site but runs no code: a plain +folder of `.html` files you can open straight from disk. + +```bash +kage clone example.com +kage serve kage-out/example.com +``` + +## Why + +Saving a page with "Save As" gives you a copy that still phones home, still runs +analytics, and often renders blank because the markup is built by JavaScript at +runtime. kage takes the opposite approach: + +- **Render first, save second.** Each page goes through real headless Chrome, so + a page whose content is assembled by JavaScript is captured the way a human + would have seen it, not as an empty shell. +- **Strip every script.** Once the DOM is captured, kage removes all `