Directives
The include and master server directives that avoids repetition of code in your files.
Master directive(file)
This is used for specifying a master file to use as template for the page. The child page uses xdt:Transform attributes on elements to merge content into the master — replacing, inserting, setting attributes on, removing, or creating elements.
Supported actions (case-insensitive): Replace, Insert (alias Append), InsertBefore(selector), InsertAfter(selector), SetAttributes, Remove, RemoveAll, RemoveAttributes(attr1,attr2,…), and Create. A child node is located in the master by xdt:Locator="Match(attr)" if present, otherwise by the node's id attribute, otherwise by tag-path hierarchy from <html> downwards. A master file may itself include a <!--#master--> directive, enabling multi-level inheritance. Unknown or malformed directives produce visible error messages in the output.
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.