Skip to content

Commit fc684cc

Browse files
committed
Fix naming
1 parent 147e2fe commit fc684cc

File tree

6 files changed

+52
-12
lines changed

6 files changed

+52
-12
lines changed

website/tools/fix_yaml_titles.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import os
2+
import re
3+
4+
target_dir = r"c:\Users\aakan\Documents\Git\writeups\website\writeups\FinalTrace_2025"
5+
6+
def check_titles():
7+
files = [f for f in os.listdir(target_dir) if f.endswith('.md') and f != 'index.md']
8+
9+
print(f"Checking {len(files)} markdown files.")
10+
11+
for filename in files:
12+
filepath = os.path.join(target_dir, filename)
13+
14+
with open(filepath, 'r', encoding='utf-8') as f:
15+
content = f.read()
16+
17+
# Extract title line
18+
match = re.search(r'^title:\s*(.*)$', content, re.MULTILINE)
19+
if match:
20+
title_value = match.group(1).strip()
21+
22+
# Check if title starts with - or contains : without quotes
23+
if title_value.startswith('-') or (':' in title_value and not (title_value.startswith('"') or title_value.startswith("'"))):
24+
print(f"Potential issue in {filename}: title: {title_value}")
25+
26+
# Fix it by quoting
27+
# Also if it starts with - **Category**, maybe we can find a better title?
28+
# For now, let's just quote it to fix the build error.
29+
# But for 28--category-forensics.md, the title is garbage.
30+
31+
if filename == '28--category-forensics.md':
32+
new_title = '"Phantom User Forensics"'
33+
else:
34+
# Escape quotes if needed
35+
safe_title = title_value.replace('"', '\\"')
36+
new_title = f'"{safe_title}"'
37+
38+
new_content = content.replace(f'title: {title_value}', f'title: {new_title}')
39+
40+
with open(filepath, 'w', encoding='utf-8') as f:
41+
f.write(new_content)
42+
print(f"Fixed {filename} -> title: {new_title}")
43+
44+
if __name__ == "__main__":
45+
check_titles()

website/writeups/FinalTrace_2025/07-output-temporal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: writeup
33

4-
title: Output: TEMPORAL
4+
title: "Output: TEMPORAL"
55
difficulty: Medium
66
points: 500
77
categories: [General]

website/writeups/FinalTrace_2025/26-act-iii-mirror-of-minutes-xss-ctf-walkthrough.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: writeup
33

4-
title: ACT III - Mirror of Minutes | XSS CTF Walkthrough
4+
title: Mirror of Minutes
55
difficulty: Medium
66
points: 500
77
categories: [General]
@@ -10,7 +10,8 @@ tags: []
1010
flag: cys{m1rr0r_p4ss}
1111
---
1212

13-
# ACT III - Mirror of Minutes | XSS CTF Walkthrough
13+
14+
## Mirror of Minutes
1415

1516
## Quick Start
1617

website/writeups/FinalTrace_2025/27-challenge-name.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: writeup
33

4-
title: Challenge Name
4+
title: Feed It the Fracture
55
difficulty: Medium
66
points: 500
77
categories: [Forensics (E)]

website/writeups/FinalTrace_2025/28--category-forensics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: writeup
33

4-
title: - **Category**: [Forensics]
4+
title: Phantom Fingerprints
55
difficulty: Medium
66
points: 500
77
categories: [Forensics]

website/writeups/FinalTrace_2025/38-ctf-write-up-citadel-entry-lock-key-16-solutions-final-flag.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,13 @@
11
---
22
layout: writeup
33

4-
title: CTF Write-up — **Citadel Entry Lock** (Key 1–6 solutions & final flag)
4+
title: Citadel Entry Lock
55
difficulty: Medium
66
points: 500
77
categories: [General]
88
tags: []
99

1010
flag: CYS{SEAL_RAID_CROSS_MAAT_MAZE_HODOS}
11-
---
12-
13-
# CTF Write-up — **Citadel Entry Lock** (Key 1–6 solutions & final flag)
14-
15-
16-
1711
---
1812

1913
# Key 1 — SEAL

0 commit comments

Comments
 (0)