Applying structured data

Using controlled templates to write DITA and compliant content helps us write more functionally.

Jekyll ensures as a great way for technical writers to generate topic based web content due to its templating function. Mixing DITA topic types and together and using layout templates to generate the output prove a good method to apply structured data. For example, if we write a topic that we define as a concept, we create one template to write the content and then a corresponding concept.html layout to display the content. Within this concept.html layout, we can add DITA XML data or metadata. When we generate the topic, our XML and structured data will appear in the metadata.

The two examples below show firstly a topic template We'd use this as our key content template where we edit the actual text we want to appear. Secondly, the XML snippet concept.xml that we would insert into our final output via a Jekyll layout template. This would include DITA tags in our final output in the metadata. We would repeat this for type information.

Using topic based authoring techniques coupled with structured data concepts ensure that our topics remain short and to the point.


# This is a strict template for concept topics adapted
# from
layout: post # _layouts/concept.html
title: # required
summary: # required, text or markdown
conbody: # required, text or markdown
example: #  text or markdown
<!-- concept.xml -->
<concept id="concept">

See also