appview/markup: render LaTeX math in markdown
Render $...$ / $$...$$ LaTeX in markdown (READMEs, issues, comments) via
client-side MathJax, with detection handled server-side by the Hugo
passthrough extension plus a custom renderer.
Pipeline:
- extension/math.go wraps each math span in <span class="math inline|
display"> carrying the raw LaTeX with MathJax \( \) / \[ \] delimiters.
passthrough handles single-line "$$...$$" blocks and protects markdown
inside math; a Pandoc-style guard (no space-padding, no digit after the
closing $) keeps currency like "$5 ... $10" from being parsed as math.
- layouts/base.html loads MathJax (v4.1.2, tex-svg) on demand, only when a
page contains span.math, and typesets just those nodes. Accessibility
options are disabled as an initial, conservative implementation.
- the sanitizer preserves the math carrier spans.
- MathJax is vendored at build time alongside mermaid (flake.nix, the nix
static-files package, and the localinfra script).
Signed-off-by: oscillatory.net <nick@oscillatory.net>
appview: add pull request webhook events
This adds five new webhook event types alongside the existing `push` and
`repository:renamed` events:
- `pull_request:created`
- `pull_request:resubmitted`
- `pull_request:merged`
- `pull_request:closed`
- `pull_request:reopened`
Each event carries a payload with an `action` field, pull request metadata (number, title, state,
target branch, source branch/repo/sha), the repository object, and the sender. The patch itself is
not embedded; payloads include a `patch_url` pointing at the existing raw round-patch route instead.
Merge, close, and reopen reuse the existing `NewPullState` notifier call sites. `Resubmission`
previously emitted no notifier event at all, so this adds a `ResubmitPull` method to the `Notifier`
interface, fired from both the regular and stacked resubmit paths (stacked resubmits also now fire
`NewPull` for pulls newly added to a stack). Stack-pull abandonment intentionally emits no event.
The webhook notifier now takes the appview base URL so pull request `html_url`/`patch_url` point at the
appview, where pull routes live (`repository.html_url` keeps pointing at the knot, unchanged).
Refs #97, #94.
appview: add pull request webhook events
This adds five new webhook event types alongside the existing `push` and
`repository:renamed` events:
- `pull_request:created`
- `pull_request:resubmitted`
- `pull_request:merged`
- `pull_request:closed`
- `pull_request:reopened`
Each event carries a payload with an `action` field, pull request metadata (number, title, state,
target branch, source branch/repo/sha), the repository object, and the sender. The patch itself is
not embedded; payloads include a `patch_url` pointing at the existing raw round-patch route instead.
Merge, close, and reopen reuse the existing `NewPullState` notifier call sites. `Resubmission`
previously emitted no notifier event at all, so this adds a `ResubmitPull` method to the `Notifier`
interface, fired from both the regular and stacked resubmit paths (stacked resubmits also now fire
`NewPull` for pulls newly added to a stack). Stack-pull abandonment intentionally emits no event.
The webhook notifier now takes the appview base URL so pull request `html_url`/`patch_url` point at the
appview, where pull routes live (`repository.html_url` keeps pointing at the knot, unchanged).
Refs #97, #94.