在文件夹结构中获取正确的路径

问题描述 投票:1回答:1

我对雨果很陌生,并且是我第一次在项目中使用它。

我有这样的文件夹结构:

enter image description here

我要做什么是将linkslideTwo.html文件设置为tours/circle.thml文件。

slideTwo.html

<div class="timeline-heading">
  <a href='/tours/circle' class="ctaLinkTours">
    <h3 class="timeline-title">{{ i18n "tour" }}</h3>
  </a>
</div>

当用户单击标题TOUR时,我想带他去tours/circle.thml并显示该特定的游览。

我的网站是静态的。

我很难找到道路,我从昨天开始挣扎,所以任何建议都值得赞赏。

html filepath hugo
1个回答
0
投票

似乎您正在使用布局来存储内容。 Hugo使用content /和afaik下的数据构建网站,布局下的文件没有url。它们用作使用content /建立网站的模板。因此,如果您有一个链接tour / circle.html,它将在content / tours / circle下查找,并且该内容应参考layout.hml布局以呈现其内容。

© www.soinside.com 2019 - 2024. All rights reserved.