Docs-website: Migration script doesn't account for navigation sort order

Created on 5 Dec 2020  路  12Comments  路  Source: newrelic/docs-website

Description

Currently the migration script isn't automatically setting sort order for categories and pages.

Example: Categories

category_sort_order_issues

Example: Pages

doc_sort_order_issues

Expected behavior

Preserve the sort order from the current docs site as part of the migration script.

Additional Notes

  • Expose the sort weight in the API and leverage that as part of the script.
  • Scope: This is only for the migration script.
  • We need to account for release notes nav that uses release date and time to sort items in the nav

Related to

381

MMF 9 Scope

When migration script is run we want arrange things (both .mdx content files AND the sub-directories) in the nav menus in the order that is set in Drupal. In the Drupal migration API, this order will be exposed via the order field. We don't currently have any API resources for taxonomy terms, but we could create them if needed to get the order value.

This applies to migration only. Post migration, content contributors can set the order of the nav items by directly editing the .yml files.

Acceptance criteria

  • [ ] As a content contributor, .mdx files and directories/categories in the nav files mirror the current site
automation bug catch-all eng launch-blocker 3

Most helpful comment

I just added the order field to the migration API JSON for the following content types:

  • page
  • troubleshooting_doc
  • api_doc

All 12 comments

@jerelmiller FYI on this one, we noticed it today looking at some order on the agent docs pages.

Expose the sort weight in the API and leverage that as part of the script.

Scope: This is only for the migration script.

Also, need to account for release notes nav that uses release date and time to sort items

I just added the order field to the migration API JSON for the following content types:

  • page
  • troubleshooting_doc
  • api_doc

@roadlittledawn I'm not seeing that order field for any of those content types. Is there something I'm missing?

@jpvajda @jerelmiller @roadlittledawn : Just wanted to check on this one. I see the ticket is closed but it looks like sort order is not actually reflected in sidebar for pages. For example, compare this ordering to the order in the Drupal site.

Preview site

image

Drupal site

image

This is one of the items that will be released as soon as we get the build fixed and released!

Hey @jerelmiller @roadlittledawn , is this issue fixed? @roadlittledawn found an example where sort order is wrong:

image

image

Get Started should be above Core Concepts

@austin-schaefer this work addressed most but not all nav sorting. i'm finishing that up as part of #587 starting today. and i have these on the radar. who can i ask to give some 馃憖 on the nav order next week?

I'll be reviewing the nav sort order as part of this jira: https://newrelic.atlassian.net/browse/DOC-6541

Please let me know when I should start working on that @roadlittledawn

I've got a Jira to do some preliminary re-sorting on the Drupal side https://newrelic.atlassian.net/browse/DOC-6583 before spot-checking on the GitHub side

Was this page helpful?
0 / 5 - 0 ratings