issues
search
okaryo
/
gatsby-plugin-satorare
Gatsby plugin for dynamic OG image generation in JSX
https://www.npmjs.com/package/gatsby-plugin-satorare
MIT License
5
stars
1
forks
source link
やりたいこと
#1
Closed
okaryo
closed
1 year ago
okaryo
commented
1 year ago
やりたいこと
satori風にJSX構文でOGP画像をリッチに記述したい
上記で記述した記事ごとのOGPがビルド時に生成されるようにしたい
ユーザーの使い方
gatsby-configの中で記事用のqueryを渡す
OGP用のJSXファイル内で上記のqueryを受け取ってOGP画像を作成してexport
必要に応じてgatsby-configの中で上記のファイルの場所を指定しておく
そうすると、queryの中のmarkdownRemarkか、その他のフィールドで生成したOGP画像が取得できるようになるのでSEOコンポーネントなどで使用する
現状の懸念点
configファイルでどこまでできるのか
他のプラグインで似たような設定をしたことあるからできそうな気がするが、詳しくわからんのでなんとも
似たプラグインのソースコード読んだり、ドキュメント漁ったりしよう
queryにカスタムのフィールド追加するのどうやるの
okaryo
commented
1 year ago
okaryo
commented
1 year ago
やりたいこと
ユーザーの使い方
現状の懸念点