【问题标题】:How to change the slug in Ghost to include only year and month?如何将 Ghost 中的 slug 更改为仅包含年和月?
【发布时间】:2014-09-02 02:21:57
【问题描述】:

在最新版本中,您允许我们在 post slug 中添加日期。是否可以只添加年份和月份?即使通过编辑代码?因为我正在尝试从 Wordpress 迁移,所以我需要它。在 WP 中,我使用这种格式。

注意:我使用的是 Ghost 0.5

【问题讨论】:

标签: ghost-blog


【解决方案1】:

目前只能在数据库中执行此操作。您可以将设置表中键 permalinks 的值更改为读取 /:year/:month/:slug 或在数据库上运行以下查询:

UPDATE settings SET value = '/:year/:month/:slug` WHERE key = 'permalinks'

如果您使用的是默认数据库 (SQLite3),您可以使用 SQLite Browser 之类的工具

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-06-17
    • 2021-12-11
    • 1970-01-01
    • 2015-02-23
    • 2020-04-24
    • 2021-08-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多