-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Parse permalinks placeholders from markdown files name #31
Comments
Nice we just need to extract the date from filename and use it as the default value of |
Proposal: A new saber config property: When users define Similar to Hexo: https://github.com/hexojs/hexo/blob/087b3fa456aa97279df61a7f05e59c932051ee2b/lib/plugins/processor/post.js#L49-L54 |
Another way is making a common page filename format with a built-in regex, inspired by zola.
In this way, no extra |
we have the |
Yeah, I know that option. What I want to say is that we need a way to detech whether the filename contains datetime or not, thus I provide two methods to do so. One is customizable and the other is strict. I prefer the latter, and will try to implement it. |
closes #31 * feat: support extracting datetime from post filename * parse fileName once
Just like what Hexo does.
saber-config.yml
./pages/_posts/2019-03-24-hello-saber.md
Expect:
./pages/_posts/2019-03-24-hello-saber.md
becomes/posts/2019/03/24/hello-saber.html
Actual:
./pages/_posts/2019-03-24-hello-saber.md
becomes/posts/2019/03/24/2019-03-24-hello-saber.html
The text was updated successfully, but these errors were encountered: