雨果网站部署到HTML的公共/目录,给出了奇怪的结果
我有一个带有许多文件夹和子文件夹的雨果站点,其中包含_index.md
文件等。它使用Docsy主题。
运行Hugo Server
在Local -Host的浏览器中正确显示该站点:1313
当我运行Hugo
或Hugo -D
以获取与HTML相同的页面磁盘上的文件,我收到
- 一组文件夹...
- ...仅包含
index.html
和index.xml
文件, - 但没有其他文件。所有其他文件都缺少。
- 链接看起来像RAW .MD文件(示例:
[VPAT](https://docs.axway.com/bundle/accessibilityvpatsvpats_allos_en_html5/page/content/content/accessesibil.htmibility.htm)
- 不风格,与
Hugo Server生成的页面不同,
- 我看不到如何使用
index.xml
文件
。通过Hugo
命令:
public/
index.html
index.xml
docs/
index.html
index.xml
admin_intro/
index.html
index.xml
troubleshooting/
index.html
index.xml
...
这是.md文件结构的样子
content/
en/
_index.html
search.md
docs/
_index.md
admin_intro/
_index.md
amdin_page_1.md
amdin_page_2.md
amdin_page_3.md
troubleshooting/
_index.md
ts_page_1.md
ts_page_2.md
ts_page_3.md
...
I have a Hugo site with lots of folders and subfolders, containing both _index.md
files and many others. It uses the docsy theme.
Running hugo server
displays the site correctly in the browser at localhost:1313
When I run hugo
or hugo -D
to get the same pages as HTML files on the disk, and I get
- a set of folders...
- ... containing only
index.html
andindex.xml
files, - but no other files. All the other files are missing.
- links look like the raw .md file (example:
[VPAT](https://docs.axway.com/bundle/AccessibilityVPATS_allOS_en_HTML5/page/Content/accessibility.htm)
- The index.html files are unstyled, unlike the pages generated by the
hugo server
command. - I don't see how to use the
index.xml
files.
Here is an example of the files and folders produced by the hugo
command:
public/
index.html
index.xml
docs/
index.html
index.xml
admin_intro/
index.html
index.xml
troubleshooting/
index.html
index.xml
...
Here is what the .md file structure looks like
content/
en/
_index.html
search.md
docs/
_index.md
admin_intro/
_index.md
amdin_page_1.md
amdin_page_2.md
amdin_page_3.md
troubleshooting/
_index.md
ts_page_1.md
ts_page_2.md
ts_page_3.md
...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看来您的
PostCSS
进程无法正确运行。升级hugo
和docsy
Postcss
过程中未使用dev
mod(Hugo)服务器),但它在Production
(Hugo)中,因此不幸的是,您将获得不同的结果。尝试使用
本地运行
标志,查看是否显示出任何错误。hugo
- debugIt looks like maybe your
postcss
process isn't running correctly. I had this problem after upgradingHugo
andDocsy
The
postcss
process isn't used in thedev
mod (hugo server) but it is inproduction
(hugo) so you will unfortunately get different results.Try running
hugo
locally with the--debug
flag and see if any errors show up.