Skip to content

Commit

Permalink
add toki section to each article
Browse files Browse the repository at this point in the history
  • Loading branch information
alifeee committed Dec 30, 2023
1 parent ea7985e commit b614ea1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .eleventy.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module.exports = function (eleventyConfig) {
"pu",
(nimi) => `<sup><a href="/sona#${nimi}">(pu)</a></sup>`
);
// get dictionary key
eleventyConfig.addHandlebarsHelper("getkey", (dict, key) => dict[key]);

return {
markdownTemplateEngine: "hbs",
Expand Down
14 changes: 14 additions & 0 deletions lipu.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,20 @@ eleventyComputed:
pages now with a stapler.
</p>
</section>
{{#with (getkey collections lipu.title)}}
{{#if this}}
<section>
<h2>toki</h2>
<ul>
{{#each this}}
<li>
<a href="{{page.url}}">{{data.[nimi-suli]}} ({{data.[jan-pali]}})</a>
</li>
{{/each}}
</ul>
</section>
{{/if}}
{{/with}}
<nav>
<ul>
<li>
Expand Down

0 comments on commit b614ea1

Please sign in to comment.