oucrc-org / web-2024 Goto Github PK
View Code? Open in Web Editor NEWoucrc.netのうち、更新時のSlack通知機能と、画面プレビューの描画を担当する部分
Home Page: https://oucrc-web-2024.netlify.app
oucrc.netのうち、更新時のSlack通知機能と、画面プレビューの描画を担当する部分
Home Page: https://oucrc-web-2024.netlify.app
とりあえずフォームのロジックだけ移植
以下のようなコンポーネントを使う
問題はGoogle Formへの送信で、どうしてもnameのハードコーディングが必要になると思う
https://github.com/temasaguru/fly-and-fly/blob/main/drivers/views/components/form/InputControl.tsx
現行サイトは hljsをクライアントサイドで実行しているが、記事取得時に本文のhtmlを先にパースしてしまえば、フロントはCSSだけで良くなる
前のリポジトリ: oucrc-org/web-2021#207
https://beta.nextjs.org/docs/routing/route-handlers
メソッドごとに処理を書くため、req.methodの判定がいらなくなった
だいぶリファクタが必要
ウィジェットjsがお知らせページ以外に埋め込まれていないように思われる
https://app.netlify.com/sites/oucrc-web-2024/functions/___netlify-handler
May 30, 09:50:48 PM: 4fc3cbe6 ERROR Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './server.edge' is not defined by "exports" in /var/task/node_modules/.pnpm/[email protected]_3j7hb26pwgm6spbxoejtjx6xja/node_modules/react-dom/package.json
at new NodeError (node:internal/errors:387:5)
at throwExportsNotFound (node:internal/modules/esm/resolve:365:9)
at packageExportsResolve (node:internal/modules/esm/resolve:649:3)
at resolveExports (node:internal/modules/cjs/loader:554:36)
at Function.Module._findPath (node:internal/modules/cjs/loader:594:31)
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:1012:27)
at /var/task/node_modules/.pnpm/[email protected]_3j7hb26pwgm6spbxoejtjx6xja/node_modules/next/dist/server/require-hook.js:180:36
at Function.Module._load (node:internal/modules/cjs/loader:871:27)
at Module.require (node:internal/modules/cjs/loader:1098:19)
at require (node:internal/modules/cjs/helpers:108:18) {
code: 'ERR_PACKAGE_PATH_NOT_EXPORTED'
}
2/22時点では Our team is still working on this
とのこと
まあ通常のrevalidateを10分間隔とかにすればいいか?
前者はパスを基準に、後者は任意で付与するタグを基準にデータを更新する
https://nextjs.org/docs/app/api-reference/functions/revalidatePath
https://nextjs.org/docs/app/api-reference/functions/revalidateTag
https://beta.nextjs.org/docs/data-fetching/revalidating#using-on-demand-revalidation
上記で説明されているようなルートにCMSからwebhookを投げれば、一切の待ち時間が必要なくなるが、認証情報を持たせられない https://blog.microcms.io/add-webhook-signature/ 署名検証のためシークレットの設定をすること
https://kittygiraudel.com/2022/05/16/rate-limit-nextjs-api-routes/
レートリミットが有効か。
動くと思っていたが、実際に記事コンが始まってみると全く通知が来ない
編集時の差分判定がおかしい可能性がある
インラインTeXは安定したが、余計にパース箇所が増えている
https://oucrc-web-2023.netlify.app/articles/2ueoa68wimt
[MMD]
がレポートのタイトルみたいになっている
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.