Skip to content

docs: align page layout docs with current public v4 page contract#78

Closed
basit3407 wants to merge 2 commits intomainfrom
docs/page-layout-current-api-state
Closed

docs: align page layout docs with current public v4 page contract#78
basit3407 wants to merge 2 commits intomainfrom
docs/page-layout-current-api-state

Conversation

@basit3407
Copy link
Copy Markdown
Collaborator

@basit3407 basit3407 commented Mar 23, 2026

Summary

This is a docs-only sync to the current public v4 page-rendering contract.

It removes unsupported public v4/pages/lookup guidance and narrows the tutorial to the documented default-layout flow built around:

  • GET /content/api/v4/chapters/{id} for chapter entry via chapter.pages
  • GET /content/api/v4/verses/by_page/{page_number} for known page rendering

What Changed

  • rewrote docs/tutorials/fonts/page-layout.md to document:
    • chapter entry on the default layout via GET /chapters/{id} and chapter.pages
    • known-page rendering via GET /verses/by_page/{page_number}
    • word-based line grouping using words=true and line_number
  • removed tutorial guidance that implied unsupported public flows:
    • content/api/v4/pages/lookup
    • pages/layout
    • mushaf-based by_page usage as a documented public contract
    • alternate-mushaf page-count guidance in this tutorial
    • old lookup response examples and camelCase lookup fields
  • updated request examples in the tutorial to use:
    • x-auth-token
    • x-client-id
  • clarified the current public limitations:
    • chapter start/end pages are available through chapter.pages
    • public v4 still does not expose general juz or arbitrary verse-range page lookup
    • alternate mushaf page navigation is not yet part of the documented public v4 contract
  • kept the line-number clarification in docs/tutorials/fonts/font-rendering.md

Files To Review

  1. docs/tutorials/fonts/page-layout.md
  2. docs/tutorials/fonts/font-rendering.md

Out Of Scope

  • no changes to quran.com-api
  • no changes to generated endpoint docs under docs/content_apis_versioned
  • no changes to openAPI/content/v4.json
  • no changes to sidebar/navigation config

Why This Change

The previous tutorial documented unsupported public v4 page lookup paths and implied a broader page-layout contract than the public reference currently exposes. This PR narrows the guide to the documented public flow and makes the supported chapter-entry path discoverable.

Validation

  • yarn build
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Mar 23, 2026

Deploying qf-api-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: dbf0c3f
Status: ✅  Deploy successful!
Preview URL: https://86d06c12.qf-api-docs.pages.dev
Branch Preview URL: https://docs-page-layout-current-api.qf-api-docs.pages.dev

View logs

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7ce380116c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread docs/tutorials/fonts/page-layout.md Outdated
Comment thread docs/tutorials/fonts/page-layout.md Outdated
@basit3407 basit3407 changed the title docs: align page layout guides with current public v4 API behavior Mar 23, 2026
@basit3407 basit3407 requested a review from osamasayed March 23, 2026 03:34
@basit3407
Copy link
Copy Markdown
Collaborator Author

Superseded by a new main-based docs sync now that the API exposes public v4/pages* endpoints. This PR documented the pre-parity state and is no longer the correct target.

Copy link
Copy Markdown
Member

Replacement PR: #90

This is the main-based docs sync that matches the now-public v4/pages* surface.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants