You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: components/markdown-confluence-sync/README.md
+43-4Lines changed: 43 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -51,14 +51,28 @@ In order to be able to sync the markdown files with Confluence, you need to have
51
51
52
52
### Compatibility
53
53
54
-
> [!WARNING]
54
+
> [!IMPORTANT]
55
55
> This library has been tested only with Confluence 8.5.x. It may work with other versions, but it has not been tested.
56
56
57
57
## Features
58
58
59
59
The library reads the markdown files in a given folder and create/delete/update the corresponding Confluence pages following the same hierarchical structure under a provided Confluence page depending on the [synchronization mode](#sync-modes) to use.
60
60
61
-
Markdown documents to be synced __must have a `title` property, and a `sync_to_confluence` property set to `true` in the [frontmatter metadata](https://jekyllrb.com/docs/front-matter/).__
61
+
> [!IMPORTANT]
62
+
> Markdown documents to be synced __must have [frontmatter metadata](https://jekyllrb.com/docs/front-matter/)__ with at least next properties:
63
+
> *`title` property, used to give a title to the page in Confluence.
64
+
> *`sync_to_confluence` property set to `true`
65
+
66
+
```markdown
67
+
---
68
+
title: Page title
69
+
sync_to_confluence: true
70
+
---
71
+
72
+
# Page content
73
+
74
+
Hello, world! I'm a markdown file to be synced with Confluence.
75
+
```
62
76
63
77
The library has __two modes for syncing__:
64
78
*`tree` sync mode - Mirrors the hierarchical pages structure from given folder under a Confluence root page. Some files are used for [representing indices in the hierarchy](#index-files).
@@ -102,6 +116,19 @@ The library provides an NPM binary named `markdown-confluence-sync`. To use it,
102
116
}
103
117
```
104
118
119
+
All the markdown files to be synced must have frontmatter properties "title" and "sync_to_confluence" set to `true`. For example:
120
+
121
+
```markdown
122
+
---
123
+
title: Page title
124
+
sync_to_confluence: true
125
+
---
126
+
127
+
# Page content
128
+
129
+
Hello, world! I'm a markdown file to be synced with Confluence.
130
+
```
131
+
105
132
As a starting point, you can create a `markdown-confluence-sync.config.js` file in the root of your project with the following content (read the [Configuration](#configuration) section for more information and other configuration methods):
106
133
107
134
```js title="markdown-confluence-sync.config.js"
@@ -196,6 +223,9 @@ repository/
196
223
└── package.json
197
224
```
198
225
226
+
> [!TIP]
227
+
> You can also read the [Confluence Sync package documentation](https://github.com/Telefonica/cross-confluence-tools/tree/main/components/confluence-sync) for further info about the process of syncing to Confluence.
228
+
199
229
### Flat mode
200
230
201
231
The `flat` mode syncs all markdown files matching a [glob pattern](https://github.com/isaacs/node-glob#glob-primer) just under the root Confluence page. It does not create a nested hierarchy.
@@ -247,10 +277,19 @@ The namespace for the configuration of this library is `markdown-confluence-sync
247
277
248
278
### Configuration file
249
279
250
-
As mentioned above, the library supports defining the config in a configuration file. It supports many patterns for naming the file, as well as file formats. Read the [`@mocks-server/config` package](https://github.com/mocks-server/main/tree/master/packages/config) for further info about the supported patterns and formats. Just take into account that the namespace for the configuration is `markdown-confluence-sync`, so, a possible configuration file may be named `markdown-confluence-sync.config.js`.
280
+
As mentioned above, the library supports defining the config in a configuration file. It supports [many patterns for naming the file, as well as file formats](https://github.com/mocks-server/main/tree/master/packages/config#configuration-sources).
281
+
282
+
Just take into account that the namespace for the configuration is `markdown-confluence-sync`, so, possible configuration files may be:
283
+
284
+
*`markdown-confluence-sync.config.js`.
285
+
*`.markdown-confluence-syncrc.yaml`.
286
+
*`.markdown-confluence-syncrc.json`.
287
+
288
+
> [!TIP]
289
+
> Read the [`@mocks-server/config` docs](https://github.com/mocks-server/main/tree/master/packages/config#configuration-sources) for further info about all supported file names and formats of the configuration file.
Copy file name to clipboardExpand all lines: components/markdown-confluence-sync/package.json
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "@tid-xcut/markdown-confluence-sync",
3
3
"description": "Creates/updates/deletes Confluence pages based on markdown files in a directory. Supports Mermaid diagrams and per-page configuration using frontmatter metadata. Works great with Docusaurus",
0 commit comments