mirror of
https://github.com/GitbookIO/gitbook.git
synced 2026-09-21 01:53:26 +00:00
6ca03e53b4
`page_markdown_request` and the `ask_question` the middleware emits for `?ask=` carried only a displayContext, so they were stored with an empty spaceId and an unparseable siteSpaceId. Any space- or section-scoped query dropped them, and the markdown traffic of a space read as zero. Reuse the location the middleware already builds, as `rss_request` does. The llms branches keep theirs: llms.txt spans every section and site-space, so a single spaceId would attribute a site-wide document to one of them. `ask_question` also gains the goal, which was parsed off the query string to be encoded in the rewrite and then dropped from the event. The pageId the TODO asked for is not in the URL, and resolving it in the middleware costs a request per document served; it is left to the API to return alongside the space.