Skip to content

Pages: save a copy of a page as one file that opens anywhere offline (P7a) - #46

Merged
YogiOnCode merged 1 commit into
mainfrom
pages/p7a-save-copy
Nov 18, 2026
Merged

YogiOnCode merged 1 commit into
mainfrom
pages/p7a-save-copy

Conversation

@YogiOnCode

Copy link
Copy Markdown
Owner

Stacked on #45 (base is pages/p5-pages-view). Merge #43, #44, #45 first.

First half of P7. Share › Save a copy… in the viewer bar, and Save a copy… on a card in the Pages view, save the page as one .html that opens anywhere with no network:

  • sealed with the viewer's policy, in the theme picked;
  • Clayo's stylesheet and script inside it; Chart.js and Mermaid only when the page uses them;
  • scripts and stylesheets it links from the three allowed CDNs fetched once, cached in %LOCALAPPDATA%\Clayo\cdn, and put inside; one that can't be fetched keeps its link.

What changed

  • Pages/PageBundle.cs (new): Make and FetchCached.
  • terminal.html: a Share button for pages; TerminalPane.SaveCopy (static, also used by the card menu).
  • checks/pages.cs: what goes inside and in what order, libraries only when used, closing tags in a file can't end its tag, CDN cached / kept / other hosts never fetched.
  • checks/pagecheck.cs: the dashboard, report and slides templates saved as copies render with no console errors and nothing blocked.

Not in this PR

The public link (P7b): GitHub login, secret scan, gist, Unshare, the Shared filter.

To verify by hand

Save a copy of a page with a chart, turn Wi-Fi off, open it in a browser: it looks as in the viewer.

@YogiOnCode
YogiOnCode added this pull request to stack #51 November 18, 2026 20:58
@YogiOnCode
YogiOnCode force-pushed the pages/p7a-save-copy branch 2 times, most recently from 9d2e44f to c1e0c37 Compare November 18, 2026 21:07
Base automatically changed from pages/p5-pages-view to main November 18, 2026 21:07
@YogiOnCode
YogiOnCode merged commit b69e99b into main Nov 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant