Skip to content

Bookmark anchors not included in xrefmap href property with statictoc template #1256

Description

@tobiasbunyan

Functional impact

Generated links only reference the page, not the bookmark.

Minimal repro steps

  1. Create a class with two methods, document the methods.
  2. Create a conceptual document and reference the methods (i.e. with @ or <xref:>
  3. Generate documentation with statictoc template

Expected result

Method links in document include the bookmark to the method.

Actual result

Method links are missing the bookmark element.

Further technical details

This is confirmed if you look at the generated xrefmap.yml. All the href properties are missing the bookmark anchor points. Adding the following code from the default template ManagedReference.html.primary.js file to the bottom of the same file in the statictoc template seems to work. I don't know however if this is the correct solution to the problem.

exports.getOptions = function (model) {
  return { "bookmarks": mrefCommon.getBookmarks(model) };
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions