-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate comment system from Utterances to Giscus #94
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: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: echoja <[email protected]>
echoja
left a comment
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 have made a mistake. I want to move to giscus, not Disqus.
Co-authored-by: echoja <[email protected]>
Updated to use Giscus instead of Disqus. Giscus uses GitHub Discussions (not Issues), supports reply threads, has better real-time theme switching, and is actively maintained. See docs/GISCUS_MIGRATION.md for setup instructions. (commit: 3dcf9c1) |
echoja
left a comment
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 want you to delete all codes related Utterances.
- I won't use any DEFAULT values. Remove defensive codes.
- I won't use any categoreis. remove them.
- What is NEXT_PUBLIC_GISCUS_REPO_ID for? Do I need this? Remove it if NEXT_PUBLIC_GISCUS_REPO is just enough.
echoja
left a comment
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.
And you need to fix this error:
✓ Compiled successfully in 39.8s
Running TypeScript ...
Failed to compile.
./src/modules/i18n/HtmlLangUpdater.tsx:12:5
Type error: Type 'string | null' is not assignable to type 'string'.
Type 'null' is not assignable to type 'string'.
10 | useEffect(() => {
11 | const locale = getLocaleFromPathname(pathname);
12 | document.documentElement.lang = locale;
| ^
13 | }, [pathname]);
14 |
15 | return null;
Next.js build worker exited with code: 1 and signal: null
ELIFECYCLE Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1
Co-authored-by: echoja <[email protected]>
Done (commit: c36e1ec):
|
Co-authored-by: echoja <[email protected]>
Fixed (commit: 64ea41b). The error occurred because |
TypeScript Error Fixed
The error occurred because
getLocaleFromPathnamereturnsLocale | null, butdocument.documentElement.langexpects astring. Fixed by using the nullish coalescing operator (??) to fallback toi18n.defaultLocalewhen the locale is null.Build now compiles successfully with TypeScript.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.