Skip to content
  • Nicolas Peugnet's avatar
    df88bb72
    Output sitemap in XML format · df88bb72
    Nicolas Peugnet authored
    This format is better supported by crawlers than the previous txt "one
    line per URL" format. It also has more features but we are not using
    them yet.
    
    The escapeURL function allows to escape the Location field. This prevents
    URLs from containing illegal characters by converting them to their
    percent encoding representation.
    
    It is implemented as a text/template instead of using the encoding/xml
    package, because we do not need all of the xml features and we only need
    to encode it and never to decode it. It is a lot simpler this way.
    df88bb72
    Output sitemap in XML format
    Nicolas Peugnet authored
    This format is better supported by crawlers than the previous txt "one
    line per URL" format. It also has more features but we are not using
    them yet.
    
    The escapeURL function allows to escape the Location field. This prevents
    URLs from containing illegal characters by converting them to their
    percent encoding representation.
    
    It is implemented as a text/template instead of using the encoding/xml
    package, because we do not need all of the xml features and we only need
    to encode it and never to decode it. It is a lot simpler this way.
Loading