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

feat: client redirects at vue router level #336

Merged
merged 2 commits into from
Feb 3, 2024

Conversation

yixiaojiu
Copy link
Collaborator

Description

close #328

Linked Issues

Copilot Descriptions

copilot:all

Copy link

vercel bot commented Feb 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
valaxy-docs-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 2, 2024 3:39am

@@ -19,6 +20,22 @@ import type { ValaxyNodeConfig } from '../types'
import { checkMd } from '../markdown/check'
import { vLogger } from '../logger'
import { countPerformanceTime } from '../utils/performance'
import { isProd } from '../utils/env'

function generateConfig(options: ResolvedValaxyOptions) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, redirects is defined in siteConfig, so I wonder if we can get the configuration directly from the client without adding extra runtimeConfig.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can save some code?
I am not directly debugging now, so you can tell me if i have any mistakes.

Copy link
Collaborator Author

@yixiaojiu yixiaojiu Feb 2, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When compiling, we need to collect redirect rules from frontmatter, whick are not user-defined. Is it a good idea to put these in siteconfig?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I lack experience, if you think this is better, I will modify it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, you are right, some configs collected from frontmatter.

@YunYouJun YunYouJun merged commit 0ca8f97 into YunYouJun:main Feb 3, 2024
10 checks passed
Copy link

github-actions bot commented Feb 3, 2024

Yun Good!

@YunYouJun
Copy link
Owner

image

That happens to be the 888th commit.

@yixiaojiu yixiaojiu deleted the redirect-vue-router branch February 12, 2024 14:29
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.

feat: client redirects at vue router level
2 participants