Skip to content
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

[WIP] Rework the entire plugin to use injectRoute (View Modes now have own route 🎉) #19

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

trueberryless
Copy link
Member

@trueberryless trueberryless commented Nov 24, 2024

Astro features rendering pages at build time even for plugins like this one. By injecting routes at build time, the View Modes can load much faster for the users + WAY less JS is needed to handle the view modes states...

Another benefit of these changes is the separation of the different Zen Mode options, which makes writing the CSS rules a lot cleaner and easier (more beneficial for me instead of end users of course... :))

Things need to be done before merge:

  • Switch Buttons must be adapted (less JS because they just link to the /zen-mode route 🎉)
  • Navigation has to be intercepted to keep user in same mode
  • Footer must be rendered (StarlightPage props problem maybe): See Discord Support Thread
  • i18n support must be implemented (could be done in another PR)

Copy link

changeset-bot bot commented Nov 24, 2024

⚠️ No Changeset found

Latest commit: e8ba227

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.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@trueberryless trueberryless changed the title [WIP] Rework the entire plugin to use injectRoute (View Modes have now own route 🎉) [WIP] Rework the entire plugin to use injectRoute (View Modes now have own route 🎉) Nov 25, 2024
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