File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,36 @@ pub fn parse_one(path: &PathBuf) -> Result<ChallengeConfig> {
122
122
pub struct ChallengeConfig {
123
123
name : String ,
124
124
author : String ,
125
+
126
+ /// Challenge description, displayed to players on the frontend.
127
+ /// Supports markdown and Jinja-style templating for challenge info via
128
+ /// [minijinja](https://docs.rs/minijinja).
129
+ ///
130
+ /// The Jinja template fields available are:
131
+ ///
132
+ /// | Field name | Description |
133
+ /// | ----------- | ----------- |
134
+ /// | `hostname` | The hostname or domain for the challenge
135
+ /// | `port` | The port that the challenge is listening on
136
+ /// | `nc` | Insert the `nc` command to connect to TCP challenges (`nc {{hostname}} {{port}}`)
137
+ /// | `link` | Create a Markdown link to the exposed hostname/port
138
+ /// | `url` | The URL from `link` without the accompanying Markdown
139
+ /// | `challenge` | The full challenge.yaml config for this challenge, with subfields
140
+ ///
141
+ /// Example:
142
+ ///
143
+ /// ```yaml
144
+ /// description: |
145
+ /// Some example challenge. Blah blah blah flavor text.
146
+ ///
147
+ /// In case you missed it, this was written by {{ challenge.author }}
148
+ /// and is called {{ challenge.name }}.
149
+ ///
150
+ /// {{ link }} # -becomes-> [example.chals.thectf.com](https://example.chals.thectf.com)
151
+ /// {{ nc }} # -becomes-> `nc example.chals.thectf.com 12345`
152
+ /// ```
125
153
description : String ,
154
+
126
155
category : String ,
127
156
128
157
directory : PathBuf ,
You can’t perform that action at this time.
0 commit comments