Define a reusable include with variants (banner / sidebar / inline), pull content from either
(a) a named CTA in _data/ctas.yml
b) page-level overrides in front matter.
Then drop the include where you want it (top, sidebar, inline). This gives you global control + page-specific flexibility.
Steps:
1) Create a CTA catalog
_data/ctas.yml: reusable, named CTAs you can reference across pages.
data_engineering_zoomcamp:
title_text: "Start Data Engineering Zoomcamp"
description: Want to learn data engineering? DE Zoomcamp ...
cta_text: "Register now"
url: "/zoomcamp/"
target: "_self"
2) A single include that supports variants + overrides
_includes/cta.html
3) Minimal styles (three variants)
Add to your CSS:
/* Banner (top) */
/* Sidebar (card-like) */
/* Inline (within article body) */
4) How to place CTAs
5) Per-page overrides (front matter)
If a page needs a unique CTA without inventing a new catalog entry:
---
title: "ML Zoomcamp: Module 5"
cta:
---
6) Define which pages should have which CTAs
Define a reusable include with variants (banner / sidebar / inline), pull content from either
(a) a named CTA in
_data/ctas.ymlb) page-level overrides in front matter.
Then drop the include where you want it (top, sidebar, inline). This gives you global control + page-specific flexibility.
Steps:
1) Create a CTA catalog
_data/ctas.yml: reusable, named CTAs you can reference across pages.2) A single include that supports variants + overrides
_includes/cta.html3) Minimal styles (three variants)
Add to your CSS:
4) How to place CTAs
5) Per-page overrides (front matter)
If a page needs a unique CTA without inventing a new catalog entry:
6) Define which pages should have which CTAs