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

[Bug] <see> XML tag ends up as HTML that points to page instead of element on page with corresponding id #10322

Open
cjsha opened this issue Oct 25, 2024 · 1 comment
Labels
bug A bug to fix template The stock site template

Comments

@cjsha
Copy link

cjsha commented Oct 25, 2024

Bug Description & Expected Behavior:
<see cref="ContextTask.AcquisitionClockHz"/> in XML comment resolves to:
<xref href="OpenEphys.Onix1.ContextTask.AcquisitionClockHz" data-throw-if-not-resolved="false"></xref> in yaml which resolves to:
<a class="xref" href="OpenEphys.Onix1.ContextTask.html">Acquisition<wbr>Clock<wbr>Hz</a> in html instead of:
<a class="xref" href="OpenEphys.Onix1.ContextTask.html#OpenEphys_Onix1_ContextTask_AcquisitionClockHz">Acquisition<wbr>Clock<wbr>Hz</a>.

The effect of this is that users are linked to the page instead of the id on page that I want to direct user to.
For example, clicking on this hyperlink AcquisitionClockHz on this page should be AcquisitionClockHz instead (compare the underlying URLs - one is appended with a /#mangled_uid). Note that an html element with that particular id "OpenEphys_Onix1_CreateContext_AcquisitionClockHz" doesn't currently exist on the deployed website, but it still doesn't work when I add id={{id}} data_uid={{uid}} to an html element which I have done on a local branch.

What are the conditions that create the correct href value where the URL is appended with a #mangled_uid? This is all done using a custom template, but I'm not sure how that might mess it up.

The repo where I am having this issue is here:
https://github.com/open-ephys/bonsai-onix1-docs

Context (please complete the following information):

  • Browser: Firefox
  • Form factor: desktop
  • Docfx version: 2.77.0
  • Template: custom

Thank you so much for your help.

@cjsha cjsha added bug A bug to fix template The stock site template labels Oct 25, 2024
@cjsha
Copy link
Author

cjsha commented Oct 28, 2024

In other words, in the xrefmap.yml file, how do I get

- uid: OpenEphys.Onix1.ContextTask.AcquisitionClockHz
  name: AcquisitionClockHz
  href: api/OpenEphys.Onix1.ContextTask.html # undesired href value
  commentId: P:OpenEphys.Onix1.ContextTask.AcquisitionClockHz
  fullName: OpenEphys.Onix1.ContextTask.AcquisitionClockHz
  nameWithType: ContextTask.AcquisitionClockHz

to resolve as:

- uid: OpenEphys.Onix1.ContextTask.AcquisitionClockHz
  name: AcquisitionClockHz
  href: api/OpenEphys.Onix1.ContextTask.html#OpenEphys_Onix1_ContextTask_AcquisitionClockHz # desired href value
  commentId: P:OpenEphys.Onix1.ContextTask.AcquisitionClockHz
  fullName: OpenEphys.Onix1.ContextTask.AcquisitionClockHz
  nameWithType: ContextTask.AcquisitionClockHz

instead?

Here is an example where something similar is being achieved:

- uid: Bonsai.Dsp.Decimate.Factor
  name: Factor
  href: api/Bonsai.Dsp.Decimate.html#Bonsai_Dsp_Decimate_Factor
  commentId: P:Bonsai.Dsp.Decimate.Factor
  fullName: Bonsai.Dsp.Decimate.Factor
  nameWithType: Decimate.Factor

on the Bonsai docs site that are also generated with docfx.

@cjsha cjsha changed the title [Bug] <see> XML tag ends up points to page instead of element on page with corresponding id [Bug] <see> XML tag ends up as HTML that points to page instead of element on page with corresponding id Oct 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug to fix template The stock site template
Projects
None yet
Development

No branches or pull requests

1 participant