From 9e6701ccde8a9f938e575a2b79f4ab6f3cb94c39 Mon Sep 17 00:00:00 2001 From: Kevin Chung Date: Mon, 27 Jul 2026 10:38:03 -0400 Subject: [PATCH] Add media placeholders to challenge yml --- ctfcli/spec/challenge-example.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ctfcli/spec/challenge-example.yml b/ctfcli/spec/challenge-example.yml index 14ec1ae..9b8f46d 100644 --- a/ctfcli/spec/challenge-example.yml +++ b/ctfcli/spec/challenge-example.yml @@ -6,6 +6,14 @@ name: "{{cookiecutter.name}}" author: "author" category: category description: This is a sample description +# Descriptions (and hint contents) can reference media files that have already +# been uploaded to your CTFd instance. Add media with `ctf media add` +# and then reference them with {name} or {{ name }} placeholders. +# The name is media/, matching the key written to .ctf/config. +# +# description: | +# This is a sample description with an image ![logo]({media/logo.png}) +# and a link to a [handout]({{ media/handout.zip }}). attribution: Written by [author](https://ctfd.io) value: 100 type: standard @@ -116,6 +124,7 @@ files: # required but can be nice. # Can be removed if unused # Accepts dictionaries or strings +# Hint content also supports media placeholders as described in the description field. hints: - { content: "This hint costs points", @@ -125,6 +134,9 @@ hints: - title: Titled Hint content: This hint has a title and costs points cost: 10 + - title: Hint with media + content: Take a look at this [handout]({handout}) + cost: 10 - key: keyed_hint_1 title: This hint has a key content: This hint has a key