md2dita: prolog in XML author and Ixiasoft different
Posted: Wed May 13, 2020 3:43 pm
Hi there,
I would like to convert markdown files that were created with additional content to be used with the HUGO renderer (https://gohugo.io/). I know this will not be possible completely. Anyway, I noticed that the integrated md2dita converter in XML author can deal with HUGO's so-called frontmatter (metadata between two "---" at the beginning of the document, see below) and convert it into a <prolog> section:
MD Source:
When imported in XML author (version: 21.1) with File -> Open, the md2dita editor converts the frontmatter to dita like this:
This is very close to what I need: I would like to save metadata about the original MD source in the Ixiasoft DITA CMS.
However, when I try to do the same in Ixiasoft with the integrated version of oXygen (version 20.1), the result looks different:
How can I get the same result as in the local XML author? Is the reason for the different result the older XML author version used (20.1. in -Ixiasoft compared to 21.1.)? Or do I miss something and there is some option I need to choose to get the same result?
Ideally, I'd like to get the following <prolog> section:
Thank you
I would like to convert markdown files that were created with additional content to be used with the HUGO renderer (https://gohugo.io/). I know this will not be possible completely. Anyway, I noticed that the integrated md2dita converter in XML author can deal with HUGO's so-called frontmatter (metadata between two "---" at the beginning of the document, see below) and convert it into a <prolog> section:
MD Source:
Code: Select all
---
title: Hibernate a Cluster
description: "Hibernate a Cluster to save money"
type: tutorial-page
level: beginner
category: Operation
scope: operator
tags: ["task"]
aliases: ["/readmore/hibernate"]
publishdate: 2020-04-06
---
# Hibernate a Cluster
Clusters are only needed
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="hibernate-a-cluster">
<title>Hibernate a Cluster</title>
<prolog>
<metadata>
<category>Operation</category>
</metadata>
<data name="aliases" value="["/readmore/hibernate"]"/>
<data name="description" value=""Hibernate a Cluster to save money""/>
<data name="level" value="beginner"/>
<data name="publishdate" value="2020-04-06"/>
<data name="scope" value="operator"/>
<data name="tags" value="["task"]"/>
<data name="title" value="Hibernate a Cluster"/>
<data name="type" value="tutorial-page"/>
</prolog>
<body>
<p>Clusters are only needed...
However, when I try to do the same in Ixiasoft with the integrated version of oXygen (version 20.1), the result looks different:
- Only the Category metadata is kept. Maybe, because this is a standard element that can be used in the prolog section?
- The prolog section is not only inserted at the beginning, but also after all following sections.
How can I get the same result as in the local XML author? Is the reason for the different result the older XML author version used (20.1. in -Ixiasoft compared to 21.1.)? Or do I miss something and there is some option I need to choose to get the same result?
Ideally, I'd like to get the following <prolog> section:
Code: Select all
<prolog>
<metadata>
<category>Operation</category>
</metadata>
<othermeta content="Hibernate a Cluster" name="title" />
<othermeta content="Hibernate a Cluster to save money" name="description" />
<othermeta content="beginner" name="" />
<othermeta content="beginner" name="level" />
<othermeta content="operator" name="scope" />
<othermeta content="2020-04-06" name="publishdate" />
<othermeta content="tutorial-page" name="type" />
</prolog>