Skip to content

Commit decaf3e

Browse files
committed
feat: embedded option
Like the asciidoc option, this option can be used to generate pages without the surrounding tags to include them in other documentation pages, like the mrdocs website.
1 parent 1d253d7 commit decaf3e

File tree

191 files changed

+5726
-5223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+5726
-5223
lines changed

docs/mrdocs.schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@
5050
"title": "Detect SFINAE expressions",
5151
"type": "boolean"
5252
},
53+
"embedded": {
54+
"default": false,
55+
"title": "Output an embeddable document, which excludes the header, the footer, and everything outside the body of the document. This option is useful for producing documents that can be inserted into an external template.",
56+
"type": "boolean"
57+
},
5358
"filters": {
5459
"properties": {
5560
"symbols": {

share/mrdocs/addons/generator/adoc/layouts/overload-set.adoc.hbs renamed to share/mrdocs/addons/generator/adoc/layouts/index-overload-set.adoc.hbs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
33
[#{{sectionref}}]
44

5-
={{#unless is_multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}
5+
={{#unless @root.config.multipage}}={{/unless}} {{#if symbol.name}}{{>types/nested-name-specifier symbol=symbol.parent includeNamespace=true}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}
66

77
{{#if symbol.members.[0]}}
88

@@ -12,7 +12,7 @@
1212

1313
{{/if}}
1414

15-
=={{#unless is_multipage}}={{/unless}} Synopsis
15+
=={{#unless @root.config.multipage}}={{/unless}} Synopsis
1616

1717
{{#each symbol.members as | member |}}
1818

@@ -23,14 +23,14 @@
2323
{{/each}}
2424
2525
{{#if symbol.members.[0].doc.description}}
26-
=={{#unless is_multipage}}={{/unless}} Description
26+
=={{#unless @root.config.multipage}}={{/unless}} Description
2727
2828
{{symbol.members.[0].doc.description}}
2929
{{/if}}
3030
3131
{{#with (flattenUnique symbol.members "doc.exceptions" "exception") as |allExceptions|}}
3232
{{#if (ne (len allExceptions) 0)}}
33-
=={{#unless is_multipage}}={{/unless}} Exceptions
33+
=={{#unless @root.config.multipage}}={{/unless}} Exceptions
3434
3535
|===
3636
| Name | Thrown on
@@ -44,15 +44,15 @@
4444
{{/with}}
4545
4646
{{#if symbol.members.[0].doc.returns}}
47-
=={{#unless is_multipage}}={{/unless}} Return Value
47+
=={{#unless @root.config.multipage}}={{/unless}} Return Value
4848
4949
{{symbol.members.[0].doc.returns}}
5050
5151
{{/if}}
5252
5353
{{#with (flattenUnique symbol.members "doc.params" "name") as |allParams|}}
5454
{{#if (ne (len allParams) 0)}}
55-
=={{#unless is_multipage}}={{/unless}} Parameters
55+
=={{#unless @root.config.multipage}}={{/unless}} Parameters
5656
5757
|===
5858
| Name | Description {{! TODO: | Type? }}
@@ -66,7 +66,7 @@
6666
{{/with}}
6767
6868
{{#if symbol.members.[0].doc.preconditions}}
69-
=={{#unless is_multipage}}={{/unless}} Preconditions
69+
=={{#unless @root.config.multipage}}={{/unless}} Preconditions
7070
7171
{{#each symbol.members.[0].doc.preconditions}}
7272
{{.}}
@@ -75,7 +75,7 @@
7575
{{/if}}
7676
7777
{{#if symbol.members.[0].doc.postconditions}}
78-
=={{#unless is_multipage}}={{/unless}} Postconditions
78+
=={{#unless @root.config.multipage}}={{/unless}} Postconditions
7979
8080
{{#each symbol.members.[0].doc.postconditions}}
8181
{{.}}
@@ -84,7 +84,7 @@
8484
{{/if}}
8585
8686
{{#if symbol.members.[0].doc.see}}
87-
=={{#unless is_multipage}}={{/unless}} See Also
87+
=={{#unless @root.config.multipage}}={{/unless}} See Also
8888
8989
{{#each symbol.members.[0].doc.see}}
9090
{{.}}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{! The section with a symbol in single page output or the symbol page in multi page output }}
22
{{#if relfileprefix}}:relfileprefix: {{relfileprefix}}{{/if}}
3-
[#{{sectionref}}]
43

4+
[#{{sectionref}}]
55
{{> (concat 'symbols' '/' (lookup symbol 'kind')) symbol=symbol}}

share/mrdocs/addons/generator/adoc/layouts/single-footer.adoc.hbs

Lines changed: 0 additions & 3 deletions
This file was deleted.

share/mrdocs/addons/generator/adoc/layouts/single-header.adoc.hbs

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{! The wrapper for single page documentation or symbols in a multipage documentation }}
2+
{{#unless @root.config.multipage }}
3+
= Reference
4+
:mrdocs:
5+
{{/unless}}
6+
{{! Content generated with index.hbs }}
7+
{{contents}}
8+
9+
[.small]#Created with https://www.mrdocs.com[MrDocs]#

share/mrdocs/addons/generator/html/layouts/overload-set.html.hbs renamed to share/mrdocs/addons/generator/html/layouts/index-overload-set.html.hbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{{! A page when the symbol type is "overloads" }}
22
{{#if relfileprefix}}<meta name="relfileprefix" content="{{relfileprefix}}">{{/if}}
3-
<div id="{{#if (is_multipage)}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}">
3+
<div id="{{#if @root.config.multipage}}{{symbol.id}}{{else}}{{symbol.ref}}{{/if}}">
44

55
<h1>{{#if symbol.name}}Overload set {{>types/nested-name-specifier symbol=symbol.parent}}{{symbol.name}}{{else}}Unnamed overload set{{/if}}</h1>
66

share/mrdocs/addons/generator/html/layouts/single-footer.html.hbs

Lines changed: 0 additions & 5 deletions
This file was deleted.

share/mrdocs/addons/generator/html/layouts/single-header.html.hbs

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)