You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR makes it possible to have a custom src/pages/index.astro by modifying the defaultRoutes to support an extra mode in which it does not inject the default route for /{base}.
Once this PR is merged, to enable this feature on a project, one would have to do:
importtutorialkitfrom'@tutorialkit/astro';import{defineConfig}from'astro/config';exportdefaultdefineConfig({integrations: [tutorialkit({// only enable the routes for the tutorialdefaultRoutes: 'tutorial-only',}),],});
The alternative to this I considered was to modify index.astro so that it reads file from the src/pages/index.astro folder, however this wouldn't have worked under the eject mode as the file would end up reading itself recursively.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
When adding these things we need to make sure to add this to the docs as well and it'd be great if we can link the docs PR here as well for full transparency.
@d3lm, @SamVerschueren I've updated the JSDoc of the property so that the new value is explained.
Given we currently don't have any docs on https://tutorialkit.dev for our JSDocs I don't think it makes sense that I introduce that as part of this PR?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR makes it possible to have a custom
src/pages/index.astroby modifying thedefaultRoutesto support an extra mode in which it does not inject the default route for/{base}.Once this PR is merged, to enable this feature on a project, one would have to do:
The alternative to this I considered was to modify
index.astroso that it reads file from thesrc/pages/index.astrofolder, however this wouldn't have worked under theejectmode as the file would end up reading itself recursively.