-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nested readme file uploads not working #25
Comments
You are correct. Nested markdown files will be upload under the parent page "API Docs" in the "MyTeamSpace" space. Unfortunately, nested files with the same name aren't considered different files to Confluence. We're determining the remote page name by matching only the space and filename. So two files named Solving for #14 also requires persisting the file and remote ID locally and having that mapping would subsequently fix this problem too. Up to this point I've just had unique names for my docs. I realize that's not a real solution, though. I'll probably take a stab at #14 before this one, but happy to accept PRs. |
Does markdown2confluence upload all these files under 1 parent or it will create the same tree strucutre under that parent in confluence. test |
Yes, it mirrors the folder structure.
|
For directories it will create a single page with links to the child pages. It might be a good idea to earmark readme.md or index.md files as the content for those base directory pages. |
I like using README.md for this purpose because that's what a lot of Git providers (e.g. GitHub, GitLab, Bitbucket) will display for the content of a folder. A while back I opened up #17. Back in May, in a fork, I implemented the feature to work for my purposes at beb13e3. I question if this is good enough for a pull request or perhaps a starting point for someone else to improve. If you have any suggestions, I'd be happy to work on it a little and submit a PR. |
Hey that's great. If it's worked for you I'm sure it'll work for others. I need to write some unit tests so that people feel more comfortable about submitting PRs but this project hasn't been a high priority. In any case submit a PR! I'm sure others will benefit from it. |
i am not able to replciate this tree structure below in confluence. My output is : everything gets put in the parent dir, the sub-dirs dont get created in cofnluence test |
It seems to work for me.
You'll note that |
is there a limit on how big the directory structure is ? Because it does not work for me like yours. |
None that I know of. Just to be clear, you're using the latest version, follow the commands I pasted above, and still get a different result? |
so if this page called abs.md already exists in space XYZ .. i cant create a different parent and expect abs.md to be under that parent correct. .. since it already sees inside space XYZ it will just go ahead and update it rather than recreate |
Yes, that's my understanding. This stems from the fact the Confluence does not support two pages with the same name. |
it looks like it does work for small nested tree structures with few kb of .md files. But will not work for a vast tree structure with multiple md files in each layer. |
I am working in a Confluence environment with about 20 people and only a few of us are syncing our changes. I generally write a few pages and then sync them. So I never have a lot of new content that needs to get synced. |
markdown2confluence --space 'MyTeamSpace' --parent 'API Docs' markdown-files
I am guessing this should upload all the nested md files present in the dir "markdown-files"? Am i correct.
The text was updated successfully, but these errors were encountered: