Home / Function/ bufferHeadContent() — astro Function Reference

bufferHeadContent() — astro Function Reference

Architecture documentation for the bufferHeadContent() function in render.ts from the astro codebase.

Entity Profile

Dependency Diagram

graph TD
  a3bddb01_2167_e26f_7cb4_0806d1960ddd["bufferHeadContent()"]
  e0446a2c_f6ef_c306_3fa2_3d3016b94419["render.ts"]
  a3bddb01_2167_e26f_7cb4_0806d1960ddd -->|defined in| e0446a2c_f6ef_c306_3fa2_3d3016b94419
  4f0f8a5d_2080_3d78_cf45_50811bf15a70["renderToString()"]
  4f0f8a5d_2080_3d78_cf45_50811bf15a70 -->|calls| a3bddb01_2167_e26f_7cb4_0806d1960ddd
  a1e1182e_4683_0c1e_4777_d9c6023779e8["renderToReadableStream()"]
  a1e1182e_4683_0c1e_4777_d9c6023779e8 -->|calls| a3bddb01_2167_e26f_7cb4_0806d1960ddd
  a4540b08_b256_31dc_609c_62af4c628a44["renderToAsyncIterable()"]
  a4540b08_b256_31dc_609c_62af4c628a44 -->|calls| a3bddb01_2167_e26f_7cb4_0806d1960ddd
  style a3bddb01_2167_e26f_7cb4_0806d1960ddd fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

packages/astro/src/runtime/server/render/astro/render.ts lines 192–205

export async function bufferHeadContent(result: SSRResult) {
	const iterator = result._metadata.propagators.values();
	while (true) {
		const { value, done } = iterator.next();
		if (done) {
			break;
		}
		// Call component instances that might have head content to be propagated up.
		const returnValue = await value.init(result);
		if (isHeadAndContent(returnValue) && returnValue.head) {
			result._metadata.extraHead.push(returnValue.head);
		}
	}
}

Domain

Subdomains

Frequently Asked Questions

What does bufferHeadContent() do?
bufferHeadContent() is a function in the astro codebase, defined in packages/astro/src/runtime/server/render/astro/render.ts.
Where is bufferHeadContent() defined?
bufferHeadContent() is defined in packages/astro/src/runtime/server/render/astro/render.ts at line 192.
What calls bufferHeadContent()?
bufferHeadContent() is called by 3 function(s): renderToAsyncIterable, renderToReadableStream, renderToString.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free