Menu

Free to start / no card needed

Hugo, Jekyll and Eleventy

Add the badge to Hugo, Jekyll and Eleventy

All three static generators share one shape: a single base layout that every page is rendered into. Paste the line there once and it is on every page the site will ever have. Only the filename differs.

Where the code goes

Hugo. layouts/_default/baseof.html, the template every other layout extends. If your theme ships its own, copy it into your site's layouts directory first so a theme update does not overwrite your edit.

Jekyll. _layouts/default.html. Other layouts in a Jekyll site almost always inherit from it, so one paste covers posts and pages alike.

Eleventy. Whatever your base layout is called, commonly _includes/base.njk or _includes/layouts/base.html. It is the file with the <html> element in it.

The code

layouts/_default/baseof.html (Hugo)
  {{ block "main" . }}{{ end }}
  <script src="https://maketaksh.com/badge.js" data-taksh="yourname" defer></script>
</body>
_layouts/default.html (Jekyll)
  {{ content }}
  <script src="https://maketaksh.com/badge.js" data-taksh="yourname" defer></script>
</body>

Swap yourname for your handle. It is the one in your dashboard.

Editing the theme's copy instead of your own

Hugo and Jekyll both let a theme provide the base layout, and both let your site override it. Edit the theme's file and the next theme update reverts you. Copy the layout into your own site directory first. Hugo's lookup order and Jekyll's overrides both prefer yours.

Checking it worked

Load the published page and look at the bottom corner. If nothing is there, it is almost always one of four things, in order of how often: the handle has no projects in it yet; the handle is wrong; the platform stripped the tag, as described above; or a content blocker ate it, check the Network tab for badge.js.

Once it is live, the Analytics panel in your dashboard lists every site the badge has been seen on, from the first page load, which is the fastest way to confirm an install on a site you cannot easily open.

Other setups

Astro · Ghost · All twelve setups

What the badge is, and why cross-linking your own launches is worth doing at all: the short version.