Skip to content

Commit 0450835

Browse files
committed
added new website template
1 parent c377f34 commit 0450835

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+7084
-288
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,51 @@
1-
name: Publish to GH Pages
1+
name: Deploy to GitHub Pages
2+
23
on:
34
push:
4-
branches:
5-
- main
5+
branches: [ main ]
66
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
717

818
jobs:
9-
deploy:
10-
permissions:
11-
contents: write
19+
build:
1220
runs-on: ubuntu-latest
1321
steps:
14-
- name: Checkout source
15-
uses: actions/checkout@v3
16-
with:
17-
submodules: true
22+
- name: Checkout
23+
uses: actions/checkout@v4
1824

19-
- name: Checkout destination
20-
uses: actions/checkout@v3
21-
if: github.ref == 'refs/heads/main'
25+
- name: Setup Node.js
26+
uses: actions/setup-node@v4
2227
with:
23-
ref: gh-pages
24-
path: built-site
28+
node-version: '18'
29+
cache: 'npm'
30+
31+
- name: Install dependencies
32+
run: npm ci
2533

26-
- name: Setup Hugo
27-
run: |
28-
curl -L -o /tmp/hugo.tar.gz 'https://github.com/gohugoio/hugo/releases/download/v0.140.2/hugo_extended_0.140.2_linux-amd64.tar.gz'
29-
tar -C ${RUNNER_TEMP} -zxvf /tmp/hugo.tar.gz hugo
3034
- name: Build
31-
run: ${RUNNER_TEMP}/hugo
32-
33-
- name: Deploy
34-
if: github.ref == 'refs/heads/main'
35-
run: |
36-
cp -R public/* ${GITHUB_WORKSPACE}/built-site/
37-
cd ${GITHUB_WORKSPACE}/built-site
38-
git add .
39-
git config user.name 'Alan Davide Bovo'
40-
git config user.email '[email protected]'
41-
git commit -m 'Updated site'
42-
git push
35+
run: npm run build
36+
37+
- name: Upload artifact
38+
uses: actions/upload-pages-artifact@v3
39+
with:
40+
path: ./out
41+
42+
deploy:
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
46+
runs-on: ubuntu-latest
47+
needs: build
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

.gitignore

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
# Compiled Object files, Static and Dynamic libs (Shared Objects)
2-
*.o
3-
*.a
4-
*.so
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
52

6-
# Folders
7-
_obj
8-
_test
3+
# dependencies
4+
/node_modules
95

10-
# Architecture specific extensions/prefixes
11-
*.[568vq]
12-
[568vq].out
6+
# next.js
7+
/.next/
8+
/out/
139

14-
*.cgo1.go
15-
*.cgo2.c
16-
_cgo_defun.c
17-
_cgo_gotypes.go
18-
_cgo_export.*
10+
# production
11+
/build
1912

20-
_testmain.go
13+
# debug
14+
npm-debug.log*
15+
yarn-debug.log*
16+
yarn-error.log*
17+
.pnpm-debug.log*
2118

22-
*.exe
23-
*.test
19+
# env files
20+
.env*
2421

25-
/public
26-
.DS_Store
27-
.hugo_build.lock
28-
resources/_gen/
22+
# vercel
23+
.vercel
24+
25+
# typescript
26+
*.tsbuildinfo
27+
next-env.d.ts

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Blaisone CTF Team Website
2+
3+
A modular static website for the Blaisone CTF team, built with Next.js and designed for easy content management through JSON configuration files.
4+
5+
## Features
6+
7+
- **Static Export**: Optimized for deployment on any static hosting service
8+
- **Modular Design**: Easy to add/remove components and content
9+
- **JSON-Driven Content**: Update team members, sponsors, and writeups through simple JSON files
10+
- **Responsive Design**: Works perfectly on desktop and mobile devices
11+
- **SEO Optimized**: Built with Next.js best practices for search engine optimization
12+
- **Dark Mode**: Default dark theme with light and system theme options
13+
14+
## Deployment
15+
16+
### GitHub Pages (Automatic)
17+
18+
This repository is configured for automatic deployment to GitHub Pages:
19+
20+
1. **Enable GitHub Pages**:
21+
- Go to your repository settings
22+
- Navigate to "Pages" section
23+
- Under "Source", select "GitHub Actions"
24+
25+
2. **Automatic Deployment**:
26+
- Every push to the `main` branch triggers a deployment
27+
- The site will be available at `https://[username].github.io/[repository-name]`
28+
29+
3. **Manual Deployment**:
30+
- Go to the "Actions" tab in your repository
31+
- Click "Deploy to GitHub Pages" workflow
32+
- Click "Run workflow" to manually trigger a deployment
33+
34+
### Local Development
35+
36+
1. Install dependencies:
37+
\`\`\`bash
38+
npm install
39+
\`\`\`
40+
41+
2. Run the development server:
42+
\`\`\`bash
43+
npm run dev
44+
\`\`\`
45+
46+
3. Open [http://localhost:3000](http://localhost:3000) in your browser
47+
48+
### Building for Production
49+
50+
To create a static export:
51+
52+
\`\`\`bash
53+
npm run build
54+
\`\`\`
55+
56+
This will generate a static site in the `out` directory.
57+
58+
## Project Structure
59+
60+
\`\`\`
61+
├── .github/workflows/
62+
│ └── deploy.yml # GitHub Actions deployment workflow
63+
├── app/
64+
│ ├── page.tsx # Homepage
65+
│ ├── members/page.tsx # Team members page
66+
│ ├── sponsors/page.tsx # Sponsors page
67+
│ ├── writeups/page.tsx # Writeups page
68+
│ └── writeups/[slug]/page.tsx # Individual writeup pages
69+
├── components/
70+
│ ├── navigation.tsx # Shared navigation component
71+
│ ├── theme-switcher.tsx # Theme switching component
72+
│ ├── member-card.tsx # Individual member display
73+
│ ├── sponsor-card.tsx # Individual sponsor display
74+
│ └── writeup-card.tsx # Individual writeup display
75+
├── data/
76+
│ ├── members.ts # Team members data
77+
│ ├── sponsors.ts # Sponsors data
78+
│ └── writeups.ts # Writeups data
79+
└── next.config.mjs # Next.js configuration with static export
80+
\`\`\`
81+
82+
## Content Management
83+
84+
### Adding Team Members
85+
86+
Edit `data/members.ts` to add new team members:
87+
88+
\`\`\`typescript
89+
{
90+
name: "New Member",
91+
role: "member", // or "admin"
92+
description: "Brief description of the member",
93+
avatar: "/path/to/avatar.jpg",
94+
social: {
95+
website: "https://example.com",
96+
97+
twitter: "https://twitter.com/member",
98+
github: "https://github.com/member",
99+
linkedin: "https://linkedin.com/in/member",
100+
discord: "member#1234"
101+
}
102+
}
103+
\`\`\`
104+
105+
### Adding Sponsors
106+
107+
Edit `data/sponsors.ts` to add new sponsors:
108+
109+
\`\`\`typescript
110+
{
111+
name: "Sponsor Name",
112+
logo: "/path/to/logo.png",
113+
social: {
114+
website: "https://sponsor.com",
115+
twitter: "https://twitter.com/sponsor",
116+
linkedin: "https://linkedin.com/company/sponsor"
117+
}
118+
}
119+
\`\`\`
120+
121+
### Adding Writeups
122+
123+
Edit `data/writeups.ts` to add new writeups:
124+
125+
\`\`\`typescript
126+
{
127+
title: "Challenge Name - Competition",
128+
author: "Author Name",
129+
date: "MM/DD/YYYY",
130+
tags: ["category", "subcategory"],
131+
description: "Brief description of the writeup",
132+
image: "/path/to/preview.jpg",
133+
slug: "url-friendly-slug"
134+
}
135+
\`\`\`
136+
137+
## Theme System
138+
139+
The website supports three themes:
140+
- **Dark** (default): Dark background with light text
141+
- **System**: Follows the user's system preference
142+
- **Light**: Light background with dark text
143+
144+
Users can cycle through themes using the theme switcher in the navigation bar.
145+
146+
## Customization
147+
148+
- **Colors**: Modify the color scheme in the Tailwind classes throughout the components
149+
- **Layout**: Adjust the grid layouts in the page components
150+
- **Styling**: Update the component styles to match your team's branding
151+
- **Content Structure**: Modify the TypeScript interfaces in the components to add new fields
152+
153+
## Alternative Deployment Options
154+
155+
The site can also be deployed to:
156+
- Vercel (recommended for Next.js)
157+
- Netlify
158+
- Any static hosting service
159+
160+
Simply upload the contents of the `out` directory after running `npm run build`.
161+
162+
## License
163+
164+
MIT License - feel free to use this template for your own CTF team website.

0 commit comments

Comments
 (0)