Skip to content

Conversation

@alexdraconian
Copy link

@alexdraconian alexdraconian commented Jun 7, 2023

Replaces #267

Add mediawiki-like parameter support. Since original branch("template" branch) is far behind from present, I just implemented template functionality myself.

  1. Added "{{{name}}}" syntax as placeholders. This syntax will be hidden on render.
    Example: {{{1}}}, {{{2}}}, {{{some_name}}}

  2. Parameter syntax is like this:
    {{page>pagename#section&parameters=param1|param2|param3...}}
    {{page>pagename#section&parameters=name1=param1|name2=param2|name3=param3...}}

Wiki syntax can be used as parameter value.

vertical bar can be escaped with backslash. like this:
{{page>pagename?parameters=value\|with\|vertical bar|this is value 2}}
Which resolves to:
{{{1}}} -> value|with|vertical bar
{{{2}}} -> this is value 2

When name is not provided, they will be automatically resolved as integer names - 1, 2, 3, so on.

Wiki syntax can be used with parameter.

{{page>pagename?parameters=[[link\|some link]]}}
Which resolves to:
{{{1}}} -> [[link|some link]] (Rendered as internal wiki link)

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.

1 participant