Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

tobiasbunyan opened this issue Jan 30, 2017 · 1 comment


Copy link

tobiasbunyan commented Jan 30, 2017

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) };
Copy link

@tobiasbunyan Thank you for your report. You found exactly the root cause. The statictoc template is out of sync with the default template. This will be fixed in Docfx 2.12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

2 participants