| labels | reference |
|---|
Page attributes are key-value metadata attached to a document. text2confl reads them before conversion and uses them to control page metadata in Confluence (title, labels, parent, properties, and more).
[TOC]
Markdown - YAML front matter block at the very beginning of the file, before any content:
---
title: My page
labels: docs, team-a
---
Page content starts here.AsciiDoc - document attributes using the :key: value syntax, in the document header (before the first blank
line). Attributes can appear before or after the document title, but the preferred placement is after it:
= My page
:keywords: docs,team-a
Page content starts here.Attribute values enclosed in {} or [] are treated as JSON, which allows setting complex page properties:
---
property_nl_avisi_nh: { "isEnabled": true }
---Document title (name) can be defined in the following ways (from top priority to bottom):
titleattribute- first-level heading at the top of document. If it is used, heading will be removed from resulting document to avoid duplication (unless the underlying format handles this automatically)
- name of file
---
title: My page
---
Document contentResult title - My page
---
title: My page
---
# Header that is not used as a title
Document contentResult title - My page
# My Page
Document contentResult title - My page
Note: resulting page content will not include first level header
Document contentResulting title - my-page
Confluence page labels can be set by the labels attribute (or keywords in AsciiDoc). The value can be a
comma-separated string or a list of strings (if the file format supports this).
Example - Markdown document that will have 3 labels (one, two, three):
---
labels: one, two, three
---
Document contentIt is possible to specify a custom parent for any page using parent or parentId.
Attribute parentId should contain id of parent page and attribute parent should contain parent page title. When
both are specified, parentId takes precedence and parent is ignored.
Example - Markdown document with custom parent Custom Parent Page. Such document will be uploaded under this page if
it exists. When custom parent does not exist, upload procedure fails.
---
parent: Custom Parent Page
---
Document contentPage properties are a set of special key-value pairs in Confluence. Confluence and plugins use them to configure page behavior.
Properties can be of the following types: string, boolean, list of strings, object (json)
text2confl supports setting properties and extracts them from page attributes.
Attribute patterns to be properties:
- Every attribute named
property_<property_name>is treated as a page property.
Example:
Here we use property_ prefix to define 2 properties - first is simple string and complex is an object with 2 fields
property_first: hello
property_complex: { "first": one, "flag": false }- Confluence Cloud
editorproperty holds the version of editor (v1 or v2)content-appearance-publishedproperty set tofull-widthmakes the page take the full screen width
- appfire Numbered Heading plugin uses properties to enable page numbering on specific pages in Confluence Server.
Confluence Server does not support properties with dashes, trying to set such property will cause request to fail.
The _virtual_ boolean attribute marks a page as a hierarchy placeholder. text2confl uses the file to determine the
page's position in the page tree but does not modify the page's content in Confluence.
---
_virtual_: true
---See Virtual pages for background and use cases.