Skip to content

Commit 8a0bfd0

Browse files
authored
Default index page name to CTF name (CTFd#2465)
* Default index page name to CTF name
1 parent 2496014 commit 8a0bfd0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CTFd/themes/admin/templates/editor.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
<div class="col-md-12">
3232
{% set title = page.title if page is defined %}
3333
<b>{{ form.title.label }}</b>
34-
{{ form.title(class="form-control radius", id="route", placeholder="Title", value=title) }}
34+
{{ form.title(class="form-control radius", id="route", placeholder="Title", value=title or "") }}
3535
<small class="text-muted">
3636
{{ form.title.description }}
3737
</small>

CTFd/views.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def setup():
194194
)
195195

196196
# Create an empty index page
197-
page = Pages(title=None, route="index", content="", draft=False)
197+
page = Pages(title=ctf_name, route="index", content="", draft=False)
198198

199199
# Upload banner
200200
default_ctf_banner_location = url_for("views.themes", path="img/logo.png")

0 commit comments

Comments
 (0)