@@ -28,8 +28,12 @@ func TestExampleSite(t *testing.T) {
28
28
[]byte ("This is a blog post." )},
29
29
},
30
30
{"favicon.ico" , nil },
31
- {"feed.xml" , nil },
32
- {"sitemap.xml" , [][]byte {[]byte ("<url><loc>http://localhost:8080/</loc>" )}},
31
+ {"feed.xml" , [][]byte {
32
+ []byte ("<item><title>Hello, world!</title><link>http://localhost:8080/hello-world/</link>" ),
33
+ }},
34
+ {"sitemap.xml" , [][]byte {
35
+ []byte ("<url><loc>http://localhost:8080/</loc>" ),
36
+ }},
33
37
{"sitemap.xsl" , nil },
34
38
}
35
39
@@ -103,6 +107,7 @@ func TestFilepathToUrlpath(t *testing.T) {
103
107
}{
104
108
{input : "content/index.md" , expectedUrlPath : "" , expectedDatePublished : time.Time {}},
105
109
{input : "content/about.md" , expectedUrlPath : "about/" , expectedDatePublished : time.Time {}},
110
+ {input : "content/blog/index.md" , expectedUrlPath : "blog/" , expectedDatePublished : time.Time {}},
106
111
{input : "content/projects/gozer.md" , expectedUrlPath : "projects/gozer/" , expectedDatePublished : time.Time {}},
107
112
{input : "content/2023-11-23-hello-world.md" , expectedUrlPath : "hello-world/" , expectedDatePublished : time .Date (2023 , 11 , 23 , 0 , 0 , 0 , 0 , time .UTC )},
108
113
{input : "content/blog/2023-11-23-here-we-are.md" , expectedUrlPath : "blog/here-we-are/" , expectedDatePublished : time .Date (2023 , 11 , 23 , 0 , 0 , 0 , 0 , time .UTC )},
0 commit comments