作ったブログに新しい記事を作成しよう思ったらそもそもサーバが起動しなくなった汗
1
2
3
4
5
6
7
8
9
10
| $ hugo server
Start building sites …
DEPRECATION WARNING on line 4 of /Users/ayaka/Git/blog/blog_bk2/themes/zzo/assets/sass/abstracts/_mixins.scss:
!global assignments won't be able to declare new variables in future versions.
Consider adding `$theme-map: null` at the top level.
ERROR 2020/10/31 20:05:47 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": Get "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": dial tcp: lookup api.instagram.com: no such host
ERROR 2020/10/31 20:05:47 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": Get "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": dial tcp: lookup api.instagram.com: no such host
Built in 6159 ms
Error: Error building site: logged 2 error(s)
|
ちょうど2日前に対応してくださったとな。ありがたや。
https://github.com/zzossig/hugo-theme-zdoc/issues/34
themeのリポジトリはsubmoduleでもってきていたので、最新版にする。submoduleは一度ハマるときつい…
1
| $ git submodule update --remote --merge
|
これでどうだ!
1
2
3
4
5
6
| $ hugo server
Start building sites …
ERROR 2020/10/31 20:08:59 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": Failed to retrieve remote file: Bad Request
ERROR 2020/10/31 20:08:59 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BGvuInzyFAe/&maxwidth=640&omitscript=true": Failed to retrieve remote file: Bad Request
Built in 7151 ms
Error: Error building site: logged 2 error(s)
|
まだエラー…
インスタグラムのapiがうまいこと実行できてないみたい。
作成した記事にはインスタグラムのapiを叩いているところはないので、雛形ファイルかテンプレで作成されていた記事のあたりが怪しそう。
content/en/posts/my-first-post.md に↓の様な記述が。
ここでインスタグラムにアクセスしていそう…
## Instagram Simple Shortcode
instagram_simple BGvuInzyFAe hidecaption
<br>
特別すぐに削除する必要もなかったので今後の参考も兼ね残しておいたファイルが悪さをしていたよう。
不要のため、content/en/posts/xxx.mdファイルをすべからく削除し、hugo server
を実行したら起動できた。
https://xxx.com/ja
で404が出る
上記の対応を行ってデプロイしたら、今までアクセスできていたURLで404が返ってきた。ぐぬ。
https://xxx.com/ja/post
とかhttps://xxx.com/en
とかではアクセスできるみたい。
issue漁ってみたら少し前に対応してる人がいた。
https://github.com/zzossig/hugo-theme-zzo/issues/335
同じことを試してみる。custom_scssは設定がなかったため、config.tomlに設定してassets/scss/custom.scss
を作成するところから。
デプロイしたらいつも通りhttps://xxx.com/ja
でアクセスできた。
ヤッタネ