Tagging Files

Tags tell Cartara which files to process for documentation. Simply add a comment at the top of your code file with comma-separated attributes.

All attributes must appear on a single line and be separated by commas. Required attributes
// @cartara id: [ID], name: [NAME]
Optional attributes
// @cartara id: [ID], name: [NAME], diagramType: [DIAGRAM], context: [CONTEXT], folderId: [FOLDER], spaceId: [SPACE]
Example:
// @cartara id: HF4563S1, name: API Docs, diagramType: component

const main = () => {
  console.log("Hello from Cartara!")
}

Combining Multiple Files into One Document

When your code spans multiple files, you can link them together to generate a single comprehensive document. In your primary (parent) file, add a standard tag with an id. In related files, reference the parent using parentId:

// @cartara parentId: [PARENT ID]

For example, if your parent file has id: 123456, add parentId: 123456 to any related files. Child tags don't need any other attributes.

Parent and child file relationship flowchart

Adding Context

Use the context attribute to guide the documentation generation. For example, to create internal API documentation:

// @cartara id: HF4563S1, name: API Docs, context: This is for internal teams. Show only API endpoints.

With this context, Cartara will focus on API endpoints and tailor the documentation for your internal team, improving relevance and accuracy.

The context attribute must appear on a single line and should not contain any commas.