You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If i write two posts named 2023-11-27-test.md and 2023-11-28-test.md, there addresses are all '/test' and it will point to the newer one, 2023-11-28-test.md.
But in the Jekyll, they will be different. One is '/2023/11/27/test' and the other is '2023/11/28/test'. I don't know how to fix this bug.
The text was updated successfully, but these errors were encountered:
The issue you're encountering is due to how Jekyll generates URLs for posts based on their file names. By default, Jekyll uses the file's date and slug to generate the URL.
To fix this issue and ensure that both posts have the same base URL (/test), you can manually set the permalink for each post in its front matter. Here's how you can do it:
For 2023-11-27-test.md:
---date: 2023-11-27 11:58:47 +07:00title: Test 1permalink: /test/---
Post content goes here.
For 2023-11-28-test.md:
---date: 2023-11-28 11:58:47 +07:00title: Test 2permalink: /test/---
Post content goes here.
Note: Date is required on format YYYY-MM-DD HH:MM:SS +/-TTTT
With this setup, both posts will have the same URL: /test/.
Keep in mind that setting a permalink in the front matter overrides the default URL generation based on the file name and date. So, make sure to choose a permalink that fits your requirements.
If i write two posts named 2023-11-27-test.md and 2023-11-28-test.md, there addresses are all '/test' and it will point to the newer one, 2023-11-28-test.md.
But in the Jekyll, they will be different. One is '/2023/11/27/test' and the other is '2023/11/28/test'. I don't know how to fix this bug.
The text was updated successfully, but these errors were encountered: