Section13 pages
Websites
Examples for building published websites — navigation, SEO, redirects, forms and caching.
Documentation integration exampleMaking your own custom display templates for Docly schemas. This example shows how you make the "Documentation" schema display in your own…Breadcrumb exampleExample on how to show the current navigation path for a page. The path comes from request.url, which is URL-encoded, so each part is…Menu with active class (hash)Example of how to create a Bootstrap navbar with an active class based on the current page URL (request.url). Useful for highlighting the…Using published folder searchDocly's built-in site search (a POST with func=search) has been removed. It followed the Docly shares only, so a site with its own access…Prevent Docly changing HREF and SRCWhen a site is published under a sub path (for example /shop), Docly rewrites root-relative references in the output so they point into the…How to make JS and CSS bundlesGet higher ranked with fewer and smaller JS and CSS files. In other words, this means that you should always bundle all JS and CSS files to…Redirect to a page or siteRedirect from a hash page with docly.redirect(url) - and how to make a redirect site.Example of dynamic sitemap.xml fileThis example generates a dynamic sitemap.xml fileSetting and adding meta tags to headRequest variables and edit links - exampleExamples on how to get current folder, url, site name, edit links, page title and more.Implementing caching in an API functionThis function implements caching for an API endpoint by checking the 'If-Modified-Since' header and returning a 304 status if the content…Linking images and files in hashHow to link files and images from #JS template code. Always go through docly.linkImage / docly.linkFile — including for a file that lives…Sending forms by e-mailUse this documentation to set up page templates that submit forms by e-mail, protected by backend validation such as Cloudflare Turnstile.