Skip to content

feat(site): generate a static website from the dataset - #25

Open
deadmanoz wants to merge 1 commit into
mainfrom
website
Open

deadmanoz wants to merge 1 commit into
mainfrom
website

Conversation

@deadmanoz

@deadmanoz deadmanoz commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

#6 asks for a static GitHub Pages site, so the blocks can be linked to and found by searching their hash. ci/generate-website.py builds one from the repository into site/: a page per record at block/{hash}/, with the hash in its URL, title and heading; an index of the 143 records, sortable by column and filterable by text, rule or kind of evidence; the rendered docs/notes.md; the reported blocks; and a sitemap.

Each block page shows the rule, the Core reject string, the Core check and what CI checks for it, taken from the two rule tables in docs/schema.md rather than written out a second time, then the decoded header, context, observations and the evidence on file: a full block, a P2SH spend proof, a coinbase proof or the header alone. It quotes the opening paragraph of the incident note whose heading lists the block's height, or lists a block with the same failing_prevout. That gives the 85 proof-only P2SH blocks, which all spend the same output, the 2012 P2SH note; a block that only shares a rule with a noted block gets no note. Relative links in the notes resolve to block pages, the notes page or GitHub.

The sanity-check workflow now builds the site on every run, so a pull request that breaks it fails before merge. Each run uploads the build with actions/upload-pages-artifact, so a pull request's run also carries the built site. On main, a deploy-website job that needs the validation job publishes it with actions/deploy-pages, so nothing reaches the site without passing validation, and runs on a branch are serialized so an older run cannot deploy over a newer one. The deploy steps match stale-blocks', which runs them in a separate workflow. Markdown==3.10.3 is pinned next to python-bitcoinlib. The pages load one local stylesheet and one small script, which follows the visitor's light or dark preference (with a toggle in the nav) and filters and sorts the index, and no external assets.

The site is completely vibe-coded, but it looks good enough. It only reads the dataset and the docs; the data, the validator and its checks are unchanged.

This needs Settings → Pages → Source set to GitHub Actions.

Closes #6.

1-index 2-block-783426-full-block 3-block-174012-p2sh-proof 4-notes 5-reported 6-mobile-block-783426 7-index-light

Testing

python ci/generate-website.py writes 146 pages (143 blocks, the index, notes and reported) and a 146-URL sitemap, and two runs produce identical output. python ci/sanity-check.py --fetch-prevouts reports the unchanged 143 blocks, 16 block files and 124 proof files. All 49 tests pass, including three new ones: note links for a block named in a note heading (783426), one sharing a named block's failing spend (174012), one sharing only a named block's rule (367047) and one with none (331673); link rewriting; and escaping of record text on a block page and the index. A crawl of the generated site resolved all 1,593 internal links and note anchors, and every link to a repository file points at a file on this branch. I checked the pages in a browser at desktop and 375 px widths, in light and dark, with no horizontal scrolling. The deploy job has not run yet; it runs only on main.

@deadmanoz
deadmanoz marked this pull request as draft September 24, 2026 09:28
@deadmanoz

Copy link
Copy Markdown
Collaborator Author

Making some basic usability improvements & removing some duplicated data presentation first, will reopen when done

@deadmanoz
deadmanoz force-pushed the website branch 2 times, most recently from 688935f to 7bb5812 Compare September 24, 2026 13:26
Give every record a page at block/{hash}/ so a block can be linked and found by searching its hash, as asked in #6.
The index lists the records, sortable by column and filterable by text, rule or kind of evidence; notes/ renders docs/notes.md and reported/ lists the reported blocks.
Pages follow the visitor's light or dark preference, with a toggle in the nav.

Block pages take the rule's Core check and CI evidence from the tables in docs/schema.md, say whether the evidence on file is a full block, a P2SH spend proof, a coinbase proof or the header alone, and quote the incident note that names the block's height, or names a block with the same failing_prevout.
ci/generate-website.py writes site/ using pinned Python-Markdown, with ci/website.css and ci/website.js alongside.
The sanity-check workflow builds the site on every run; on main, a deploy job that needs the validation job publishes it to GitHub Pages.
@deadmanoz
deadmanoz marked this pull request as ready for review September 24, 2026 14:47
@deadmanoz

Copy link
Copy Markdown
Collaborator Author

Happy with how this looks locally now, review whenever

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.

invalid-block website generated from data

1 participant