Skip to content

Commit

Permalink
fix footer links
Browse files Browse the repository at this point in the history
  • Loading branch information
undefined-moe committed Aug 30, 2024
1 parent fb67d52 commit 3fef5e1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export default async (options: SvgToFontOptions = {}) => {
if (name === 'symbol') symbolPath = _path;
});
// default template
options.website.template = options.website.template || path.join(__dirname, 'website', 'index.html');
options.website.template = options.website.template || path.join(__dirname, 'website', 'index.njk');
// template data
const tempData: SvgToFontOptions['website'] & {
fontname: string;
Expand Down
16 changes: 6 additions & 10 deletions src/website/index.html → src/website/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -135,11 +135,9 @@ <h1>{{ title }}<sup>{{ version }}</sup></h1>
{{ description|default(meta.description) }}
</div>
<p>
{% if links.length %}
{% for idx, linkItem in links %}
<a href="{{ linkItem.url }}">{{ linkItem.title }}</a>{% if not loop.last %} · {% endif %}
{% endfor %}
{% endif %}
{% for linkItem in links|default([]) %}
<a href="{{ linkItem.url }}">{{ linkItem.title }}</a>{% if not loop.last %} · {% endif %}
{% endfor %}
</p>
</div>
<div class="icons">
Expand All @@ -148,11 +146,9 @@ <h1>{{ title }}<sup>{{ version }}</sup></h1>
</ul>
</div>
<p class="links">
{% if links.length %}
{% for idx, linkItem in links %}
<a href="{{ linkItem.url }}">{{ linkItem.title }}</a>{% if not loop.last %} · {% endif %}
{% endfor %}
{% endif %}
{% for linkItem in links|default([]) %}
<a href="{{ linkItem.url }}">{{ linkItem.title }}</a>{% if not loop.last %} · {% endif %}
{% endfor %}
</p>
<div class="footer">
{{ footerInfo|safe }}
Expand Down

0 comments on commit 3fef5e1

Please sign in to comment.