【发布时间】:2021-08-31 01:09:58
【问题描述】:
我有一个 Hugo 网站,其中有一个部分 products。产品的 URL 配置为/p/:filename。实际产品文件位于content/products 的子文件夹中。
某些产品具有相同的文件名,但它们位于不同的子文件夹中。我想要这样的网址:
-
content/products/shirts/very-beautiful-shirt.md=>/p/shirts/very-beautiful-shirt -
content/products/shirts/simple.md=>/p/shirts/simple -
content/products/hats/simple.md=>/p/hats/simple
有没有办法让子文件夹显示在 URL(永久链接)中?当然,我知道我可以在每个文档中指定 URL,但我宁愿有一个更好的解决方案...
【问题讨论】:
标签: hugo