GatsbyJSでlocation(現在のURL)を取得する方法 - Qiita
GatsbyJSではbuilding中はブラウザーと切り離されるためwindowメソッドからのlocation取得の手法が使えません(参考:CSS TRICKS - How to Get the Current Page URL in Gatsby) そのためGatsbyJ...