-
Notifications
You must be signed in to change notification settings - Fork 30
Description
Summary
Many documentation files include a mapped_pages
frontmatter key—For example: https://github.com/search?q=repo%3Aelastic%2Fdocs-content%20mapped_pages&type=code. This key lists legacy documentation URLs that served as source material when creating the current content.
Goal
Help users easily access the older versions of a given doc.
Implementation
- If a
mapped_pages
key exists, display a "Previous versions" link in the right-hand column. - The link should point to the first URL in the
mapped_pages
array. (we can likely make this experience better in a follow-up PR)
Considerations
Mapped URLs use current
:
Mapped pages use /current/
in the URL, which will eventually redirect to the new V3 docs. We therefore cannot use the mapped pages URLs as-is. Before generating the previous version link, we need to update these links accordingly:
For the following links, current
should be updated to the version listed:
[edit: removed] see @colleenmcginnis's comment below instead
For the following links, no previous version documentation exists, so we should not add a "Previous versions" link to these pages:
[edit: removed] see @colleenmcginnis's comment below instead
All remaining mapped pages are stack-versioned. We should replace current
with 8.17
for these links.