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.txt$  
        </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.text_response/>  
    
    <n.root_node.descendant_apps_list.>
        <n.loop.>
            <n.current_node.url/><n.crlf/>
        </n.loop.>
    </n.root_node.descendant_apps_list.>    
    
    <n.root_node.topics_list. start="0" length="50000" sort="last-node-date">
        <n.loop.>
            <n.base_url/><n.current_node.topic_path view="[n.classic_view/]"/><n.crlf/>
        </n.loop.>
    </n.root_node.topics_list.>
    
    <n.site_users. start="0" length="10000">
        <n.loop.>
            <n.current_user.url/><n.crlf/>
        </n.loop.>
    </n.site_users.>     
</macro>