devdocs icon indicating copy to clipboard operation
devdocs copied to clipboard

Research creating canonical link for docs in Module Reference Guide

Open kai687 opened this issue 4 years ago • 8 comments

General issue

Feedback on page: /guides/v2.4/mrg/module-catalog-permissions.html Consider adding a canonical, or 'latest' link for your docs. This makes maintaining docs that link to your docs easier.

Description:

I have to choose between linking to the 2.3, or 2.4 versions of this page. If you update this page to 2.5, my link should still work, but it's no longer up to date.

Possible solutions:

Have a canonical link, like: /guides/mrg/module-catalog-permissions.html that would always route to the latest available version of this document. OR: /guides/latest/mrg/module-catalog-permissions.html.

kai687 avatar Oct 05 '21 14:10 kai687

Hi @kai687. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.

Please, add a comment to assign the issue: @magento I am working on this


m2-assistant[bot] avatar Oct 05 '21 14:10 m2-assistant[bot]

@dshevtsov can you take a look?

erikmarr avatar Oct 07 '21 14:10 erikmarr

This makes maintaining docs that link to your docs easier.

@kai687, do you mean README's from the magento2 codebase?

dshevtsov avatar Oct 07 '21 14:10 dshevtsov

In general, the 'latest' links has been a desirable feature for a long time. @belbiy, could you comment on this please?

dshevtsov avatar Oct 07 '21 15:10 dshevtsov

@dshevtsov, no not READMEs. I mean pages like: /guides/v2.4/mrg/module-catalog-permissions.html. If I could link to /guides/mrg/module-catalog-permissions.html or /guides/latest/mrg/module-catalog-permissions.html instead, I don't have to worry about the links in our documentation, when Magento gets a new version.

kai687 avatar Oct 07 '21 15:10 kai687

Yes, ideally, the latest version of the content should be /guides/* and NOT /guides/v2.*/*. We achieved that on user guide website with a different build system.

Unfortunately, in devdocs, we dont have that, and all our versioned content is still stored in "folders". We do use canonical meta tag so Google indexes only the latest version, but URL still has that v2.* in it.

It's a pretty big project, to refactor the build system and frontend code to drop the latest version from the URL... But it can be done.

belbiy avatar Oct 07 '21 15:10 belbiy

On devdocs, we should keep v2.x versioning, to allow versioned links from the in-code documentation for Commerce's source code. It means, we should have both 2.4 and 'latest' links. I can see only two solutions at the moment:

  1. Global redirect: /guides/v2.4 -> /guides/latest. This is no good for Google indexes as I understand.
  2. Virtual source files for /guides/latest that will replicate /guides/v2.4 source file tree. Two options here: symlinks or pages without files (generated by a custom plugin for Jekyll). This will increase the number of real pages and their generation time on about ~1/3.

cc @jeff-matthews

dshevtsov avatar Oct 07 '21 15:10 dshevtsov

A new version is unlikely, so I don't think there's anything to worry about. Also, we'll be moving content over to developer.adobe.com and Experience League next year, so we need to be careful about investments we make in the backend build system and frontend code.

jeff-matthews avatar Oct 07 '21 21:10 jeff-matthews