Got stuck in the new issue. So I was able to duplicate a provide widget (themes/academic/layout/partials/widgets/publication.html
) and they are both shown correctly (i.e. pub1, pub2). However, there is only one content/publication
folder. The result is the contents in pub1 and pub2 are exactly the same.
I tried several ways, including duplicate the widget file publication.html
and change the folder generate path (<a href="{{ "/publication/" | relLangURL }}">
) inside. Not still don’t work.
{{ $ := .root }}
{{ $page := .page }}
{{ $pubs_len := len (where $.Data.Pages "Type" "publication") }}
<!-- Publications widget -->
<div class="row">
<div class="col-xs-12 col-md-4 section-heading">
<h1>{{ with $page.Title }}{{ . | markdownify }}{{ end }}</h1>
{{ with $page.Params.subtitle }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if gt $pubs_len $page.Params.count }}
<p class="view-all">
<a href="{{ "/publication/" | relLangURL }}">
{{ i18n "more_publications" | markdownify }}
<i class="fa fa-angle-double-right"></i>
</a>
</p>
{{ end }}
</div>
<div class="col-xs-12 col-md-8">
{{ with $page.Content }}<p>{{ . | markdownify }}</p>{{ end }}
{{ if $page.Params.detailed_list }}
{{ range first $page.Params.count (where $.Data.Pages "Type" "publication") }}
{{ partial "publication_li_detailed" . }}
{{ end }}
{{ else }}
<ul class="fa-ul">
{{ range first $page.Params.count (where $.Data.Pages "Type" "publication") }}
{{ partial "publication_li_simple" . }}
{{ end }}
</ul>
{{ end }}
</div>
</div>
Anyone got some ideas? Appreciated!
Hi there,
I’m trying to duplicate the widget “Recently publication” in the provided academic theme:
According to the tutorial, “Simply duplicate (copy/paste) and rename the example file at content/home/XXXX.md. Then edit the section title, weight, and content as desired.”, therefore, I copy/paste the publication.md in content/home, and rename them as:
publication1.md
title = “Conference Publications”
subtitle = “”
widget = “cpublications”
publication2.md.
title = “Journal Publications”
subtitle = “”
widget = “jpublications”
In the end, I changed the navigation link in config.toml:
[[menu.main]]
name = “Home”
url = “#about”
weight = 1
[[menu.main]]
name = “Publications”
url = “#publications1”
weight = 2
However, the compiling went wrong.
Is there any step I missed? Appreciate any help!