-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add Fumadocs example #48
Conversation
@fuma-nama is attempting to deploy a commit to the Pontus Abrahamsson's projects Team on Vercel. A member of the Team first needs to authorize it. |
This is amazing, thank you! I would love if it was possible to do the processing with fastGlob in the translate global function to support multiple files for all translate functions something like this:
What do you think? |
If so this could fix this issue too: #45 - let me know if you want me to do these change! |
Hmm but this way we cannot define a more specific way to append the locale code to file names, because glob libraries don't actually support |
This is the closest result I designed, otherwise it may not be able to maintain backward compatibility export default defineConfig({
md: {
include: [
{
glob: "content/docs/**/*.mdx",
to: (file, locale) => {
const { dir, name, ext } = path.parse(file);
return path.join(dir, `${name}.${locale}${ext}`);
},
},
],
// ignore translated content
filter: (file) => path.basename(file).split(".").length === 2,
},
},
}); |
Btw I can include them in the PR ;) |
I like this much better! I guess this would solve #45 too? |
done! |
LFG! Thanks! |
It translates the Markdown + UI content.
Note that I found running
languine translate
on uncommitted files cause errors, I think they should be simply treated as new files, a fix is included to make it work