Skip to content

Document renderInnerPage and renderFullPage API#244

Open
bcomnes wants to merge 4 commits intomasterfrom
docs/render-inner-page
Open

Document renderInnerPage and renderFullPage API#244
bcomnes wants to merge 4 commits intomasterfrom
docs/render-inner-page

Conversation

@bcomnes
Copy link
Copy Markdown
Owner

@bcomnes bcomnes commented Apr 18, 2026

Closes #229

renderInnerPage() is used in the RSS feed template example but has no dedicated reference explaining what it does, when it is available, or how to use it efficiently.

This adds an "Accessing rendered page content" subsection after the RSS Feed Template Example covering:

  • What renderInnerPage() and renderFullPage() return and how they differ
  • Where they are available: templates, global.data.js, page functions, and layouts (when pages is accessible)
  • A caveat that these methods require the PageData instance to be successfully initialized — pages that failed init will throw
  • A parallel pre-rendering pattern with a cache for templates that produce multiple output files from the same rendered content

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated README subsection documenting the PageData.renderInnerPage() / PageData.renderFullPage() APIs, intended to close the discoverability gap introduced by their use in the RSS feed template example.

Changes:

  • Added an “Accessing rendered page content” section describing renderInnerPage() vs renderFullPage()
  • Documented where these APIs can be used and provided a suggested pre-render + cache pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
…Map concurrency

- Availability: renderInnerPage/renderFullPage are also callable from page
  functions and layouts, not just templates and global.data.js
- Cache key: use page.pageInfo.path consistently (the read side previously
  used the undefined 'post.path')
- Concurrency: switch the pre-render example from Promise.all to pMap with
  concurrency:4 to avoid unbounded parallelism on large sites
@github-actions
Copy link
Copy Markdown

Coverage Report for CI Build 24611709137

Coverage remained the same at 91.469%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 4070
Covered Lines: 3804
Line Coverage: 93.46%
Relevant Branches: 642
Covered Branches: 506
Branch Coverage: 78.82%
Branches in Coverage %: Yes
Coverage Strength: 73.62 hits per line

💛 - Coveralls

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread README.md
Comment thread README.md
…tion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.

Formally document renderInnerPage() API and rendered content architecture

2 participants