Open lidermanrony opened 8 years ago
+1
As a workaround, you can quite easily achieve this by overwriting the docfx.js
file in a custom theme. See How-to: Create A Custom Template.
In the custom theme remove the .attr("target", "_blank")
on this line.
The drawback is that you'll need to keep the docfx.js
file in your theme up to date with the one from the default theme.
Yeah that's what I ended up doing. Another issue with that is that the back button doesn't return you to search results after you clicked on a link
On Fri, Dec 2, 2016, 02:18 Pascal Berger notifications@github.com wrote:
As a workaround, you can quite easily achieve this by overwriting the docfx.js file in a custom theme. See How-to: Create A Custom Template http://dotnet.github.io/docfx/tutorial/howto_create_custom_template.html .
In the custom theme remove the .attr("target", "_blank") on this line https://github.com/dotnet/docfx/blob/0213400ab3cfc4193548ed4c1bea3b760b7e1395/src/docfx.website.themes/default/styles/docfx.js#L243 .
The drawback is that you'll need to keep the docfx.js file in your theme up to date with the one from the default theme.
— You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/dotnet/docfx/issues/227#issuecomment-264420848, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMLVTXudY_Bvl1RzUO8j8-7PhCqvhiRks5rD_BggaJpZM4H0-YH .
Can this be looked at please? This feature doesn't make a lot of sense to me .... its so easy in browsers these days to manually control whether to open in a new tab/window, but with the link target hard-coded you have no choice.
For me, as I embed a DocFX site in another site via an IFrame, clicking search links means the user leaves the context of the parent site and it is not intuitive for them often how to get back.
The ability to control the link target via a meta-data property would be best. As others have said, making a whole new template just for this is not ideal.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This is still an issue. Please can this be looked at.
@lanthonyneville bot will not close this issue any more as it is marked as feature-request
.
Back to this issue, #956 provides an implementation but back button cannot work. I think it need to change the search experience with concrete result URL to support this.
Back to this issue, https://github.com/dotnet/docfx/pull/956 provides an implementation but back button cannot work. I think it need to change the search experience with concrete result URL to support this.
Modern browser supports bfcache
(Back-forward cache) by default.
It seems to works as expected by removing target="_blank"
attribute.
When Back
event occurred. search-results view states are automatically restored.
Currently search results are being opened on a new tab.
For a lot of sites it makes more sense to open the search result on the same tab (just like your typical search engine).
Using the back browser button should return the user back to search results page