Mit*_*unS 5 static-site gitlab hugo
我有一个基于hugo主题的网站,该网站是我从gitlab托管的,位于myusername.gitlab.io,然后我还有一个基于hugo主题的小型网站,位于myusername.gitlab.io/repoA,我想从以前的网站中添加,网址为myusername.gitlab.io/repoA
现在,这是我的问题(我还没有做很多事情,所以请原谅我的无知。)
你必须分析输出文件,你的个人主题产生。例如:
Theme A produces:
-- index_1.html
-- style_1.css
Theme B produces:
-- index_2.html
-- style_2.css
Run Code Online (Sandbox Code Playgroud)
Hugo 不支持后运行脚本,因此将两个站点堆叠在一起的最简单方法是编写一个小的 shell 脚本,例如:
cd /path/to/themeA
hugo themeA --destination=/deploy/location/
cd /path/to/themeB
hugo themeB --destination=/deploy/location/about/
Run Code Online (Sandbox Code Playgroud)
这将导致布局如下:
/deploy/location
-- index_1.html
-- style_1.html
-- about/
-- index_1.html
-- index_2.html
Run Code Online (Sandbox Code Playgroud)
这个生成的目录可以通过您必须使用的任何方法部署到您的主机。
现在您可以简单地查看生成的页面,从而轻松识别损坏的链接并在本地Hugo模板的 html 中更改它们。
为此使用子域似乎非常没有必要。只有新(子)域才需要证书。
归档时间: |
|
查看次数: |
142 次 |
最近记录: |