Skip to content

Commit bf9f568

Browse files
authored
Create some initial templates for md (#2145)
* Create some initial templates for md * Add footer, include head and footer in other templates * Fix in enum template
1 parent 5272c6a commit bf9f568

36 files changed

+868
-2
lines changed

lib/src/model/category.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ class Category extends Nameable
127127
@override
128128
String get href => isCanonical ? '${package.baseHref}$filePath' : null;
129129

130-
String get categorization => _categoryRenderer.renderCategoryLabel(this);
130+
String get categoryLabel => _categoryRenderer.renderCategoryLabel(this);
131131

132132
String get linkedName => _categoryRenderer.renderLinkedName(this);
133133

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{{#hasCategoryNames}}
22
{{#displayedCategories}}
3-
{{{categorization}}}
3+
{{{categoryLabel}}}
44
{{/displayedCategories}}
55
{{/hasCategoryNames}}

lib/templates/md/404error.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# 404
2+
3+
Oops, something's gone wrong :-(
4+
5+
You've tried to visit a page that doesn't exist. Luckily this site has other
6+
[pages](index.md).

lib/templates/md/_accessor_getter.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{#getter}}
2+
{{{ linkedReturnType }}} {{>name_summary}}
3+
{{>features}}
4+
5+
{{>documentation}}
6+
{{>source_code}}
7+
{{/getter}}

lib/templates/md/_accessor_setter.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{#setter}}
2+
{{>name_summary}}({{{ linkedParamsNoMetadata }}})
3+
{{>features}}
4+
5+
{{>documentation}}
6+
{{>source_code}}
7+
{{/setter}}

lib/templates/md/_callable.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{#isDeprecated}}~~{{/isDeprecated}}{{{linkedName}}}{{{linkedGenericParameters}}}({{{ linkedParamsNoMetadata }}}) {{{ linkedReturnType }}} {{>categorization}}{{#isDeprecated}}~~{{/isDeprecated}}
2+
: {{{ oneLineDoc }}} {{{ extendedDocLink }}}
3+
{{>features}}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{{#hasAnnotations}}
2+
{{#annotations}}
3+
- {{{.}}}
4+
{{/annotations}}
5+
{{/hasAnnotations}}
6+
7+
{{{ linkedReturnType }}} {{>name_summary}}{{{genericParameters}}}({{#hasParameters}}{{{linkedParamsLines}}}{{/hasParameters}})

lib/templates/md/_categorization.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{{#hasCategoryNames}}
2+
{{#displayedCategories}}
3+
{{{categoryLabel}}}
4+
{{/displayedCategories}}
5+
{{/hasCategoryNames}}

lib/templates/md/_class.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
{{#isDeprecated}}~~{{/isDeprecated}}{{{linkedName}}}{{{linkedGenericParameters}}} {{>categorization}}{{#isDeprecated}}~~{{/isDeprecated}}
2+
: {{{ oneLineDoc }}} {{{ extendedDocLink }}}

lib/templates/md/_constant.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{{#isDeprecated}}~~{{/isDeprecated}}{{{ linkedName }}} const {{{ linkedReturnType }}} {{>categorization}}{{#isDeprecated}}~~{{/isDeprecated}}
2+
: {{{ oneLineDoc }}} {{{ extendedDocLink }}}
3+
{{>features}}

0 commit comments

Comments
 (0)