我有一个基于hugo主题的网站,我从gitlab托管在myusername.gitlab.io,然后我还有另一个基于hugo主题的小型网站,位于myusername.gitlab.io/repoA,我想从中添加我以前的网站,网址为myusername.gitlab.io/repoA
现在,这是我的问题(我还没有做很多事情,所以请原谅我的无知。)
答案 0 :(得分:4)
您必须分析您的单个主题产生的输出文件。例如:
Theme A produces:
-- index_1.html
-- style_1.css
Theme B produces:
-- index_2.html
-- style_2.css
Hugo不支持运行后脚本,因此将两个站点相互堆叠的最简单方法是编写一个小的Shell脚本,例如:
cd /path/to/themeA
hugo themeA --destination=/deploy/location/
cd /path/to/themeB
hugo themeB --destination=/deploy/location/about/
这将导致布局如下:
/deploy/location
-- index_1.html
-- style_1.html
-- about/
-- index_1.html
-- index_2.html
此结果目录可以通过任何必须使用的方法部署到您的主机。
现在,您只需查看结果页面,即可轻松识别损坏的链接,并在本地 hugo 模板的html中对其进行更改。
为此无需使用子域。证书仅适用于新的(子)域。