Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌗 Remote CDN and theme button for the article theme #468

Merged
merged 3 commits into from
Sep 13, 2024

Conversation

agahkarakuzu
Copy link
Contributor

@agahkarakuzu agahkarakuzu commented Sep 13, 2024

Fixes #342.

image

image

  • Enables setting CONTENT_CDN through env to replace localhost:{port} with https://remote.example.com.

Note

Right before opening this PR, I realized that a similar PR #346 exists, enabling {hostname}:{port}. This is slightly different as the purpose is to connect to a remote CDN host (tested with https://cdn.neurolibre.org) without specifying a port. Happy to account for the changes from #346 to avoid conflict.

Copy link

changeset-bot bot commented Sep 13, 2024

🦋 Changeset detected

Latest commit: b71b6b1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@myst-theme/article Patch
@myst-theme/book Patch
@myst-theme/providers Patch
@myst-theme/frontmatter Patch
@myst-theme/diagrams Patch
@myst-theme/jupyter Patch
@myst-theme/site Patch
@myst-theme/styles Patch
@myst-theme/common Patch
@myst-theme/icons Patch
myst-to-react Patch
myst-demo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@rowanc1 rowanc1 left a comment

Choose a reason for hiding this comment

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

Thanks for the pics in the PR, really helpful.

@@ -11,7 +11,7 @@ import {
import { responseNoArticle, responseNoSite, getDomainFromRequest } from '@myst-theme/site';

const CONTENT_CDN_PORT = process.env.CONTENT_CDN_PORT ?? '3100';
const CONTENT_CDN = `http://localhost:${CONTENT_CDN_PORT}`;
const CONTENT_CDN = process.env.CONTENT_CDN ?? `http://localhost:${CONTENT_CDN_PORT}`;
Copy link
Member

Choose a reason for hiding this comment

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

Clever. I like it.

@rowanc1 rowanc1 merged commit 2cb619f into jupyter-book:main Sep 13, 2024
2 checks passed
@rowanc1 rowanc1 changed the title Remote CDN and theme button for the article theme 🌗 Remote CDN and theme button for the article theme Sep 13, 2024
@rowanc1
Copy link
Member

rowanc1 commented Sep 13, 2024

Thanks for the changes @agahkarakuzu -- really awesome to have you contributing here. Excited to see your launch in a few weeks. 🚀

@agahkarakuzu
Copy link
Contributor Author

Thank you so much @rowanc1! The event will be much cooler thanks to all the amazing effort you've put in this project!

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.

HTML served with <img src=http://localhost:3100> even with HOST=10.0.0.1 myst start --keep-host`
2 participants