Skip to content

Commit bc2bd7a

Browse files
authored
Merge pull request #64 from Telefonica/release
Release v2.4.0
2 parents 3366a19 + 40e5acb commit bc2bd7a

File tree

11 files changed

+392
-184
lines changed

11 files changed

+392
-184
lines changed

.github/workflows/test-e2e.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ jobs:
5151
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
5252
}
5353
}
54+
rehype: |
55+
{
56+
"codeBlocks": true
57+
}
5458
log-level: debug
5559

5660
test-e2e:

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
#### Deprecated
1212
#### Removed
1313

14+
## [2.4.0] - 2025-11-25
15+
16+
### Added
17+
18+
* feat: Add support for code blocks rendering in Confluence pages. Add `rehype.codeBlocks` option to enable this feature (bumps @telefonica/markdown-confluence-sync to 2.3.0)
19+
20+
### Fixed
21+
22+
* docs: Fix mermaid diagram code block example in README.md
23+
1424
## [2.3.0] - 2025-10-20
1525

1626
### Added

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ docs/
7878
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
7979
}
8080
}
81+
rehype: |
82+
{
83+
"codeBlocks": true
84+
}
8185
```
8286
8387
> [!TIP]
@@ -125,6 +129,10 @@ For example:
125129
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
126130
}
127131
}
132+
rehype: |
133+
{
134+
"codeBlocks": true
135+
}
128136
```
129137

130138
### Flat operation mode
@@ -164,12 +172,13 @@ confluence_page_id: 123456789
164172

165173
Mermaid diagrams are supported in the markdown files. The action will render the diagrams as images and upload them to Confluence.
166174

167-
```markdown
175+
````markdown
168176
```mermaid
169177
graph TD;
170178
A-->B;
171179
A-->C;
172180
```
181+
````
173182

174183
```mermaid
175184
graph TD;
@@ -206,6 +215,7 @@ The action accepts a configuration file in the root of the repository, and it ca
206215
| `confluence-notice-message` | Notice message to add at the beginning of the Confluence pages | No | `<p><strong>AUTOMATION NOTICE: This page is synced automatically, changes made manually will be lost</strong></p>` |
207216
| `confluence-notice-template` | Template string to use for the notice message | No | |
208217
| `confluence-dry-run` | Dry run mode: Do not update Confluence pages. Only log pages to sync | No | `false `|
218+
| `rehype` | Rehype configuration as a stringified JSON (supports multiline). Refer to the [Markdown Confluence Sync docs](https://github.com/Telefonica/confluence-tools/tree/main/components/markdown-confluence-sync#configuration) | No | |
209219
| `dry-run` | Process markdown files without sending them to the `confluence-sync` library. Useful to early detection of possible errors in configuration, markdown files, etc. Note that, requests that would be made to Confluence won't be logged, use `confluence-dry-run` for that, which also connects to Confluence to calculate the requests to do | No | |
210220
| `log-level` | Log level: `silent`, `silly`, `debug`, `verbose`, `info`, `warn`, `error` | No | `info` |
211221
| `cwd` | Current working directory. Path from where resolve `docs-dir`, `files-pattern`, `ignore`, and search for the configuration file. It must be relative to the repository folder | No | Repository root (`.`) |
@@ -235,7 +245,10 @@ module.exports = {
235245
},
236246
spaceKey: "MY-SPACE",
237247
rootPageId: "my-root-page-id"
238-
}
248+
},
249+
rehype: {
250+
codeBlocks: true,
251+
},
239252
}
240253
```
241254

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ inputs:
6868
'Log create, update or delete requests to Confluence instead of really
6969
making them'
7070
type: boolean
71+
rehype:
72+
description: 'Rehype configuration as a stringified JSON'
73+
multiline: true
74+
type: string
7175
dry-run:
7276
description: 'Process the markdown files and configuration without connecting to Confluence'
7377
type: boolean

cspell/missing.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
commonmark
22
frontmatter
33
opensource
4+
rehype
45
syncrc

0 commit comments

Comments
 (0)