Closed thien-do closed 2 years ago
Some blogs have date in their article titles:
At the moment there is no special treatment for them. However we'd like to separate them visually from the rest of the title, like this:
Not all blog uses the same format, or have date, so we just try to support yyyy mm dd, and do nothing if none match:
yyyy-mm-dd title yyyy/mm/dd title yyyy.mm.dd title
So I guess the regex is:
^\d{4}[-/.]\d{2}[-/.]\d{2}
The change should happen around here:
https://github.com/thien-do/memos-pub/blob/2601f453bac69d2440a68dfa16b260626fccfc7b/lib/blog/dir/entry.tsx#L17-L21
I would like to take this, please.
Thanks @lqt93 👍
Done
Some blogs have date in their article titles:
At the moment there is no special treatment for them. However we'd like to separate them visually from the rest of the title, like this:
Not all blog uses the same format, or have date, so we just try to support yyyy mm dd, and do nothing if none match:
So I guess the regex is:
The change should happen around here:
https://github.com/thien-do/memos-pub/blob/2601f453bac69d2440a68dfa16b260626fccfc7b/lib/blog/dir/entry.tsx#L17-L21