mirror of
https://github.com/kovetskiy/mark.git
synced 2025-04-24 05:42:40 +08:00
commit
7dbf14a7e3
35
README.md
35
README.md
@ -136,6 +136,20 @@ By default, mark provides several built-in templates and macros:
|
|||||||
- true
|
- true
|
||||||
- false
|
- false
|
||||||
|
|
||||||
|
* template `ac:box`to include info, tip, note, and warning text boxes. Parameters:
|
||||||
|
- Name: select box style
|
||||||
|
- info
|
||||||
|
- tip
|
||||||
|
- note
|
||||||
|
- warning
|
||||||
|
- Icon: show information/tip/exclamation mark/warning icon
|
||||||
|
- true
|
||||||
|
- false
|
||||||
|
- Title: title text of the box
|
||||||
|
- Body: text to display in the box
|
||||||
|
|
||||||
|
See: https://confluence.atlassian.com/conf59/info-tip-note-and-warning-macros-792499127.html
|
||||||
|
|
||||||
* template `ac:jira:ticket` to include JIRA ticket link. Parameters:
|
* template `ac:jira:ticket` to include JIRA ticket link. Parameters:
|
||||||
- Ticket: Jira ticket number like BUGS-123.
|
- Ticket: Jira ticket number like BUGS-123.
|
||||||
|
|
||||||
@ -185,6 +199,27 @@ This is my article.
|
|||||||
* :todo: Publish Article
|
* :todo: Publish Article
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Insert Colored Text Box
|
||||||
|
|
||||||
|
**article.md**
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
<!-- Space: TEST -->
|
||||||
|
<!-- Title: Announcement -->
|
||||||
|
|
||||||
|
<!-- Macro: :box:(.+):(.*):(.+):
|
||||||
|
Template: ac:box
|
||||||
|
Icon: true
|
||||||
|
Name: ${1}
|
||||||
|
Title: ${2}
|
||||||
|
Body: ${3} -->
|
||||||
|
|
||||||
|
:box:info::Foobar:
|
||||||
|
:box:tip:Tip of day:Foobar:
|
||||||
|
:box:note::Foobar:
|
||||||
|
:box:warning:Alert!:Foobar:
|
||||||
|
```
|
||||||
|
|
||||||
### Insert Table of Contents
|
### Insert Table of Contents
|
||||||
|
|
||||||
```markdown
|
```markdown
|
||||||
|
@ -144,6 +144,18 @@ func templates(api *confluence.API) (*template.Template, error) {
|
|||||||
`</ac:structured-macro>`,
|
`</ac:structured-macro>`,
|
||||||
),
|
),
|
||||||
|
|
||||||
|
/* https://confluence.atlassian.com/conf59/info-tip-note-and-warning-macros-792499127.html */
|
||||||
|
|
||||||
|
`ac:box`: text(
|
||||||
|
`<ac:structured-macro ac:name="{{ .Name }}">{{printf "\n"}}`,
|
||||||
|
`<ac:parameter ac:name="icon">{{ or .Icon "false" }}</ac:parameter>{{printf "\n"}}`,
|
||||||
|
`<ac:parameter ac:name="title">{{ or .Title "" }}</ac:parameter>{{printf "\n"}}`,
|
||||||
|
`<ac:rich-text-body>{{printf "\n"}}`,
|
||||||
|
`{{ .Body }}{{printf "\n"}}`,
|
||||||
|
`</ac:rich-text-body>{{printf "\n"}}`,
|
||||||
|
`</ac:structured-macro>{{printf "\n"}}`,
|
||||||
|
),
|
||||||
|
|
||||||
/* https://confluence.atlassian.com/conf59/table-of-contents-macro-792499210.html */
|
/* https://confluence.atlassian.com/conf59/table-of-contents-macro-792499210.html */
|
||||||
|
|
||||||
`ac:toc`: text(
|
`ac:toc`: text(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user