Directives

The include and master server directives that avoids repetition of code in your files.

Inc­lude di­rec­tive(file)

This is used for including the contents of one or more files into a web page. This could commonly be a common piece of code throughout a site, such as a page header, a page footer and a navigation menu.

Mas­ter di­rec­tive(file)

This is used for specifying a master file to use as template for the page. By using XDT attributes you can swap, remove and insert content into the specificed master file.

Since a master page is typically shared across pages in different sub-folders, all references to assets (CSS, JS, images, etc.) should use absolute paths starting with "/". For example: "/css/style.css" or "/js/app.js". Docly will automatically resolve these paths to the correct URL based on the published folder structure, ensuring that the assets load correctly regardless of which sub-folder the page resides in.