Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs:prune): prune child docs #713

Merged
merged 1 commit into from
Dec 16, 2022
Merged

fix(docs:prune): prune child docs #713

merged 1 commit into from
Dec 16, 2022

Conversation

kanadgupta
Copy link
Member

🚥 Fixes #710

🧰 Changes

Turns out our response payloads from GET /categories/{slug}/docs looks like this for pages that contain subpages:

[
  ...
  {
    "title": "Navigating Your Hub",
    "slug": "navigating-your-hub",
    "order": 4,
    "hidden": false,
    "children": [
      {
        "title": "Search + Search API",
        "slug": "search",
        "order": 0,
        "hidden": false
      },
      {
        "title": "Quick Nav in the API Reference",
        "slug": "quick-nav-api-reference",
        "order": 1,
        "hidden": false
      }
    ]
  }
]

This PR fixes our docs:prune command to account for child pages.

🧬 QA & Testing

Do tests pass?

@kanadgupta kanadgupta added bug Something isn't working command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands labels Dec 16, 2022
@kanadgupta kanadgupta marked this pull request as ready for review December 16, 2022 18:17
Copy link
Member

@erunion erunion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

api v2 can't come soon enough

@kanadgupta
Copy link
Member Author

@erunion 💯

@kanadgupta kanadgupta merged commit 2b81439 into main Dec 16, 2022
@kanadgupta kanadgupta deleted the fix/child-docs branch December 16, 2022 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prune command doesn't remove child pages (and their parent pages)
2 participants