devdocs
devdocs copied to clipboard
Research creating canonical link for docs in Module Reference Guide
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.
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
- Join Magento Community Engineering Slack and ask your questions in #github channel.
@dshevtsov can you take a look?
This makes maintaining docs that link to your docs easier.
@kai687, do you mean README's from the magento2 codebase?
In general, the 'latest' links has been a desirable feature for a long time. @belbiy, could you comment on this please?
@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.
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.
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:
- Global redirect:
/guides/v2.4 -> /guides/latest. This is no good for Google indexes as I understand. - Virtual source files for
/guides/latestthat will replicate/guides/v2.4source 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
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.