第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

由于格式()在類型 toml 上不可用,因此站點構建失敗

由于格式()在類型 toml 上不可用,因此站點構建失敗

Go
德瑪西亞99 2022-10-04 14:26:56
當我使用管道在 Hugo 上構建站點時,構建不斷失敗,并出現(xiàn)以下錯誤:Error: Error building site: failed to render pages: render of "home" failed: execute of template failed: template: index.html:22:11: executing "main" at <partial "session-dates.html" .>: error calling partial: "/github/workspace/layouts/partials/session-dates.html:4:20": execute of template failed: template: partials/session-dates.html:4:20: executing "partials/session-dates.html" at <.Site.Params.current_startDate.Format>: can't evaluate field Format in type toml.LocalDate錯誤發(fā)生在 、 和 值上,其中它表示沒有可用于該類型的 Format 函數(shù)。配置是:current_startDatecurrent_endDatebaseURL = "..."languageCode = "en-us"title = "..."summaryLength = 20relativeURLs = true[params]    current_startDate = 2021-10-10    current_endDate   = 2021-12-04則模板代碼為:<div class="row">    <div class="col-lg-12 dates">        <span class="long-dates">            {{ .Site.Params.current_startDate.Format "January 2, 2006" }} —            {{ .Site.Params.current_endDate.Format "January 2, 2006" }}        </span>        <span class="short-dates">            {{ .Site.Params.current_startDate.Format "01/02/06" }} —            {{ .Site.Params.current_endDate.Format "01/02/06" }}        </span>    </div></div>我嘗試查看文檔和其他示例,并且配置似乎是正確的,因此我認為我缺少一些明顯的東西。
查看完整描述

1 回答

?
拉風的咖菲貓

TA貢獻1995條經(jīng)驗 獲得超2個贊

如果其他人遇到此問題,由于某種原因,特別是在管道上 https://github.com/chabad360/hugo-gh-pages 這不起作用。在本地測試原始格式時,我可以使用命令行進行構建和預覽。


解決方法是給出完整的日期時間格式,因此對于我上面的示例,這是:


baseURL = "..."

languageCode = "en-us"

title = "..."

summaryLength = 20

relativeURLs = true


[params]

    current_startDate = 2021-10-10T14:15:59-06:00

    current_endDate   = 2021-12-04T14:15:59-06:00

此配置按預期在本地和管道中生成。


查看完整回答
反對 回復 2022-10-04
  • 1 回答
  • 0 關注
  • 68 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號