hugolib: Finish menu vs section content pages

This commit also fixes the default menu sort when the weight is 0.

Closes #2974
This commit is contained in:
Bjørn Erik Pedersen
2017-02-20 09:33:35 +01:00
parent 2a6b26a7a5
commit a3af4fe46e
9 changed files with 817 additions and 705 deletions

View File

@@ -1235,11 +1235,11 @@ lag:
return sites
}
func writeSource(t *testing.T, fs *hugofs.Fs, filename, content string) {
func writeSource(t testing.TB, fs *hugofs.Fs, filename, content string) {
writeToFs(t, fs.Source, filename, content)
}
func writeToFs(t *testing.T, fs afero.Fs, filename, content string) {
func writeToFs(t testing.TB, fs afero.Fs, filename, content string) {
if err := afero.WriteFile(fs, filepath.FromSlash(filename), []byte(content), 0755); err != nil {
t.Fatalf("Failed to write file: %s", err)
}