Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
}
}
rehype: |
{
"codeBlocks": true
}
log-level: debug

test-e2e:
Expand Down
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
#### Deprecated
#### Removed

## [2.4.0] - 2025-11-25

### Added

* 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)

### Fixed

* docs: Fix mermaid diagram code block example in README.md

## [2.3.0] - 2025-10-20

### Added
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ docs/
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
}
}
rehype: |
{
"codeBlocks": true
}
```

> [!TIP]
Expand Down Expand Up @@ -125,6 +129,10 @@ For example:
"accessToken": "${{ secrets.CONFLUENCE_PAT }}"
}
}
rehype: |
{
"codeBlocks": true
}
```

### Flat operation mode
Expand Down Expand Up @@ -164,12 +172,13 @@ confluence_page_id: 123456789

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

```markdown
````markdown
```mermaid
graph TD;
A-->B;
A-->C;
```
````

```mermaid
graph TD;
Expand Down Expand Up @@ -206,6 +215,7 @@ The action accepts a configuration file in the root of the repository, and it ca
| `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>` |
| `confluence-notice-template` | Template string to use for the notice message | No | |
| `confluence-dry-run` | Dry run mode: Do not update Confluence pages. Only log pages to sync | No | `false `|
| `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 | |
| `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 | |
| `log-level` | Log level: `silent`, `silly`, `debug`, `verbose`, `info`, `warn`, `error` | No | `info` |
| `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 (`.`) |
Expand Down Expand Up @@ -235,7 +245,10 @@ module.exports = {
},
spaceKey: "MY-SPACE",
rootPageId: "my-root-page-id"
}
},
rehype: {
codeBlocks: true,
},
}
```

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ inputs:
'Log create, update or delete requests to Confluence instead of really
making them'
type: boolean
rehype:
description: 'Rehype configuration as a stringified JSON'
multiline: true
type: string
dry-run:
description: 'Process the markdown files and configuration without connecting to Confluence'
type: boolean
Expand Down
1 change: 1 addition & 0 deletions cspell/missing.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
commonmark
frontmatter
opensource
rehype
syncrc
Loading