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

Slug value is ignored #22

Open
paulrobertlloyd opened this issue Jul 15, 2017 · 4 comments
Open

Slug value is ignored #22

paulrobertlloyd opened this issue Jul 15, 2017 · 4 comments
Labels

Comments

@paulrobertlloyd
Copy link
Contributor

Setting a value for slug in a Micropub client (tested with https://quill.p3k.io and https://micropublish.net), the value gets ignored, and instead a number is assigned, appearing both in a front matter slug property, and in the generated file path.

So, if I set the slug as my-great-slug, and with the following config MICROPUB_FILENAME_STYLE="src/_posts/notes/:year-:month-:day-:slug":

Expected result:

File path: src/_posts/notes/2017-07-15-my-great-slug.md
YAML frontmatter property: slug: 'my-great-slug'

Actual result

File path: src/_posts/notes/2017-07-15-74902.md
YAML frontmatter property: slug: '74902'

@voxpelli voxpelli added the bug label Jul 24, 2017
@voxpelli
Copy link
Owner

I very much agree, this should be respected

@keithjgrant
Copy link
Contributor

I have tested this and found that if the slug is sent as the parameter slug it works. This should be using the mp-slug parameter instead.

@keithjgrant
Copy link
Contributor

Posting with a duplicate slug results in a 400. It might be nice if it automatically made it unique by appending a number to the end. So the second time a slug foo is posted, it converts to foo-1, then foo-2, etc.

@voxpelli
Copy link
Owner

voxpelli commented Jan 22, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants