大家好,我是 ghost 新手,想更改团队页面的页面链接,例如:
www.myblog.com/team-name
像是 :
www.myblog.com/team/team-name
这是我的 routes.yaml 页面
路线:/团队/:团队/:家
集合:/blog/:永久链接:/blog/{slug}/ 模板:-索引
分类法:标签:/topic/{slug}/ 作者:/author/{slug}/
并尝试了许多解决方案,但对我没有任何帮助,并在此先感谢
大家好,我是 ghost 新手,想更改团队页面的页面链接,例如:
www.myblog.com/team-name
像是 :
www.myblog.com/team/team-name
这是我的 routes.yaml 页面
路线:/团队/:团队/:家
集合:/blog/:永久链接:/blog/{slug}/ 模板:-索引
分类法:标签:/topic/{slug}/ 作者:/author/{slug}/
并尝试了许多解决方案,但对我没有任何帮助,并在此先感谢
您是否将团队成员创建为帖子?如果是这样的话,应该这样做:
collections:
/:
permalink: /{slug}/
template: index
filter: 'tag:-hash-team'
/team/:
permalink: /team/{slug}/
template: team
filter: 'tag:hash-team'
这将创建一个新的帖子集合,出现在“/team/”中。任何带有私人标签“#team”标签的帖子都将被放入此收藏并显示为链接“/team/team-name/”。不需要路由下的初始团队配置:)。希望这可以帮助!