@@ -225,9 +225,10 @@ class HtmlGeneratorInstance {
225
225
_layoutTitle (package.name, package.isSdk ? '' : 'package' , false ),
226
226
'metaDescription' :
227
227
'${package .name } API docs, for the Dart programming language.' ,
228
- 'navLinks' : [package],
228
+ 'navLinks' : [], // we're at the root
229
229
'subnavItems' : _gatherSubnavForPackage (package),
230
- 'htmlBase' : '.'
230
+ 'htmlBase' : '.' ,
231
+ 'self' : package
231
232
};
232
233
233
234
if (package.hasDocumentation) {
@@ -257,9 +258,10 @@ class HtmlGeneratorInstance {
257
258
'htmlBase' : '..' ,
258
259
'metaDescription' :
259
260
'${lib .name } library API docs, for the Dart programming language.' ,
260
- 'navLinks' : [package, lib ],
261
+ 'navLinks' : [package],
261
262
'subnavItems' : _gatherSubnavForLibrary (lib),
262
- 'layoutTitle' : _layoutTitle (lib.name, 'library' , lib.isDeprecated)
263
+ 'layoutTitle' : _layoutTitle (lib.name, 'library' , lib.isDeprecated),
264
+ 'self' : lib
263
265
};
264
266
265
267
_build (path.join (lib.dirName, '${lib .fileName }' ),
@@ -297,9 +299,10 @@ class HtmlGeneratorInstance {
297
299
'API docs for the ${clazz .name } ${clazz .kind } from the ${lib .name } library, for the Dart programming language.' ,
298
300
'layoutTitle' :
299
301
_layoutTitle (clazz.nameWithGenerics, clazz.kind, clazz.isDeprecated),
300
- 'navLinks' : [package, lib, clazz ],
302
+ 'navLinks' : [package, lib],
301
303
'subnavItems' : _gatherSubnavForClass (clazz),
302
- 'htmlBase' : '..'
304
+ 'htmlBase' : '..' ,
305
+ 'self' : clazz
303
306
};
304
307
305
308
_build (path.joinAll (clazz.href.split ('/' )), _templates.classTemplate, data);
@@ -317,8 +320,9 @@ class HtmlGeneratorInstance {
317
320
'constructor' : constructor,
318
321
'layoutTitle' : _layoutTitle (
319
322
constructor.name, 'constructor' , constructor.isDeprecated),
320
- 'navLinks' : [package, lib, clazz, constructor],
321
- 'htmlBase' : '../..'
323
+ 'navLinks' : [package, lib, clazz],
324
+ 'htmlBase' : '../..' ,
325
+ 'self' : constructor
322
326
};
323
327
324
328
_build (path.joinAll (constructor.href.split ('/' )),
@@ -334,8 +338,9 @@ class HtmlGeneratorInstance {
334
338
'library' : lib,
335
339
'class' : eNum,
336
340
'layoutTitle' : _layoutTitle (eNum.name, 'enum' , eNum.isDeprecated),
337
- 'navLinks' : [package, lib, eNum],
338
- 'htmlBase' : '..'
341
+ 'navLinks' : [package, lib],
342
+ 'htmlBase' : '..' ,
343
+ 'self' : eNum
339
344
};
340
345
341
346
_build (path.joinAll (eNum.href.split ('/' )), _templates.classTemplate, data);
@@ -354,8 +359,9 @@ class HtmlGeneratorInstance {
354
359
_layoutTitle (function.name, 'function' , function.isDeprecated),
355
360
'metaDescription' :
356
361
'API docs for the ${function .name } function from the ${lib .name } library, for the Dart programming language.' ,
357
- 'navLinks' : [package, lib, function],
358
- 'htmlBase' : '..'
362
+ 'navLinks' : [package, lib],
363
+ 'htmlBase' : '..' ,
364
+ 'self' : function
359
365
};
360
366
361
367
_build (path.joinAll (function.href.split ('/' )), _templates.functionTemplate,
@@ -377,8 +383,9 @@ class HtmlGeneratorInstance {
377
383
'layoutTitle' : _layoutTitle (method.name, 'method' , method.isDeprecated),
378
384
'metaDescription' :
379
385
'API docs for the ${method .name } method from the ${clazz .name } class, for the Dart programming language.' ,
380
- 'navLinks' : [package, lib, clazz, method],
381
- 'htmlBase' : '../..'
386
+ 'navLinks' : [package, lib, clazz],
387
+ 'htmlBase' : '../..' ,
388
+ 'self' : method
382
389
};
383
390
384
391
_build (
@@ -401,8 +408,9 @@ class HtmlGeneratorInstance {
401
408
_layoutTitle (property.name, 'constant' , property.isDeprecated),
402
409
'metaDescription' :
403
410
'API docs for the ${property .name } constant from the ${clazz .name } class, for the Dart programming language.' ,
404
- 'navLinks' : [package, lib, clazz, property],
405
- 'htmlBase' : '../..'
411
+ 'navLinks' : [package, lib, clazz],
412
+ 'htmlBase' : '../..' ,
413
+ 'self' : property
406
414
};
407
415
408
416
_build (path.joinAll (property.href.split ('/' )), _templates.constantTemplate,
@@ -425,8 +433,9 @@ class HtmlGeneratorInstance {
425
433
_layoutTitle (property.name, 'property' , property.isDeprecated),
426
434
'metaDescription' :
427
435
'API docs for the ${property .name } property from the ${clazz .name } class, for the Dart programming language.' ,
428
- 'navLinks' : [package, lib, clazz, property],
429
- 'htmlBase' : '../..'
436
+ 'navLinks' : [package, lib, clazz],
437
+ 'htmlBase' : '../..' ,
438
+ 'self' : property
430
439
};
431
440
432
441
_build (path.joinAll (property.href.split ('/' )), _templates.propertyTemplate,
@@ -447,8 +456,9 @@ class HtmlGeneratorInstance {
447
456
_layoutTitle (property.name, 'property' , property.isDeprecated),
448
457
'metaDescription' :
449
458
'API docs for the ${property .name } property from the ${lib .name } library, for the Dart programming language.' ,
450
- 'navLinks' : [package, lib, property],
451
- 'htmlBase' : '..'
459
+ 'navLinks' : [package, lib],
460
+ 'htmlBase' : '..' ,
461
+ 'self' : property
452
462
};
453
463
454
464
_build (path.joinAll (property.href.split ('/' )),
@@ -469,8 +479,9 @@ class HtmlGeneratorInstance {
469
479
_layoutTitle (property.name, 'constant' , property.isDeprecated),
470
480
'metaDescription' :
471
481
'API docs for the ${property .name } property from the ${lib .name } library, for the Dart programming language.' ,
472
- 'navLinks' : [package, lib, property],
473
- 'htmlBase' : '..'
482
+ 'navLinks' : [package, lib],
483
+ 'htmlBase' : '..' ,
484
+ 'self' : property
474
485
};
475
486
476
487
_build (path.joinAll (property.href.split ('/' )),
@@ -490,8 +501,9 @@ class HtmlGeneratorInstance {
490
501
_layoutTitle (typeDef.name, 'typedef' , typeDef.isDeprecated),
491
502
'metaDescription' :
492
503
'API docs for the ${typeDef .name } property from the ${lib .name } library, for the Dart programming language.' ,
493
- 'navLinks' : [package, lib, typeDef],
494
- 'htmlBase' : '..'
504
+ 'navLinks' : [package, lib],
505
+ 'htmlBase' : '..' ,
506
+ 'self' : typeDef
495
507
};
496
508
497
509
_build (path.joinAll (typeDef.href.split ('/' )), _templates.typeDefTemplate,
0 commit comments