jaredly / jaredly/hexo-admin

Posts written on the same day with same title overwrites each other

Open
#85 1 comment 1 reaction 0 assignees View on GitHub
enhancement open-for-contribution
Dominant language
JavaScript
Stars
1.8k
Forks
299
PR merge metrics
No merged PRs in 30d

Description

If I write two posts on the same day with the same title, the post written later will overwrite the former one (due to name conflict), both in the draft and in the published pages.
suggestion: add a number to the url of the latter post to avoid confilct. For example, if the posts with the following titles are published sequentially on the same day(2016-10-03), creating urls in this manner might be a proper solution:
1. "test" **/2016/10/03/test**
2. "test" **/2016/10/03/test-2**
3. "test" **/2016/10/03/test-3**
4. "test 2" **/2016/10/03/test-2-2**
5. "test 4" **/2016/10/03/test-4**
6. "test" **/2016/10/03/test-5**
7. "test 2" **/2016/10/03/test-2-3**

The idea above comes from the dashboard of [ghost](https://ghost.org/).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing how post titles and dates become URLs for both drafts and published pages, then reproduce the same-day, same-title sequence described in the issue. Done means later posts no longer overwrite earlier ones and each generated URL remains unique in both contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend, content
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.