How to Add Canonical Link Header in Lume Static Generator


Recently Started using Deno JS for Building Static Websites and find an Awesome Framework called lume.land Static Site Generator for Deno.

  • ¬†Easy to install and Configure
  • No need to add modules like node
  • Fast build times
  • MinimalConfiguration
  • Setup and Development like Jekyll and eleventy
  • Template Engine Support
  • And Many More Features

Ok Now See the Steps to add Add Canonical Link Header in Lume Static Generator

Add Canonical Link Header in Lume

  • Open your base file base.njk
<link rel="canonical" href="{{ url | url(true) }}">
  • Add the Above code to your Global Meta tag’s
  • File locations or Template May differ you can use the above code to Generate can Canonical Link Header for your Posts and Pages

Bonus

Get the Home page URL in Lume this may be useful for assets, Sitemap, and Feed Generation

<loc>{{ "/" | url(true) }}</loc>

 

Learn More About this Static Site Generator visit  Рlume.land

 



Was this article helpful?
Thanks!

Your feedback helps us improve Allwebtuts.com