-
Describe the bug 描述你遇到的错误在每个页面或者文章设置字段 url 为 xxx.html 时,同时配置文件 outputs 也开启了页面 md 输出 实际上 Expected behavior 期待的行为正常通过 xxx.html 访问文章或页面 Screenshots 屏幕截图No response Build Environment 构建环境109 Preview Environment 预览环境Debian testing Additional Information 补充信息page = ["HTML", "MarkDown"] url = "about.html" |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
默认情况下,Hugo会生成 pretty URLs。要生成 ugly URLs,请更改网站配置: |
Beta Was this translation helpful? Give feedback.
-
之前我也开启了uglyURLs = true,后面因为需要其他页面都是/形式 只是文章需要.html所以,我就取中方法文章内设置url,但是发现与md冲突了,md会覆盖掉.html的请求 |
Beta Was this translation helpful? Give feedback.
-
提供一种方案
|
Beta Was this translation helpful? Give feedback.
提供一种方案
开启 uglyURLs = true
outputFormats 新增一个类型 HTMLPretty
outputs修改 部分输出类型为 HTMLPretty
由于 posts 和 其他页面都是 page,所以 page 单独设置 url,例如:
url: /about/