Error: Page title "README" is not unique across all files.
maeghan-porter opened this issue · comments
I love the idea of this tool and I'm trying to set this up via the github action (https://github.com/markdown-confluence/publish-action), but I'm getting this error even though all the docs and other closed issues I've found imply that this should be treated as a "Folder Note" and be uploaded as the contents of the folder page. I'm not really sure what's wrong. The error, as in the title, is: Error: Page title "README" is not unique across all files.
. For what it's worth, I also tried naming these files index.md
which just resulted in the same error, but with index
instead of README
.
My folder structure:
docs/
confluence/
folder1/
nestedFolder/
file1.md
...
README.md
file1.md
file2.md
...
README.md
folder2/
file1.md
...
README.md
.markdown-confluence.json
...
The contents of my .markdown-confluence.json
are as so:
{
"confluenceBaseUrl": "https://my-confluence-url",
"confluenceParentId": "111111111",
"atlassianUserName": "my-email@email.com",
"folderToPublish": ".",
"contentRoot": "/github/workspace/docs/confluence",
"firstHeadingPageTitle": true
}
And my workflow file:
name: Publish Docs to Confluence
on: push
permissions:
contents: read
concurrency:
group: publish-to-confluence
cancel-in-progress: false
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Publish Markdown to Confluence
uses: markdown-confluence/publish-action@v5
with:
atlassianApiToken: ${{ secrets.CONFLUENCE_API_TOKEN }}
Any advice would be very appreciated!
As a sidenote: the docs for the github action are wrong. It says uses: markdown-confluence/publish@v1
in the example but it's actually uses: markdown-confluence/publish-action@v5
.
I was facing the same issue . I assume your readme has no heading if this is the case the their should be unique heading for each readme . if no heading then each md file name should be unique.
this worked for me