From https://gitlab.haskell.org/ghc/ghc/-/merge_requests/15438/diffs?commit_id=9653a2b9a9e3a756b287b0a59204860511e4abce
From: sterni <sternenseemann@systemli.org>
Date: Wed, 28 Jan 2026 00:09:54 +0100
Subject: [PATCH] users_guide: fix runtime error during build with Sphinx 9.1.0

Appears that pathto is stricter about what it accepts now.
Tested Sphinx 8.2.3 and 9.1.0 on the ghc-9.10 branch.

Resolves #26810.

Co-authored-by: Martin Weinelt <hexa@darmstadt.ccc.de>
--- a/docs/users_guide/rtd-theme/layout.html
+++ b/docs/users_guide/rtd-theme/layout.html
@@ -32,7 +32,7 @@
     {%- if css|attr("rel") %}
       <link rel="{{ css.rel }}" href="{{ pathto(css.filename, 1) }}" type="text/css"{% if css.title is not none %} title="{{ css.title }}"{% endif %} />
     {%- else %}
-      <link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
+      <link rel="stylesheet" href="{{ pathto(css.filename, 1) }}" type="text/css" />
     {%- endif %}
   {%- endfor %}
 
-- 
GitLab

