Skip to content
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

Parametrize the toc but have default values #38

Merged
merged 1 commit into from
Nov 30, 2020

Conversation

snejus
Copy link
Contributor

@snejus snejus commented Nov 29, 2020

Hey, firstly - you're an absolute legend for coming up with this tool. It's saving me hours every week and I stopped dreaming nightmares not having to deal with that editor.

Sorry that this is coming without an issue or a request - I just extended the code when I quickly needed to change things in the default TOC.

The template includes something that be unusual - newlines for each of the parameters. I do sometimes double-check the xhtmls before uploading, and they end up a bit more readable this way. The output on confluence isn't different as far as I could tell. For example:

Input:

<!-- Macro: :toc:
     Template: ac:toc
     Style: circle
     MaxLevel: 3 -->

Output:

<p><ac:structured-macro ac:name="toc">
<ac:parameter ac:name="printable">true</ac:parameter>
<ac:parameter ac:name="style">circle</ac:parameter>
<ac:parameter ac:name="maxLevel">3</ac:parameter>
<ac:parameter ac:name="indent"></ac:parameter>
<ac:parameter ac:name="minLevel">1</ac:parameter>
<ac:parameter ac:name="exclude"></ac:parameter>
<ac:parameter ac:name="type">list</ac:parameter>
<ac:parameter ac:name="outline">clear</ac:parameter>
<ac:parameter ac:name="include"></ac:parameter>
</ac:structured-macro></p>

I'll be adding another PR with a little extension to the code blocks.

@kovetskiy kovetskiy merged commit 27e7af5 into kovetskiy:master Nov 30, 2020
@snejus snejus deleted the extend-toc branch December 1, 2020 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants