-
-
Notifications
You must be signed in to change notification settings - Fork 46
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
Labels
Comments
I very much agree, this should be respected |
I have tested this and found that if the slug is sent as the parameter |
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 |
Some such things might be tricky as this endpoint has no data itself about the content of a site but rather relies on GitHub lookups whenever it wants something – so checking data across many files at once can be complex and slow.
That said – I’m confident the slug handling can be improved. I can’t say when though as I have had very little time for open source work outside my day job, especially since last summer. So it depends on whether I find some time during a weekend like I did this last weekend.
… 22 jan. 2018 kl. 19:11 skrev Keith Grant ***@***.***>:
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.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 matterslug
property, and in the generated file path.So, if I set the slug as
my-great-slug
, and with the following configMICROPUB_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'
The text was updated successfully, but these errors were encountered: