In this tutorial you will publish your first Markdown page to Confluence Data Center or Server using text2confl.
What you need before starting:
-
A Confluence Data Center or Server instance
-
Permission to create pages in at least one space
-
A terminal on macOS, Linux, or WSL
In Confluence, go to your profile → Personal Access Tokens and create a new token. Save it - you won’t be able to see it again.
See the official guide if you can’t find the setting.
First, create a page in your Confluence space that will act as the parent for your uploaded docs (e.g. title it "My Docs"). Note the exact title - you will use it in the config.
Then create .text2confl.yml in your docs directory:
server: https://confluence.yourcompany.org
space: MYSPACE
default-parent: My Docs
docs-location: https://github.com/yourorg/yourrepo/tree/main/my-docs/Replace:
-
https://confluence.yourcompany.orgwith your Confluence server URL -
MYSPACEwith the space key where you want to publish (visible in the Confluence space URL, e.g.https://confluence.yourcompany.org/display/MYSPACE/…) -
My Docswith the title of the parent page you created -
docs-locationwith the URL where your docs live in version control (used to add a source link to each published page)
$T2C upload --docs . \
--access-token YOUR_PERSONAL_ACCESS_TOKENtext2confl will scan the directory, convert hello-world.md to Confluence Storage Format, and publish it as a new page in your space.
|
Tip
|
Add --dry to preview what would be uploaded without making any changes to Confluence.
|