RevealTheme logo

URL别名(slug)生成工具

将文本转换为适合URL的别名。转为小写、移除特殊字符,并用连字符分隔单词。

如何使用本工具

  1. 1

    Type or paste your page title or heading into the input box.

  2. 2

    Watch the slug update instantly below the field as you type — there is no Generate button.

  3. 3

    Click Copy to put the generated slug on your clipboard, ready to paste into your CMS or route.

  4. 4

    Edit the title if the slug was cut off at 80 characters or ends in a stray hyphen, then copy again.

什么是URL别名(slug)生成工具?

URL别名(slug)是页面标题适合用于URL的版本:通常为小写,空格替换为连字符,并移除特殊字符。别名能改善SEO(URL中的关键词)、无障碍性(可读的URL)和分享便利性。WordPress会根据文章标题自动生成别名;本工具复刻了这一逻辑,并增加了自定义分隔符等额外功能。

常见使用场景

  • Generate a clean post slug from a blog headline before publishing in your CMS.

  • Create stable URL paths for product or category pages in an e-commerce store.

  • Turn documentation section titles into anchor-friendly identifiers for deep links.

  • Produce predictable route segments when scaffolding pages in a static site generator.

  • Normalize accented names like 'Renée Dubois' into ASCII slugs such as 'renee-dubois'.

  • Quickly check whether a long title will be truncated by an 80-character URL limit.

常见问题

用连字符还是下划线?
连字符。Google将连字符视为单词分隔符;而将下划线视为单个单词的一部分。
我应该包含停用词吗?
通常不:移除“一个”“这个”“的”之类的词,可以得到更短、更简洁的URL。如果它们对表达清晰是必需的,则予以保留。

相关工具