mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
Added support for v2 Confluence page format (#29)
* Added support for v2 pge format * Added toc macro * Added toc to documentation Co-authored-by: Stefano Teodorani <teopost@sviluppo06.apex-net.it>
This commit is contained in:
parent
e26903dcee
commit
eda2e4704d
@ -156,7 +156,13 @@ This is my article.
|
|||||||
* :todo: Publish Article
|
* :todo: Publish Article
|
||||||
```
|
```
|
||||||
|
|
||||||
## Insert Jira Ticket
|
### Insert Table of Contents
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
<!-- Include: ac:toc -->
|
||||||
|
```
|
||||||
|
|
||||||
|
### Insert Jira Ticket
|
||||||
|
|
||||||
**article.md**
|
**article.md**
|
||||||
|
|
||||||
|
@ -385,6 +385,13 @@ func (api *API) CreatePage(
|
|||||||
"value": body,
|
"value": body,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
"metadata": map[string]interface{}{
|
||||||
|
"properties": map[string]interface{}{
|
||||||
|
"editor": map[string]interface{}{
|
||||||
|
"value": "v2",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
if parent != nil {
|
if parent != nil {
|
||||||
|
@ -136,6 +136,19 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* https://confluence.atlassian.com/conf59/table-of-contents-macro-792499210.html */
|
||||||
|
|
||||||
|
`ac:toc`: text(
|
||||||
|
`<ac:structured-macro ac:name="toc">`,
|
||||||
|
`<ac:parameter ac:name="printable">true</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="style">disc</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="maxLevel">7</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="minLevel">1</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="exclude">{{ .Exclude }}</ac:parameter>`,
|
||||||
|
`<ac:parameter ac:name="outline">false</ac:parameter>`,
|
||||||
|
`</ac:structured-macro>`,
|
||||||
|
),
|
||||||
|
|
||||||
// TODO(seletskiy): more templates here
|
// TODO(seletskiy): more templates here
|
||||||
} {
|
} {
|
||||||
templates, err = templates.New(name).Parse(body)
|
templates, err = templates.New(name).Parse(body)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user