viper.SetDefault("CanonifyUrls", false)
        viper.SetDefault("Indexes", map[string]string{"tag": "tags", "category": "categories"})
        viper.SetDefault("Permalinks", make(hugolib.PermalinkOverrides, 0))
+       viper.SetDefault("Sitemap", hugolib.Sitemap{"", -1})
 
        if hugoCmdV.PersistentFlags().Lookup("build-drafts").Changed {
                viper.Set("BuildDrafts", Draft)
 
 func newPage(filename string) *Page {
        page := Page{contentType: "",
                File:   File{FileName: filename, Extension: "html"},
-               Node:   Node{Keywords: []string{}},
+               Node:   Node{Keywords: []string{}, Sitemap: Sitemap{Priority: -1}},
                Params: make(map[string]interface{})}
 
        jww.DEBUG.Println("Reading from", page.File.FileName)
                        }
                case "status":
                        page.Status = cast.ToString(v)
+               case "sitemap":
+                       page.Sitemap = parseSitemap(cast.ToStringMap(v))
                default:
                        // If not one of the explicit values, store in Params
                        switch vv := v.(type) {
 
                return nil
        }
 
+       sitemapDefault := parseSitemap(viper.GetStringMap("Sitemap"))
+
        optChanged := false
 
        n := s.NewNode()
-       n.Data["Pages"] = s.Pages
+
+       // Prepend homepage to the list of pages
+       pages := make(Pages, 0)
+
+       page := &Page{}
+       page.Site = s.Info
+       page.Url = "/"
+
+       pages = append(pages, page)
+       pages = append(pages, s.Pages...)
+
+       n.Data["Pages"] = pages
+
+       for _, page := range pages {
+               if page.Sitemap.ChangeFreq == "" {
+                       page.Sitemap.ChangeFreq = sitemapDefault.ChangeFreq
+               }
+
+               if page.Sitemap.Priority == -1 {
+                       page.Sitemap.Priority = sitemapDefault.Priority
+               }
+       }
 
        // Force `UglyUrls` option to force `sitemap.xml` file name
        switch s.Target.(type) {
 
 package hugolib
 
-import jww "github.com/spf13/jwalterweatherman"
+import (
+       "github.com/spf13/cast"
+       jww "github.com/spf13/jwalterweatherman"
+)
 
 type Sitemap struct {
        ChangeFreq string
-       Priority   float32
+       Priority   float64
 }
 
-func (s Sitemap) Validate() {
-       if s.Priority < 0 {
-               jww.WARN.Printf("Sitemap priority should be greater than 0, found: %f", s.Priority)
-               s.Priority = 0
-       } else if s.Priority > 1 {
-               jww.WARN.Printf("Sitemap priority should be lesser than 1, found: %f", s.Priority)
-               s.Priority = 1
+func parseSitemap(input map[string]interface{}) Sitemap {
+       sitemap := Sitemap{Priority: -1}
+
+       for key, value := range input {
+               switch key {
+               case "changefreq":
+                       sitemap.ChangeFreq = cast.ToString(value)
+               case "priority":
+                       sitemap.Priority = cast.ToFloat64(value)
+               default:
+                       jww.WARN.Printf("Unknown Sitemap field: %s\n", key)
+               }
        }
+
+       return sitemap
 }
 
   <url>
     <loc>{{ .Permalink }}</loc>
     <lastmod>{{ safeHtml ( .Date.Format "2006-01-02T15:04:05-07:00" ) }}</lastmod>{{ with .Sitemap.ChangeFreq }}
-    <changefreq>{{ . }}</changefreq>{{ end }}{{ with .Sitemap.Priority }}
-    <priority>{{ . }}</priority>{{ end }}
+    <changefreq>{{ . }}</changefreq>{{ end }}{{ if ge .Sitemap.Priority 0.0 }}
+    <priority>{{ .Sitemap.Priority }}</priority>{{ end }}
   </url>
   {{ end }}
 </urlset>`)