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

[Migration]Cloudflare and astro #325

Merged
merged 153 commits into from
Oct 20, 2023
Merged
Changes from 1 commit
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
4861d6b
delete old actions
gentksb Aug 18, 2023
46f5751
edit tsconfig
gentksb Aug 18, 2023
bc8e76c
update
gentksb Aug 18, 2023
f111f68
clean deps
gentksb Aug 18, 2023
89816ae
ディレクトリ構成整理
gentksb Aug 18, 2023
c6575ba
save
gentksb Aug 19, 2023
6307d89
大体通る。PAAPIをFetch化する必要あり
gentksb Aug 22, 2023
dfe92f5
commit
gentksb Aug 23, 2023
d8c081a
ディレクトリ大移動
gentksb Aug 24, 2023
95c6150
update astro3.0 RC
gentksb Aug 24, 2023
1e86e7a
dev環境OK
gentksb Aug 24, 2023
debf594
edit gitignore
gentksb Aug 24, 2023
4b9cb55
なぜかHTMLRewriterのHandlerが実行されない
gentksb Aug 24, 2023
d1c52a9
ogpパーサー完成!
gentksb Aug 24, 2023
5c69e47
error 記録
gentksb Aug 25, 2023
e9ac36a
あってるはずなんだがなぁ
gentksb Aug 26, 2023
f020214
まともにエラーメッセージが出た
gentksb Aug 26, 2023
4b5f179
add
gentksb Aug 26, 2023
f365f69
なぜか500エラー
gentksb Aug 26, 2023
0cef70e
誤って消した分をコミット
gentksb Aug 26, 2023
bc858e0
save
gentksb Aug 26, 2023
4b9c898
aws4fetchで実装しなおし、レスポンスの文字化けをなんとかする
gentksb Aug 26, 2023
1c98ad2
キャッシュヘッダーを入れてみる
gentksb Aug 27, 2023
98fba65
ssrにしてみる
gentksb Aug 28, 2023
d7ed68f
update astro3.0 release version
gentksb Aug 31, 2023
bc3d451
rebuild deps-lock
gentksb Aug 31, 2023
d4e6512
pages functionsをAstroのServer Endpointに切り替え
gentksb Sep 9, 2023
1d5c283
bump
gentksb Sep 9, 2023
e1b2bce
update setting
gentksb Sep 9, 2023
a19a74a
migrate content collection SSR
gentksb Sep 9, 2023
b409bd6
test SSR adapter w/ sharp
gentksb Sep 9, 2023
e24794b
アダプタにassetsサポートとSharpサポートが来るまで停止
gentksb Sep 10, 2023
dc71f9b
SSG+Functionsで方針決定。OGPはビルド時に実施
gentksb Sep 11, 2023
aa8d647
テスト動く
gentksb Sep 11, 2023
d8bc6a1
formatter fix
gentksb Sep 13, 2023
45881f3
テスト実行環境OK
gentksb Sep 18, 2023
983f22c
Write passing The Asin test
gentksb Sep 18, 2023
cc79632
移行分ユニットテスト書き終わり
gentksb Sep 20, 2023
e4a4172
最新化
gentksb Sep 20, 2023
89aaca4
キャッシュ機構を入れた
gentksb Sep 21, 2023
fbba84a
24hキャッシュ機構を追加
gentksb Sep 21, 2023
8ea9fbc
reset [...slug].astro
gentksb Sep 28, 2023
ffc3d12
update dep
gentksb Sep 28, 2023
e7bde4a
add tailwind and daisyUI
gentksb Sep 28, 2023
17ef1d4
always import導入
gentksb Sep 28, 2023
74ae67f
コンテンツコレクション追加、編集開始
gentksb Sep 30, 2023
d291040
記事レイアウト完了
gentksb Sep 30, 2023
971d0b7
add primary tag tip
gentksb Sep 30, 2023
e5fe967
add primary tag badge
gentksb Sep 30, 2023
c36d362
調整
gentksb Sep 30, 2023
eb2bb6f
format
gentksb Sep 30, 2023
1914ef5
デスクトップのコンテナ動作を調整
gentksb Sep 30, 2023
2ef0f8a
記事ページを生成
gentksb Sep 30, 2023
c3cdd2e
LinkBoxのテスト完了
gentksb Oct 2, 2023
034c4b1
中央揃えと幅OK
gentksb Oct 2, 2023
254d2f3
相対リンク正常化
gentksb Oct 2, 2023
30769e9
Update rss.xml.js
gentksb Oct 4, 2023
3a9f23f
Update rss.xml.js
gentksb Oct 5, 2023
53e74f5
Update rss.xml.js
gentksb Oct 5, 2023
29430b2
Update about.astro
gentksb Oct 5, 2023
ca47973
Update Layout.astro
gentksb Oct 5, 2023
89d8333
Update Layout.astro
gentksb Oct 5, 2023
0629f23
ビルドOK
gentksb Oct 6, 2023
f8f7588
退避
gentksb Oct 10, 2023
5584a0f
jsxにLinkboxのレイアウトを統一
gentksb Oct 13, 2023
7ac94ed
LinkBox完了
gentksb Oct 13, 2023
9e6222b
外部リンク調整OK
gentksb Oct 13, 2023
a60ee71
test
gentksb Oct 13, 2023
e81c0d2
パス修正
gentksb Oct 14, 2023
23cd9cb
エラーなし、背景画像使うのが大変そうなので後回し
gentksb Oct 14, 2023
2d5c2e3
記事ヘッダOK
gentksb Oct 14, 2023
70ee680
まぁまぁそれっぽく
gentksb Oct 14, 2023
c01c3ee
ビルドエラー抑制
gentksb Oct 14, 2023
10a842f
LinkBoxよし
gentksb Oct 14, 2023
277aea6
エラー解決
gentksb Oct 14, 2023
950b70e
トップページとヒーロー画像をPictureで縮小
gentksb Oct 14, 2023
f6feed9
不要なクラス削除
gentksb Oct 14, 2023
254230f
commit
gentksb Oct 14, 2023
4342309
それっぽくなった
gentksb Oct 14, 2023
65a0f07
アフィリンク注意を追加
gentksb Oct 14, 2023
75827ac
日付処理
gentksb Oct 15, 2023
729204c
とりあえず要約を実装
gentksb Oct 15, 2023
d6ec01c
画像をさらに縮小
gentksb Oct 15, 2023
1bcd29e
Loadingを追加
gentksb Oct 15, 2023
4befdd5
タイトルリンクを作成
gentksb Oct 15, 2023
74dc44b
ログ削除
gentksb Oct 15, 2023
9d51347
細かい表示を修正
gentksb Oct 15, 2023
0720962
ページネーション
gentksb Oct 15, 2023
c9f5f05
フッター
gentksb Oct 15, 2023
6e90791
RSS
gentksb Oct 15, 2023
0e83ad4
情報送信についてのページ
gentksb Oct 15, 2023
49c0622
いったん戻す
gentksb Oct 15, 2023
4361495
typo
gentksb Oct 15, 2023
9c740b9
解決ミス修正
gentksb Oct 15, 2023
05888e8
root直下に移動
gentksb Oct 15, 2023
dcb58ff
移行中
gentksb Oct 15, 2023
ac29e7b
バリデーションOK
gentksb Oct 15, 2023
2e523a3
devサーバー起動
gentksb Oct 15, 2023
b3c1221
small fix
gentksb Oct 15, 2023
d5ada32
エイリアスやめる
gentksb Oct 15, 2023
728731a
ビルド走りだした
gentksb Oct 15, 2023
6d25c75
リンク切れ修正
gentksb Oct 15, 2023
79b2d77
括弧と強調の重複
gentksb Oct 15, 2023
15e8ca7
BlogPostCard.astro の更新
gentksb Oct 15, 2023
2e200ad
_redirectsファイルの事前作成を実装
gentksb Oct 15, 2023
9eafa70
compileroptionを追加
gentksb Oct 15, 2023
3d860e6
パスなどを修正
gentksb Oct 15, 2023
a473672
import をESM形式に
gentksb Oct 15, 2023
43cab69
手動実行に変更
gentksb Oct 15, 2023
20d512d
Merge branch 'master' into cloudflare-and-astro
gentksb Oct 15, 2023
31fbce2
resolve conflict
gentksb Oct 15, 2023
471b113
bump
gentksb Oct 17, 2023
5d070dd
aliasでインポートを整理
gentksb Oct 17, 2023
e4522ae
add optimize script
gentksb Oct 17, 2023
b6b5bb0
typo & maxWidth fix
gentksb Oct 18, 2023
b436bd4
local ok
gentksb Oct 18, 2023
e1d7b5f
enable prescript
gentksb Oct 18, 2023
c0cefd0
node20 issue fix
gentksb Oct 18, 2023
0a3225c
delete unused setting
gentksb Oct 18, 2023
acd7ce4
delete machine generated file
gentksb Oct 18, 2023
db37906
edit gitignore
gentksb Oct 18, 2023
0e13286
関連記事から現在の記事を削除
gentksb Oct 18, 2023
346dce8
small change OGPBOX
gentksb Oct 19, 2023
ab74d0e
OGPデータのキャッシュを実装
gentksb Oct 19, 2023
678e5cb
fix リンク切れ
gentksb Oct 19, 2023
7862ffd
ogp処理ロジック修正・カバー画像の表示を修正
gentksb Oct 19, 2023
3a4bb63
凡ミス処理
gentksb Oct 20, 2023
d8e1db8
記事画像中央寄せ
gentksb Oct 20, 2023
f884bed
add eslint
gentksb Oct 20, 2023
3fba17f
update vscode setting
gentksb Oct 20, 2023
c06ab2c
add GA and GTM
gentksb Oct 20, 2023
e26df5a
Json-LDを実装
gentksb Oct 20, 2023
874956e
add test&lint Action
gentksb Oct 20, 2023
c75cb7a
update actions name
gentksb Oct 20, 2023
1369fbc
pushトリガーを限定
gentksb Oct 20, 2023
453a9b9
update README
gentksb Oct 20, 2023
e759e22
記事カードのqualityを落としてみる
gentksb Oct 20, 2023
ba627a0
Update devcontainer.json
gentksb Oct 20, 2023
b559a37
ログ抑制
gentksb Oct 20, 2023
419d362
md to mdx
gentksb Oct 20, 2023
6512502
delete invaild frontmatter
gentksb Oct 20, 2023
2152da9
fix invalid JSX tweets
gentksb Oct 20, 2023
753d2e8
fallbackを可能な限りjpgにし、ベースサイズも縮小
gentksb Oct 20, 2023
919af87
fix OGP sitename rule
gentksb Oct 20, 2023
8e165ec
pathname -> hostname
gentksb Oct 20, 2023
b2c44f7
add adsense tag to partytown
gentksb Oct 20, 2023
b808b21
partytown でGA4以外のタグを追加
gentksb Oct 20, 2023
684e8e0
metaタグの不足を修正
gentksb Oct 20, 2023
8b2a3af
GA以外でPartytownを無効化。タグマネージャー経由で配信
gentksb Oct 20, 2023
fea60bf
fix sitename
gentksb Oct 20, 2023
907a36f
ロゴの場所を修正
gentksb Oct 20, 2023
feb05b6
オリジンのOGP画像を取得するように指定
gentksb Oct 20, 2023
9cd5684
add sitemap header
gentksb Oct 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
LinkBoxのテスト完了
  • Loading branch information
