雨果网站部署到HTML的公共/目录,给出了奇怪的结果

发布于 2025-02-02 23:23:41 字数 1256 浏览 3 评论 0原文

我有一个带有许多文件夹和子文件夹的雨果站点,其中包含_index.md文件等。它使用Docsy主题。

运行Hugo Server在Local -Host的浏览器中正确显示该站点:1313

当我运行HugoHugo -D以获取与HTML相同的页面磁盘上的文件,我收到

  • 一组文件夹...
  • ...仅包含index.htmlindex.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 and index.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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

澜川若宁 2025-02-09 23:23:41

看来您的PostCSS进程无法正确运行。升级hugodocsy

Postcss过程中未使用dev mod(Hugo)服务器),但它在Production(Hugo)中,因此不幸的是,您将获得不同的结果。

尝试使用本地运行hugo - debug标志,查看是否显示出任何错误。

It looks like maybe your postcss process isn't running correctly. I had this problem after upgrading Hugo and Docsy

The postcss process isn't used in the dev mod (hugo server) but it is in production (hugo) so you will unfortunately get different results.

Try running hugo locally with the --debug flag and see if any errors show up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文