Skip to content

Include github-markdown-css locally to support offline environments #1729

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

Closed
Jaguar-Kwok opened this issue Jan 27, 2025 · 1 comment · Fixed by #1759
Closed

Include github-markdown-css locally to support offline environments #1729

Jaguar-Kwok opened this issue Jan 27, 2025 · 1 comment · Fixed by #1759
Labels
enhancement New feature or request

Comments

@Jaguar-Kwok
Copy link

Jaguar-Kwok commented Jan 27, 2025

I am using Terrakube in an air-gapped/offline environment, and I noticed that the current implementation relies on an external CDN to load the github-markdown-css stylesheet (via cdnjs.cloudflare.com). Since offline environments cannot access this CDN, the styling for markdown content is broken, affecting the user experience.

Proposed Solution:
To make Terrakube fully functional in offline setups, we recommend embedding the github-markdown-css CSS file directly in the project instead of using the CDN. This involves:

Adding the MIT-licensed github-markdown-css file (v4.0.0) to the repository (e.g., in the public/ directory).

Updating the HTML template to reference the local CSS file instead of the CDN URL:
ui/public/index.html
<link href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/4.0.0/github-markdown.min.css" rel="stylesheet">
Proposed change
<link href="%PUBLIC_URL%/github-markdown.min.css" rel="stylesheet">

Why This Matters:
This change ensures Terrakube works out-of-the-box in restricted networks without compromising functionality. Since the CSS is MIT-licensed, we can safely include it by preserving the license header in the file.

Additional Notes:
The specific version (4.0.0) can be downloaded directly from the GitHub release.

Would the team be open to a pull request implementing this change? We’re happy to contribute if this aligns with the project’s goals!

Anything else?

No response

@Jaguar-Kwok Jaguar-Kwok added the enhancement New feature or request label Jan 27, 2025
@alfespa17
Copy link
Member

All help is welcome @Jaguar-Kwok, you can send the pull request and I can check it later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants