beta 18 docs#133
Conversation
WalkthroughThis update introduces a new hook-based plugin API for StudioCMS, revises plugin documentation and examples to match the new system, updates dependency versions, adjusts JWT token documentation and CLI help by removing a claim option, modifies workflow environment variables, and makes minor CSS and metadata changes. A new upgrade guide for version 0.1.0-beta.18 is also added. Changes
Sequence Diagram(s)sequenceDiagram
participant Plugin as StudioCMS Plugin
participant Studio as StudioCMS Core
participant Astro as Astro Integration
Note over Plugin: Plugin registration (new hook-based API)
Plugin->>Studio: definePlugin({ hooks })
Studio->>Plugin: Call 'studiocms:astro:config' hook
Plugin->>Astro: addIntegrations()
Studio->>Plugin: Call 'studiocms:config:setup' hook
Plugin->>Studio: setDashboard(), setFrontend(), setRendering()
Possibly related PRs
Suggested labels
Poem
Tip ⚡️ Faster reviews with caching
Enjoy the performance boost—your workflow just got faster. 📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
⏰ Context from checks skipped due to timeout of 90000ms (1)
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
…ax highlighting in plugin examples style(css): enhance starlight file tree styling with border and margin adjustments
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (7)
src/styles/starlight.css (1)
80-84: Clarify grouped styling intent
You’ve separatedborder-radiusandoverflow: hiddenfor both expressive code blocks and file trees. Consider adding a comment above this rule to explain that it’s preventing scrollbars in code blocks, and that the border is applied separately to the file tree for clarity.src/content/docs/en/guides/database/sqld-server.mdx (1)
55-57: Grammar improvement for clarity in output description
Refine the phrasing to "both standard format and base64URL-encoded" for better readability and consistency.
Apply this diff:- The output is the JWT auth token encrypted with your private key in both standard format as well as base64URLEncoded, which will be used for libSQL authentication. + The output is the JWT auth token encrypted with your private key in both standard format and base64URL-encoded, which will be used for libSQL authentication.🧰 Tools
🪛 LanguageTool
[grammar] ~57-~57: Probable usage error. Use “and” after ‘both’.
Context: ...our private key in both standard format as well as base64URLEncoded, which will be used fo...(BOTH_AS_WELL_AS)
src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-18.mdx (1)
21-21: Hyphenate for consistency: "Hook-based"
Use a hyphen in "Hook-based plugin system" to match common usage.- New Hook based plugin system - See the updated [Plugins Docs][plugin-doc] for more info. + New Hook-based plugin system – see the updated [Plugins Docs][plugin-doc] for more info.🧰 Tools
🪛 LanguageTool
[uncategorized] ~21-~21: This expression is usually spelled with a hyphen.
Context: ...ckUpdate /> ## Breaking Changes - New Hook based plugin system - See the updated [Plugin...(BASED_HYPHEN)
src/content/docs/en/plugins/index.mdx (2)
24-73: Hook-basedStudioCMSPlugininterface rewrite is comprehensive.
The new interface consolidates all plugin lifecycle points under a singlehooksproperty, improving modularity. Consider importing or referencingAstroIntegrationLoggerandGridItemInputtypes at the top of the doc (or linking to their definitions) to help readers locate type information.
109-115: Example plugin snippet aligns with the new API.
The update to usehooksand theaddIntegrationscallback correctly demonstrates the new pattern. You might optionally include astudiocms:config:setuphook in this example to illustrate both hook points, but it’s clear as-is.src/content/docs/en/plugins/extended.mdx (2)
45-47:Optionsinterface is minimal but sufficient.
Defining only aroutestring keeps the example focused. Optionally, add a JSDoc comment to clarify whatrouterepresents.
57-82:myIntegrationfunction structure is clean and functional.
The use ofinjectRouteandaddVirtualImportsinside the Astro integration hook demonstrates the extensibility model effectively. Consider typing theparamsargument to the hook for enhanced clarity.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
.github/workflows/ci-link-validator.yml(1 hunks)ec.config.mjs(1 hunks)package.json(2 hunks)src/content/docs/en/guides/database/sqld-server.mdx(2 hunks)src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-17.mdx(0 hunks)src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-18.mdx(1 hunks)src/content/docs/en/how-it-works/cli.mdx(1 hunks)src/content/docs/en/plugins/extended.mdx(2 hunks)src/content/docs/en/plugins/index.mdx(3 hunks)src/styles/starlight.css(1 hunks)studiocms(1 hunks)
💤 Files with no reviewable changes (1)
- src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-17.mdx
🧰 Additional context used
🪛 LanguageTool
src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-18.mdx
[uncategorized] ~21-~21: This expression is usually spelled with a hyphen.
Context: ...ckUpdate /> ## Breaking Changes - New Hook based plugin system - See the updated [Plugin...
(BASED_HYPHEN)
src/content/docs/en/guides/database/sqld-server.mdx
[grammar] ~57-~57: Probable usage error. Use “and” after ‘both’.
Context: ...our private key in both standard format as well as base64URLEncoded, which will be used fo...
(BOTH_AS_WELL_AS)
🔇 Additional comments (14)
.github/workflows/ci-link-validator.yml (1)
13-13: Ensure the secret and environment variable align with the link-check tool
The workflow setsPUBLIC_GITHUB_TOKENfromsecrets.STUDIOCMS_SERVICE_TOKEN. Please verify that:
- The
STUDIOCMS_SERVICE_TOKENsecret is configured in the repository settings.- The Starlight Link Check action actually consumes
PUBLIC_GITHUB_TOKEN(instead of the defaultGITHUB_TOKEN).src/styles/starlight.css (1)
86-88: Isolatestarlight-file-treeborder styling
Extracting the border into its own rule ensures only the file tree gets the outline while expressive code blocks remain border-free. This split looks clean and intentional.studiocms (1)
1-1: Submodule bump approved for beta.18 release
The Git submodule pointer has been updated to32263470412a3196f1ed9dca6bd5cfb8fe5f258a, aligning with the new beta.18 docs. Ensure you rungit submodule update --init --recursiveto sync locally and confirm this commit exists in the submodule repository.ec.config.mjs (1)
13-15: Configuration addition aligns with new plugin API
ThehandbookOptions.errorsarray correctly extendstwoslashOptionsfor fine-grained error filtering as per the hook-based plugin system.src/content/docs/en/how-it-works/cli.mdx (1)
7-9: Frontmatter badge addition for updated content
Adding the "Updated" badge undersidebarcorrectly highlights this change in the CLI docs. Indentation and YAML syntax are valid.package.json (2)
25-30: Verify private registry package URLs
The dependencies pointing tohttps://pkg.pr.new/...@a7b94c7ensure reproducible builds, but please confirm that the commit hash is correct and that these packages are published and accessible in the private registry.
47-47: Approve twoslash dependency bump
Bumpingexpressive-code-twoslashto^0.5.3aligns with the updated plugin configuration inec.config.mjs.src/content/docs/en/guides/database/sqld-server.mdx (2)
63-63: Maintain explicit placeholder instruction
LeavingASTRO_DB_APP_TOKEN=blank prompts users to paste their Standard JWT token — good for clarity.
107-107: Approve JWT environment variable update
UsingSQLD_AUTH_JWT_KEYfor the Base64URL-encoded token is consistent with Docker setup.src/content/docs/en/guides/upgrade/version-guides/0-1-0-beta-18.mdx (1)
1-11: New upgrade guide frontmatter
The metadata (i18n, title, description, sidebar badge/label) is correctly set up for the Beta 18 guide.src/content/docs/en/plugins/index.mdx (2)
7-9: Frontmatter badge addition is clear and consistent.
Adding an "Updated" badge with a success variant appropriately flags this page as recently revised.
118-118: Explanation text correctly reflects code changes.
The narrative accurately describes the version bump and the integration hook behavior.src/content/docs/en/plugins/extended.mdx (2)
7-9: Frontmatter badge update is on point.
Labeling this guide as "Updated" helps users identify the revised plugin example.
50-56: Path resolver logic is correct.
UsingcreateResolver(import.meta.url)to derive theresolvefunction is a proven pattern.
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Checklist before merge:
Summary by CodeRabbit