In this tutorial you will publish your first Markdown page to Confluence Cloud using text2confl.
What you need before starting:
-
A Confluence Cloud site (e.g.
https://yoursite.atlassian.net/wiki) -
Permission to create pages in at least one space
-
A terminal on macOS, Linux, or WSL
Go to Atlassian account security settings and create an API token. Save it - you won’t be able to see it again.
Your credentials for text2confl are:
-
username - your Atlassian account email
-
password - the API token you just created
First, create a page in your Confluence space that will act as the parent for your uploaded docs (e.g. title it "My Docs"). Open that page and copy its ID from the URL - it is the number after /pages/:
https://yoursite.atlassian.net/wiki/spaces/MYSPACE/pages/123456789/My+Docs
^^^^^^^^^
Then create .text2confl.yml in your docs directory:
server: https://yoursite.atlassian.net/wiki
space: MYSPACE
default-parent-id: 123456789
docs-location: https://github.com/yourorg/yourrepo/tree/main/my-docs/Replace:
-
yoursitewith your Atlassian site name -
MYSPACEwith the space key where you want to publish (visible in the Confluence space URL, e.g.https://yoursite.atlassian.net/wiki/spaces/MYSPACE/…) -
123456789with the page ID you copied -
docs-locationwith the URL where your docs live in version control (used to add a source link to each published page)
$T2C upload --docs . \
--user your@email.com \
--password YOUR_API_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.
|