Custom plugins for lume static site generator. For my own use but you can use it freely.
Deletes html comments on pages
_config.ts
import removeHtmlComments from "https://raw.githubusercontent.com/angelside/lume-plugins/develop/remove_html_comments/mod.ts";
// ...
.use(removeHtmlComments())
Adds predefined links to predefined pages
_config.ts
import addSponsorLink from "https://raw.githubusercontent.com/angelside/lume-plugins/develop/add_sponsorlink/mod.ts";
// ...
.use(addSponsorLink({
file: "./src/_data/sponsor_links.yml",
}))
src/_data/sponsor_links.yml
/page1/:
- This is a test <a href="https://google.com">Link</a>
- Hello world
/page2/:
- This is a test 2
- Link test 2
sponsor_links.njk
{% include 'sponsor_links.njk' %}
{% if sponsorlinksFromPreprocess | length -%}
{% for link in sponsorlinksFromPreprocess %}
<li class="text-xs">{{ link | safe }}</li>
{% endfor %}
{%- endif %}