-
Notifications
You must be signed in to change notification settings - Fork 302
Copy prompt from a remote folder in docs #2715
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
base: ai-docs
Are you sure you want to change the base?
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
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. Comment |
| const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/); | ||
| if (!frontmatterMatch) { | ||
| return; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we not have a frontmatter parser somewhere already? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to avoid adding a preprocessor. Only if it would affect 90% of the markdown files it would be suitable.
cant we just pass the routeId as frontmatter to
website/src/lib/utils/routePrompts.ts
Line 27 in 9c8868b
| // Accept explicit routePath (like "/docs/quick-starts/react"). If not provided, use current page. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried having an implementation where it just uses a markdown (prompt.md) file at a route. The problem with that is that we lose all styling because it uses some other markdown processor (I think it-markdown). I checked how partials are processed, and it's through another pre-processor. Since I couldn't go around any other way, I decided to do this. Lmk ur thoughts @TorstenDittmann
No description provided.