Add 'href' and 'kind' to Documentable. (#2400)
These are each referenced from mustache templates where Documentable is the
context type:
* 'kind' is used in category.html, at the top-level.
* 'href' is used in _head.html while iterating over navLinks, which are
Documentable.
diff --git a/lib/src/model/documentable.dart b/lib/src/model/documentable.dart
index 4c63497..d478eb0 100644
--- a/lib/src/model/documentable.dart
+++ b/lib/src/model/documentable.dart
@@ -27,6 +27,10 @@
bool get isDocumented;
DartdocOptionContext get config;
+
+ String get href;
+
+ String get kind;
}
/// For a given package, indicate with this enum whether it should be documented
diff --git a/lib/src/model/package.dart b/lib/src/model/package.dart
index 4879ba1..a688254 100644
--- a/lib/src/model/package.dart
+++ b/lib/src/model/package.dart
@@ -90,6 +90,7 @@
String get homepage => packageMeta.homepage;
+ @override
String get kind => (isSdk) ? 'SDK' : 'package';
@override