kovetskiy / mark

Sync your markdown files with Confluence pages.
https://samizdat.dev
Apache License 2.0
993 stars 148 forks source link

Question About Page Tree Macro #308

Closed joyfulrabbit closed 1 year ago

joyfulrabbit commented 1 year ago

I have a nested "Folder Structure " in confluence using placeholder documents.

_Project Space_

Products
   |__Product 1
            |__Document about prod 1
            |__Reference Document about prod 1
            |__Cat Photos and network diagrams
   |__Product 2
           |__ User Guide
           |__TroubleshootingForExtraSimpleFolk

In my simple diagram above "Products", "Product 1" , "Product 2" are autogenerated blank pages for organization. I would like to add a page tree in each.

I'm not sufficiently well versed in Go and Confluence to get this working in Mark. There isn't a page tree macro built in.

I would like a) a flag or option to add a page tree in any auto generated "missing parent" pages or b) some help for what I need to put in the .md file for each placeholder page to create a page tree. I have enough placeholders that automation makes sense. I just need a nudge in the correct direction.

The macro I'm using shown in storage format:

<p><ac:structured-macro ac:name="pagetree" ac:schema-version="1" ac:macro-id="1fe276e8-c84c-4575-9ff8-06cdf9e6d289"><ac:parameter ac:name="root"><ac:link><ri:page ri:content-title="@self" /></ac:link></ac:parameter></ac:structured-macro></p>

joyfulrabbit commented 1 year ago

I'm unclear what I did wrong previously. I pasted this exact block of text into a sample.md file with a header and it worked fine. Testing everywhere else.

joyfulrabbit commented 1 year ago

I submitted a PR https://github.com/kovetskiy/mark/pull/329 . Added a pagetree macro template so the markdown files pass linting

mrueg commented 1 year ago

We merged the PR but did not close the issue. :) Thanks!