[PR #5128] docs: Add conditional js/python rendering #4254

Closed
opened 2026-02-20 17:49:54 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langchain-ai/langgraph/pull/5128

State: closed
Merged: Yes


Overview

Adding conditional rendering logic to co-locate js and python documentation.

  • ::: conditional syntax can be used to switch between python only or js only content.
  • Contains simple unit tests for :::
  • PR adds set up for a way to implement a context switch between languages, but it will not be enabled until JS content is merged in.
  • Contains a script that can add javascript documentation

Implementation of: https://github.com/langchain-ai/langgraph/pull/5118

Example

Example of conditional rendering / compilation.


### Config (static context)

Config is for immutable data like user metadata or API keys. Use
when you have values that don't change mid-run.

Specify configuration using a key called **"configurable"** which is reserved
for this purpose:


:::python

This content will only be rendered for the python site.
:::

:::js
this content will only be rendered for the js / ts site.
:::

**Original Pull Request:** https://github.com/langchain-ai/langgraph/pull/5128 **State:** closed **Merged:** Yes --- # Overview Adding conditional rendering logic to co-locate js and python documentation. * `:::` conditional syntax can be used to switch between python only or js only content. * Contains simple unit tests for `:::` * PR adds set up for a way to implement a context switch between languages, but it will not be enabled until JS content is merged in. * Contains a script that can add javascript documentation Implementation of: https://github.com/langchain-ai/langgraph/pull/5118 ## Example Example of conditional rendering / compilation. ```markdown ### Config (static context) Config is for immutable data like user metadata or API keys. Use when you have values that don't change mid-run. Specify configuration using a key called **"configurable"** which is reserved for this purpose: :::python This content will only be rendered for the python site. ::: :::js this content will only be rendered for the js / ts site. ::: ```
yindo added the pull-request label 2026-02-20 17:49:54 -05:00
yindo closed this issue 2026-02-20 17:49:54 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langchain-ai/langgraph#4254