Skip to content

Conversation

@johndmulhausen
Copy link
Contributor

@johndmulhausen johndmulhausen commented Nov 11, 2025

John's prototype branch.

Because marimo-snippet requires access to raw markdown, piping in markdown via an external .txt file is necessary. This ensures that the Marimo notebook code does not get processed by Mintlify into docs HTML, which the marimo-snippet JS can not load.

To embed a Marimo notebook, use the new Mintlify snippet thusly:

import {Marimo} from "/snippets/Marimo.jsx";
...
<Marimo file="/marimo-examples/slider-example.txt" />

For a demo, scroll to the bottom of the page here: https://wb-21fd5541-marimo-test-john.mintlify.app/index

This demo is loading the Marimo notebook code defined in https://github.com/wandb/docs/blob/73e3a4a7ba7e27254ba5edb3670b844eda71e361/marimo-examples/slider-example.txt

@github-actions
Copy link
Contributor

github-actions bot commented Nov 11, 2025

📚 Mintlify Preview Links

🔗 View Full Preview

✨ Added (1 total)

⚙️ Other (1)
File
snippets/Marimo.jsx

📝 Changed (1 total)

📄 Pages (1)

File Preview
index.mdx .

🤖 Generated automatically when Mintlify deployment succeeds
📍 Deployment: 73e3a4a at 2025-11-11 18:22:52 UTC

## Summary
This commit introduces the Marimo component to the documentation, enhancing the content with a new interactive element.

## Changes
- Imported the Marimo component from `/snippets/Marimo.jsx`.
- Replaced the `<marimo-iframe>` with the new `<Marimo>` component for better integration.

## Impact
This update improves the user experience by providing a more seamless and interactive way to engage with the documentation.

Closes #XXXX
This update wraps the Marimo iframe in a div and includes the Marimo snippets script for improved functionality. This change enhances the interactivity of the Marimo component within the documentation.
…imo scripts

This commit updates the analytics.js file by removing the charset attribute from the second script tag, adding a new Marimo configuration script, and restructuring the consent synchronization logic. The changes ensure that analytics scripts are loaded conditionally based on user consent, improving the overall functionality and compliance with consent management practices.
…ernal content

This commit updates the Marimo component and analytics.js to improve the handling of Marimo placeholders. The changes include:
- Introducing a new function to fetch and process Marimo content from external files before loading the Marimo script.
- Updating the Marimo component to support loading content via a file attribute, enhancing flexibility and user experience.
- Restructuring the initialization logic in analytics.js to ensure proper loading of Marimo scripts and handling of DOM readiness.

These updates streamline the integration of Marimo elements, ensuring they are loaded correctly and efficiently within the documentation.
…ogging

This commit introduces support for inline Marimo elements in the analytics.js file, allowing for the creation of marimo-iframes from inline content. Additionally, it improves logging for both inline and file-based Marimo elements, providing clearer feedback during the initialization process. The documentation has been updated to include an example of using the new MarimoInline component for inline content, enhancing the overall user experience and interactivity of the Marimo integration.
…file-based content processing

This commit removes the inline Marimo component, streamlining the integration to focus solely on file-based Marimo elements. The analytics.js file has been updated to improve the processing of markdown content, specifically extracting Python code blocks and creating corresponding HTML elements. Additionally, the documentation has been revised to reflect these changes, simplifying the usage instructions and enhancing clarity for users. This update aims to improve the overall functionality and user experience of the Marimo integration.
This commit transforms the Marimo component to be self-contained, removing the inline support and focusing on file-based content processing. It improves the loading mechanism for the Marimo script, ensuring that the script is only loaded once and that the content is fetched and processed correctly. Additionally, the analytics.js file has been updated to streamline the initialization process and enhance logging for better debugging. The removal of example files from the repository also simplifies the overall structure, improving maintainability.
…t synchronization

This commit updates the analytics.js file to include a charset attribute for the second script tag, ensuring proper character encoding. Additionally, the consent synchronization logic has been refactored for better readability and maintainability, streamlining the handling of consent categories and analytics loading based on user consent. These changes aim to improve the overall functionality and compliance with consent management practices.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO-NOT-MERGE For PRs that should not be merged yet WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants