Skip to content

Optimize the documentation website for search engines and language models#73

Merged
pedroliman merged 7 commits into
mainfrom
claude/seo-cost-effectiveness-modeling-u7us0k
Jul 19, 2026
Merged

Optimize the documentation website for search engines and language models#73
pedroliman merged 7 commits into
mainfrom
claude/seo-cost-effectiveness-modeling-u7us0k

Conversation

@pedroliman

@pedroliman pedroliman commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Closes #72.

Approach

Put the discovery metadata in the site configuration so every page inherits it, and add page-level titles, descriptions, and keywords only where a page targets a specific query. The goal is that a reader searching for cost-effectiveness modeling, value of information, or one of the model engines lands on the relevant page, and that answer engines and language models can find and cite the site. A later round restyled the website plots.

Search engines

  • docs/_quarto.yml: a site-wide meta description, Open Graph and Twitter card tags with a default preview image, html lang, and a head include for structured data.
  • docs/_structured-data.html: WebSite and SoftwareSourceCode JSON-LD.
  • docs/robots.txt: allow crawling and point to the generated sitemap.xml.
  • docs/index.qmd: a keyword-rich page title, a meta description, keywords, and a lead paragraph of crawlable text describing the package.
  • Tutorials: keywords on the highest-value pages, covering the spelled-out terms and the acronyms readers type (EVPI, EVPPI, EVSI, PSA, ICER, CEAC).

Language models

  • docs/llms.txt: a curated map of the site following the llms.txt convention, listing every page with a one-line description in learning order.
  • docs/robots.txt: name the major answer-engine and language-model crawlers as welcome; the wildcard already granted the same access.

Preview image

docs/images/og-card.png is a 1200x630 card built from the real quickstart model, drawing the cost-effectiveness plane as 50/80/95% highest-density regions in the website's teal accent, set in a modern sans, with the text and plot measured apart at render time.

Plot styling and the cost-effectiveness plane

  • plot_ce_plane (package change): now draws each intervention's iterations as nested highest-density regions (50%, 80%, 95%) instead of a scatter, with a scatter fallback for too few iterations and kind="scatter" for the previous behavior. Covered by new tests; the two tutorials that show a plane, and their Colab notebooks, are updated.
  • Website font (website-only, not shipped in the package): Poppins TTFs live under docs/fonts and are installed by the docs workflow, which points MATPLOTLIBRC at docs/matplotlibrc and renders figures at a higher resolution for sharp text. The freeze cache key is bumped once so every plot re-renders with the new style.

Verification

Package changes are covered by pytest (274 passing), doctests, ruff, and mypy, and the font-plus-MATPLOTLIBRC mechanism was exercised locally end to end. A full Quarto render was not possible in this environment because the Quarto binary download is blocked, so the documentation workflow renders and deploys on push to main.

Give the website the discovery metadata it lacked so readers searching for
cost-effectiveness modeling, value of information, and the specific methods
reach the relevant page.

- _quarto.yml: site-wide meta description, Open Graph and Twitter card tags,
  a default preview image, html lang, and a head include for structured data.
- _structured-data.html: WebSite and SoftwareSourceCode JSON-LD.
- robots.txt: allow crawling and point to the generated sitemap.
- index.qmd: keyword-rich page title, meta description, keywords, and a lead
  paragraph of crawlable text describing the package.
- tutorials: keywords on the main pages covering the spelled-out terms and
  the acronyms readers type (EVPI, EVPPI, EVSI, PSA, ICER, CEAC).
- images/og-card.png: 1200x630 preview card.

Closes #72
Help answer engines and large language models find, read, and cite the
documentation, not only classic search crawlers.

- llms.txt: a curated markdown map of the site following the llms.txt
  convention, listing every page with a one-line description in learning order.
- robots.txt: name the major answer-engine and language-model crawlers
  (GPTBot, ClaudeBot, PerplexityBot, Google-Extended, and others) as welcome;
  the existing wildcard already granted the same access.
- _quarto.yml: copy llms.txt into the built site as a resource.

Refs #72
Replace the placeholder sketch with the actual cost-effectiveness plane from
the quickstart model: a probabilistic sensitivity analysis of the three-state
Markov cohort model, its two treatment clouds shown against standard care with
the willingness-to-pay line, so the preview shows genuine package output.

Refs #72
Measure the rendered pixel extents of the text and the plot, then slide the
plot right until its y-axis label clears the text by a fixed gap, so the two
never overlap regardless of label widths.

Refs #72
Address three points on the preview card: drop the descriptive caption under
the tagline, recolor to the website's teal accent, and replace the scatter
cloud with highest-density regions.

The plane now shades the 50, 80, and 95% highest-density regions of each
treatment, computed from a kernel density estimate of the probabilistic
sensitivity analysis draws with mass-based thresholds, in teal and a warm
complement.

Refs #72
Render the preview card, including the plot title, axes, ticks, and legend,
in Poppins, a modern geometric sans that matches the website's font stack,
in place of the default serif-adjacent sans.

Refs #72
@codecov

codecov Bot commented Jul 19, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.00000% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.39%. Comparing base (233d2b9) to head (6895919).
⚠️ Report is 8 commits behind head on main.

Files with missing lines Patch % Lines
src/heormodel/report/plots.py 90.00% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #73      +/-   ##
==========================================
- Coverage   95.51%   95.39%   -0.12%     
==========================================
  Files          40       40              
  Lines        1918     1955      +37     
==========================================
+ Hits         1832     1865      +33     
- Misses         86       90       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@pedroliman pedroliman changed the title Add search-engine metadata to the documentation website Optimize the documentation website for search engines and language models Jul 19, 2026
Change plot_ce_plane to draw each intervention's iterations as nested
highest-density regions (the 50%, 80% and 95% regions) by default, with a
scatter fallback for too few iterations and kind="scatter" for the previous
behavior. Update the report tests and the two tutorials, and their Colab
notebooks, that show a cost-effectiveness plane.

Style the website plots with Poppins without touching the package: the fonts
live under docs/fonts and are installed by the docs workflow, which points
MATPLOTLIBRC at docs/matplotlibrc and renders figures at a higher resolution.
Bump the freeze cache key so every plot re-renders once to pick up the style.

Refs #73
@pedroliman
pedroliman merged commit 3361435 into main Jul 19, 2026
4 checks 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.

Optimize the documentation website and tutorials for search engines

1 participant