hugo檔案允許使用頁面和全域資源來獲取影像。我想知道是否可以通過網址獲取影像?像這樣的東西:
{{- $image := resources.Get "https://i.imgur.com/gZxmnyn.jpeg" -}}
uj5u.com熱心網友回復:
從 hugo v0.91.0 你可以使用resources.GetRemote
來源:https ://github.com/gohugoio/hugo/releases/tag/v0.91.0
例子:
{{ $image := resources.GetRemote "https://i.imgur.com/gZxmnyn.jpeg" }}
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/439702.html
上一篇:Go條件指標值
下一篇:有效地計算整數除法的下限
