gpt4 book ai didi

html - 使用Hugo渲染html文件

转载 作者:IT王子 更新时间:2023-10-29 02:05:54 26 4
gpt4 key购买 nike

我正在使用 Hugo http://hugo.spf13.com/overview/introduction在我的笔记本电脑中将包含 html/css/js 文件的文件夹呈现为本地主机。

我在 /content 中有 html 文件,在 /static 文件夹中有所有 js/css/img 文件

这是config.toml中的内容

baseurl = "http://localhost"
contentdir = "content"
languageCode = "en-us"
title = "my new hugo site"

我做了 hugo server 并且它渲染了 /public 文件夹就好了。但是所有 .html 文件现在都变成了 .xml 文件,我无法在浏览器中打开它们,例如 http://localhost:1313/index.html 左右。

我做错了什么?

最佳答案

你设置主题了吗?如果没有主题,Hugo 会将文件呈现为 XML,如果您阅读有关主题的文档,那应该可以满足您的需求。

关于html - 使用Hugo渲染html文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25577157/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com