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: allow customers to define the slug in the metadata #375

Merged
merged 2 commits into from
Oct 5, 2021

Conversation

mjcuva
Copy link
Member

@mjcuva mjcuva commented Oct 5, 2021

🧰 Changes

Coinbase was running into an issue where pages were getting new slugs instead of updating the existing ones. They added a slug field in their metadata in the markdown files, which it seems like we didn't officially support. Since we were using the file name to generate the slug when seeing if a doc existed or not, but still created the page with the slug they defined it was ending up in a weird state where pages were being created on every sync.

🧬 QA & Testing

If you want to test locally you can run the following:

./rdme/bin/rdme docs ~/path/to/markdown --key KEY --version 1.0

This will update the page here: https://dash.readme.com/project/PROJECT/v1.0/docs/new-page

---
title: "New Page"
slug: "new-page"
category: "CATEGORY ID"
---
# This is a page with a slug defined

Look at that slug. 🐌 (not a slug, but the best I can do)

@mjcuva mjcuva requested review from erunion and rafegoldberg October 5, 2021 00:35
@erunion erunion added the enhancement New feature or request label Oct 5, 2021
@erunion erunion merged commit 137411d into main Oct 5, 2021
@erunion erunion deleted the feat/define-slugs-in-metadata branch October 5, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants