Closed pandahereboy closed 5 years ago
Try ugly URLs https://gohugo.io/content-management/urls/#ugly-urls
Try ugly URLs https://gohugo.io/content-management/urls/#ugly-urls
谢谢,这个参数我试过了。仅可以解决 /post
下生成的文章链接问题,甚至我们可以在 hugo new post/xxx.md
里直接指定: url: xxx/xxx/xxx.html
然后再生成静态页面。但仍然是只解决post列表的文章链接问题,对于 归档
, 分类
,标签
等需要聚合的操作还是没办法解决。
因为对于像AWS S3 , Aliyun OSS这种对象存储静态网页化,都是要求绝对路径的访问(对于public bucket),当然,还有折中的方法。例如在请求到达OSS 或 S3触发一个函数计算或lambda function做重定向。但这样子好麻烦,有更简单的方法就更好了。
或者单页应用的theme...
I've did some tests, setting uglyurls = true
does move /tags/
to /tags.html
and /tags/footnote/
to /tags/footnote.html
.
One thing to notice is that the URLs on the menu is hardcoded in config.toml [[menu]]
so if you want to change the URLs in menu, you'll also need to change it.
it worked, thanks.
你好,我使用
jane
做为theme并布署到阿里云上时,遇到一个问题与 hexo 的问题类似(可参见如下链接:https://yq.aliyun.com/articles/653541)因为OSS / AWS S3 要求是全路径的,而
jane
我找不到有哪个配置是可以实现类似/post/test/index.html
而不是/post/test/
.你可以告诉我怎么做吗?