gentksb committed Oct 15, 2023
commit c3cdd2e3d81676935067632ab831a75317a1ccc0
File renamed without changes.
9 changes: 9 additions & 0 deletions cf-astro/@types/ogpData-type.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export interface OgpData {
ogpTitle?: string
ogpImageUrl?: string
ogpDescription?: string
ogpSiteName?: string
pageurl?: string
ok: boolean
error?: string
}
4 changes: 2 additions & 2 deletions cf-astro/astro.config.ts
Original file line number Diff line number Diff line change
@@ -13,9 +13,9 @@ export default defineConfig({
integrations: [
AutoImport({
imports: [
"./src/components/mdx/Test.astro"
"./src/components/mdx/Test.astro",
"./src/components/mdx/LinkBox.astro"
// {
// "./src/components/mdx/linkBox.tsx": ["LinkBox"],
// "./src/components/mdx/positive.tsx": ["PositiveBox"],
// "./src/components/mdx/negative.tsx": ["NegativeBox"]
// }
3 changes: 2 additions & 1 deletion cf-astro/functions/api/getOgpFromAsin/[asin].ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AmazonItemsResponse } from "amazon-paapi"
import { getAmazonProductInfo } from "./src/getAmazonProductInfo"

export interface ENV {
@@ -10,7 +11,7 @@ export interface ENV {
// response cache get-through logic here, using Cloudflare KV with typescript
// https://developers.cloudflare.com/workers/runtime-apis/kv
const getAmazonProductInfoCacheThrough = async (asin: string, env: ENV) => {
const cache = await env.PAAPI_DATASTORE.get(asin, "json")
const cache: AmazonItemsResponse = await env.PAAPI_DATASTORE.get(asin, "json")
if (cache) {
console.log("cache hit")
console.dir(cache, { depth: null, colors: true })
5 changes: 5 additions & 0 deletions cf-astro/package.json
Original file line number Diff line number Diff line change
@@ -19,13 +19,18 @@
"@astrojs/sitemap": "^3.0.0",
"@astrojs/tailwind": "^5.0.0",
"@braintree/sanitize-url": "^6.0.4",
"@chakra-ui/icons": "2",
"@chakra-ui/react": "2",
"@emotion/react": "11",
"@emotion/styled": "11",
"@tailwindcss/typography": "^0.5.10",
"@types/react": "^18.0.21",
"@types/react-dom": "^18.0.6",
"astro": "^3.1.1",
"astro-auto-import": "^0.3.1",
"aws4fetch": "^1.0.17",
"daisyui": "^3.8.1",
"framer-motion": "7",
"html-rewriter-wasm": "^0.4.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
Loading