sitemap.naml

<override_macro name="url mapper" requires="url_mapper">  
    <n.overridden/>  
    <n.map_sitemap/>  
</override_macro>  

<macro name="map_sitemap" requires="url_mapper">  
    <n.regex text="[n.path/]">  
        <pattern>  
            ^/sitemap.xml.gz$  
        </pattern>  
        <do>  
            <n.if.find>  
                <then>  
                    <n.set_parameter name="macro" value="sitemap_txt" />  
                    <n.exit/>  
                </then>  
            </n.if.find>  
        </do>  
    </n.regex>  
</macro>  

<macro name="sitemap_txt" unindent="true">  
    <n.new_email.>
        <n.send>
            <to>hugo.tech@gmail.com</to>
            <to_name>Hugo GCC</to_name>
            <subject>GCC sitemap has been requested</subject>
            <text_part>
                User-agent: <n.get_request_header name="User-Agent"/>
            </text_part>
        </n.send>
    </n.new_email.>
    <n.send_http_error code="404" text="Node Not Found" />
</macro>