Skip to content

Conversation

@mscolnick
Copy link
Contributor

@mscolnick mscolnick commented Nov 21, 2024

You can include a custom HTML head file to add additional functionality to your notebook, such as analytics, custom fonts, meta tags, or external scripts. The contents of this file will be injected into the <head> section of your notebook.

To include a custom HTML head file, specify the relative file path in your app configuration. This can be done through the marimo editor UI in the notebook settings (top-right corner).

Some examples:

  1. Google Analytics
  2. Custom Fonts
  3. Meta Tags
  4. External Scripts and Libraries

@vercel
Copy link

vercel bot commented Nov 21, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marimo-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 3:30pm
marimo-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 3:30pm

@mscolnick mscolnick requested a review from akshayka November 21, 2024 23:13
A filepath to an HTML file to be injected into the{" "}
<Kbd className="inline">{"<head/>"}</Kbd> section of the
notebook. Use this to add analytics, custom fonts, meta tags, or
external scripts.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe too wordy?

akshayka
akshayka previously approved these changes Nov 21, 2024
Copy link
Contributor

@akshayka akshayka left a comment

Choose a reason for hiding this comment

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

Nice. I like how this one change has many use cases.

@mscolnick mscolnick changed the title feat: add html_head_file to index custom head scripts into the app feat: add html_head_file to inject custom head scripts into the app Nov 22, 2024
@mscolnick mscolnick merged commit 12c3a11 into main Nov 22, 2024
35 of 37 checks passed
@mscolnick mscolnick deleted the ms/custom-head branch November 22, 2024 15:46
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.

3 participants