halo icon indicating copy to clipboard operation
halo copied to clipboard

文章别名自动生成建议

Open DAMYSDS opened this issue 4 years ago • 5 comments

Your current Halo version

1.5.0

Describe this feature

文章别名即为文章链接后缀,建议自动生成引入发布时间,以发布时间为链接后缀,避免了中文

Additional information

QQ图片20220329213618 QQ图片20220329213655 QQ图片20220329213732

DAMYSDS avatar Mar 29 '22 13:03 DAMYSDS

早期确实是时间戳,但大部分使用者反馈时间戳看不懂,才改成这样的方式。这其实也是大部分 slug 生成主流的方式。所以,既然有这样的分歧,在后续 2.0 我们会考虑多种生成规则以供选择,但目前 1.x 不打算做此修改。

/kind feature

ruibaby avatar Mar 29 '22 13:03 ruibaby

多种生成规则可以,期待2.0 ing

DAMYSDS avatar Mar 29 '22 13:03 DAMYSDS

@DAMYSDS 倾向不关闭这个 issue,我们尝试把这个 issue 加到 2.0 的里程碑里面。

/reopen

JohnNiang avatar Mar 29 '22 14:03 JohnNiang

@JohnNiang: Reopened this issue.

In response to this:

@DAMYSDS 倾向不关闭这个 issue,我们尝试把这个 issue 加到 2.0 的里程碑里面。

/reopen

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

f2c-ci-robot[bot] avatar Mar 29 '22 14:03 f2c-ci-robot[bot]

可以将文章的CRC32或者UUID等 生成唯一标识,取前8位或者更多,然后将其作为文章的Permalink

Hexo中有个插件hexo-abbrlinkhexo-abbrlink2,就是这种

ListenV avatar Jun 22 '22 09:06 ListenV

可以在文章设置下面提供一个配置来给用户进行选择使用哪种模式,然后在生成文章链接的地方拿到这个配置,对这个配置进行判断用来生成对应链接。 image

  1. Short UUID
  2. 16 位 UUID
  3. 时间戳
  4. 文章标题生成

GodlessLiu avatar Sep 04 '23 09:09 GodlessLiu