0
我有一個用Hugo製作的舊網站,2015年有不同的文章。 他們被妥善排序。雨果中的體重問題沒有考慮到
現在使用最新的雨果,他們顯然是按日期排序,而不是按重量排序。
的目錄組織如下:顯示
content
docs
file1.md
file2.md
layouts
docs
single.html
summary.html
partials
css.html
header.html
footer.html
index.html
static
img1.png
img2.png
列表索引文件,
<div id="idx-content">
{{range .Data.Pages}}
{{.Render "summary"}}
{{end}}
</div>
不幸的是,文件摘要的順序不是按重量來分類的。 加.ByWeight
後.Data.Pages
沒有幫助。