Skip to content

Fix external themes in serve mode#245

Merged
panglesd merged 2 commits into
mainfrom
fix-external-theme-resolving
Jun 5, 2026
Merged

Fix external themes in serve mode#245
panglesd merged 2 commits into
mainfrom
fix-external-theme-resolving

Conversation

@panglesd
Copy link
Copy Markdown
Owner

@panglesd panglesd commented Jun 5, 2026

We need to resolve the theme before it being delayed. The un-delaying is done in the browser client, which does not have access to file system.

We need to resolve the theme _before_ it being delayed. The undelaying is done
in the browser client, which does not have access to file system
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 5, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR refactors how external themes are represented and resolved. The theme type in frontmatter is changed from storing external themes as raw strings to storing them as Asset.t with location information. The theme parsing logic is updated to convert non-builtin theme strings into assets during frontmatter parsing. Correspondingly, the delayed_from_units function signature is simplified by removing the read_file callback parameter, since theme resolution now happens at parse time rather than at render time. The CLI serve function and related call sites are updated to match the new API.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: fixing external themes in serve mode, which is the core issue addressed throughout 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.
Description check ✅ Passed The PR description clearly explains the fix: themes must be resolved server-side before being delayed, as the browser client lacks file system access.

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


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@panglesd panglesd merged commit 3b0274d into main Jun 5, 2026
8 of 9 checks passed
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.

1 participant