Skip to content

Reusable CTA banners #66

@kavaivaleri

Description

@kavaivaleri

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions