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

Specify category slug and order on creation #785

Open
garrett-wade opened this issue Mar 28, 2023 · 3 comments
Open

Specify category slug and order on creation #785

garrett-wade opened this issue Mar 28, 2023 · 3 comments
Labels
API Underlying issue is with the ReadMe API and not necessarily the `rdme` client itself command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands enhancement New feature or request

Comments

@garrett-wade
Copy link
Contributor

In our CI/CD pipeline, we are syncing documents from Project 1 to Project 2. However, we have encountered an issue with category names and slugs not matching between the two projects.

Currently, when creating a category in Project 1, the category name and slug generally match, unless there is a duplicate where it appends -1. This works fine until we have to change the category name in Project 1, which does not update the slug. As a result, when we create the same category in Project 2, the names will match but the slugs will not, causing issues when uploading documents as each document can only have one categorySlug.

To alleviate this, we propose specifying the category slug when creating a category to ensure the match between projects, even if the category name differs. This will prevent the issue of duplicated slugs and allow us to sync documents seamlessly between projects.

Furthermore, we want to preserve the category order between projects, which can only be done through the admin UI. We propose adding functionality to our CI/CD pipeline to allow us to specify the category order programmatically.

We believe these changes will improve our workflow and streamline our document syncing process between projects.

@kanadgupta kanadgupta added enhancement New feature or request API Underlying issue is with the ReadMe API and not necessarily the `rdme` client itself labels Mar 28, 2023
@kanadgupta
Copy link
Member

kanadgupta commented Mar 28, 2023

Hi @garrett-wade! This would be a breaking change to our API and we're currently in the process of totally revamping our API and docs syncing patterns. The goal would be to move away from the confusing ID vs. slug paradigm entirely. Don't have an ETA on these changes but will definitely keep this feedback in mind!

@kanadgupta kanadgupta added the command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands label Mar 28, 2023
@mnahkies
Copy link

Just ran into a similar issue, don't suppose you have an ETA now?

My use-case:

  • We upload our documentation through a CI job
  • We want to "stage" larger changes on a hidden version, to review what they look like rendered prior to pushing them live
  • The category id in the front matter is annoying, as the id's are unique to each version, meaning I'll need to write a script to query the README API and dynamically adjust the front matter, which feels awkward
    • If I could use a category-slug in place of the id that would solve my use-case

@ashleysamay
Copy link

Hey @mnahkies! We're working on this now and aiming to have a beta in the next few months. If you're interested in being part of the alpha/beta drop us a line at alpha@readme.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Underlying issue is with the ReadMe API and not necessarily the `rdme` client itself command:docs Issues pertaining to the `docs`, `changelogs`, or `custompages` commands enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants