Skip to content

fix(demo): restore jsDelivr CDN link so demo works without local build - #64

Merged
jackgranatowski merged 1 commit into
mainfrom
fix/demo-cdn-link
May 22, 2026
Merged

fix(demo): restore jsDelivr CDN link so demo works without local build#64
jackgranatowski merged 1 commit into
mainfrom
fix/demo-cdn-link

Conversation

@kiro-agent

@kiro-agent kiro-agent Bot commented May 22, 2026

Copy link
Copy Markdown

This pull request was created by @kiro-agent on behalf of @jackgranatowski 👻

Comment with /kiro fix to address specific feedback or /kiro all to address everything.
Learn about Kiro autonomous agent


Summary

  • Reverts the demo's CSS <link> tags from local relative paths back to the jsDelivr @main CDN URLs that were in use prior to commit 26658d5.

Why

Commit 26658d5 ("feat: update demo with local CSS paths...") changed the demo from CDN-loaded styles to ../dist/slashed.essential.css. Since dist/ is gitignored, opening docs/demo.html on a fresh clone (or after a clean) renders unstyled until npm run build is run.

Restoring the @main CDN URLs makes the demo work zero-setup again, matching the original behavior.

Tested

  • Verified the file diff: only the two <link> URLs and the surrounding comment changed.
  • No other markup or styles touched.

Note

Pinning to @main means the CDN serves whatever is currently on the main branch. If dist/ ever stops being published to main, the demo will break the same way. A follow-up could pin to a specific version tag (e.g. @v0.2.10) for stability — happy to do that in a separate PR if desired.

Summary by CodeRabbit

  • Chores
    • Updated documentation demo to load stylesheets from CDN instead of local file references.

Review Change Stack

The previous local path (../dist/slashed.essential.css) requires
'npm run build' first, since dist/ is gitignored. Reverts the link
tags introduced in 26658d5 back to the @main CDN URL so a fresh
clone of the repo serves a working demo.html without setup.

Co-authored-by: Jack Granatowski <contact@codeslash.net>
@coderabbitai

coderabbitai Bot commented May 22, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

The PR updates docs/demo.html to load SLASHED CSS stylesheets from jsDelivr CDN instead of local relative paths, changing two link tag href attributes to point to CDN URLs.

Changes

Demo CSS CDN Migration

Layer / File(s) Summary
Demo stylesheet CDN URLs
docs/demo.html
The two stylesheet includes for the demo page (essential and tokens palette CSS) are updated from local relative paths (../dist and ../optional) to jsDelivr CDN URLs.

🎯 1 (Trivial) | ⏱️ ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: restoring jsDelivr CDN links to fix the demo functionality without requiring a local build, which directly aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/demo-cdn-link

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
docs/demo.html (1)

7-9: ⚡ Quick win

Recommend pinning to a specific version tag instead of @main.

Using @main means the demo always loads the latest code from the main branch, which can break if there are structural changes, renames, or breaking changes merged to main. As you noted in the PR description, this could break if dist/ stops being published to main.

For stability, consider pinning to a specific version tag (e.g., @v0.2.10 or @latest release tag) instead of @main.

Additionally, consider adding SRI (Subresource Integrity) attributes for CDN security best practice:

<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/codeslash-dev/SLASHED@v0.2.10/dist/slashed.essential.css" integrity="sha384-..." crossorigin="anonymous">

jsDelivr can generate SRI hashes automatically by appending ?integrity to the URL, or you can generate them using tools like openssl dgst -sha384 -binary <file> | openssl base64 -A.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/demo.html` around lines 7 - 9, Update the two <link> tags that currently
reference jsDelivr with `@main` so they pin to a specific release tag (e.g.,
replace `@main` with `@vX.Y.Z` or `@latest` release tag) and add Subresource Integrity
and crossorigin attributes to each tag; locate the link elements referencing
"https://cdn.jsdelivr.net/gh/codeslash-dev/SLASHED@main/dist/slashed.essential.css"
and ".../optional/tokens.palette.css", change their version identifier, and
include appropriate integrity="sha384-..." and crossorigin="anonymous"
attributes (you can obtain SRI hashes by appending ?integrity to the jsDelivr
URLs or generating them locally).
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@docs/demo.html`:
- Around line 7-9: Update the two <link> tags that currently reference jsDelivr
with `@main` so they pin to a specific release tag (e.g., replace `@main` with
`@vX.Y.Z` or `@latest` release tag) and add Subresource Integrity and crossorigin
attributes to each tag; locate the link elements referencing
"https://cdn.jsdelivr.net/gh/codeslash-dev/SLASHED@main/dist/slashed.essential.css"
and ".../optional/tokens.palette.css", change their version identifier, and
include appropriate integrity="sha384-..." and crossorigin="anonymous"
attributes (you can obtain SRI hashes by appending ?integrity to the jsDelivr
URLs or generating them locally).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6205bf61-8c65-4d64-a754-61283cec85b7

📥 Commits

Reviewing files that changed from the base of the PR and between 3d90436 and 37386c2.

📒 Files selected for processing (1)
  • docs/demo.html

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.

2 participants