Skip to content

Workflow: Share a sanitized report (Cloudflare Pages)

Trigger: "share the report with ."

Shares live OUTSIDE the research site — a separate Cloudflare Pages project (mtn-share, same account as peak_checklist) at https://mtn-share.pages.dev. Open links (no auth), enumeration-resistant, with a lifetime of a few months.

Commands (scripts/share_report.py):

scripts/share_report.py <slug>            # new share + share CalTopo map
scripts/share_report.py <slug> --ttl-days 60
scripts/share_report.py --publish         # rebuild all + wrangler deploy
scripts/share_report.py --prune           # expire old: rm pages + share maps
scripts/share_report.py --rebuild         # regen share_site/ from the ledger

Typical: share_report.py <slug> && share_report.py --publish → hand out https://mtn-share.pages.dev/s/<token>/.

How it stays contained:

  • Sanitizer strips: frontmatter, CLIMBERS block, "Written for ", climbed status, drive-from-home rows/fragments, site-internal links, research/regional CalTopo links, and neutralizes third-party climber names ("the party").
  • Each share gets its OWN CalTopo map ("Share: ") holding only the recommended route lines + objective summit markers — never the research map.</li> <li>Anti-enumeration: <code>/s/<16-hex-token>/</code> paths (no slug), no root index, no cross-links, robots.txt deny-all + X-Robots-Tag noindex. Open ≠ discoverable.</li> </ul> <p><strong>Source of truth:</strong> <code>share/ledger.json</code> (committed). <code>share_site/</code> is a gitignored staging dir — fully regenerable (<code>--rebuild</code>), so links survive machine changes and re-shares keep their tokens.</p> <p><strong>Lifetime:</strong> <code>ttl_days</code> (default 120) from <code>created</code>. Run <code>--prune && --publish</code> occasionally (candidate for the peak_checklist_bin cron family). Pruned shares 404; their share maps are deleted; regenerating later is one command.</p> <p><strong>One-time setup per Mac:</strong> <code>npx wrangler login</code> (Cloudflare OAuth). First deploy: <code>npx wrangler pages project create mtn-share --production-branch main</code>, then <code>share_report.py --publish</code>.</p> <p><strong>Honesty about access control:</strong> no auth — the token is the only lock. Don't share anything that must stay truly private.</p> </article> </div> <script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script> </div> <button type="button" class="md-top md-icon" data-md-component="top" hidden> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg> Back to top </button> </main> <footer class="md-footer"> <div class="md-footer-meta md-typeset"> <div class="md-footer-meta__inner md-grid"> <div class="md-copyright"> Made with <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener"> Material for MkDocs </a> </div> </div> </div> </footer> </div> <div class="md-dialog" data-md-component="dialog"> <div class="md-dialog__inner md-typeset"></div> </div> <script id="__config" type="application/json">{"annotate": null, "base": "../../..", "features": ["navigation.instant", "navigation.tracking", "navigation.sections", "navigation.indexes", "navigation.top", "toc.integrate", "search.suggest", "search.highlight", "content.code.copy"], "search": "../../../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script> <script src="../../../assets/javascripts/bundle.d7400e89.min.js"></script> <script src="../../../javascripts/external-links-new-tab.js"></script> <script src="https://unpkg.com/tablesort@5.3.0/dist/tablesort.min.js"></script> <script src="https://unpkg.com/tablesort@5.3.0/dist/sorts/tablesort.number.min.js"></script> <script src="../../../javascripts/tablesort.js"></script> <script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"></script> <script src="../../../javascripts/peak-map.js?v=4"></script> <script src="../../../javascripts/nav-stats.js?v=1"></script> </body> </html>