Skip to content

Commit cd786df

Browse files
committed
add README for contributors
1 parent f5b127f commit cd786df

1 file changed

Lines changed: 143 additions & 0 deletions

File tree

README.md

Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
# NYJC Computing Website
2+
3+
The public website for NYJC's Computing programme. Built with [Jekyll](https://jekyllrb.com/) using the [Monophase](https://github.com/m3ng/monophase) theme.
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- Ruby 3.2 or higher (check with `ruby --version`)
10+
- Bundler (install with `gem install bundler` if needed)
11+
12+
### Installation
13+
14+
1. Clone the repository and navigate to it:
15+
```bash
16+
git clone https://github.com/nycomp/nyjc-computing.github.io.git
17+
cd nyjc-computing.github.io
18+
```
19+
20+
2. Install dependencies:
21+
```bash
22+
bundle install
23+
```
24+
25+
### Building the Site
26+
27+
- **Serve locally (with live reload):**
28+
```bash
29+
bundle exec jekyll serve
30+
```
31+
Then visit `http://localhost:4000`
32+
33+
- **Build for production:**
34+
```bash
35+
bundle exec jekyll build
36+
```
37+
The built site will be in the `_site/` directory.
38+
39+
## Project Structure
40+
41+
```
42+
├── _config.yml # Jekyll configuration
43+
├── _data/ # Data files for site-wide variables
44+
├── _includes/ # Reusable template components
45+
├── _layouts/ # Page layout templates
46+
├── _posts/ # Blog/news posts
47+
├── _site/ # Generated site (don't edit)
48+
├── assets/ # CSS, JS, and other assets
49+
├── images/ # Site images
50+
├── pages/ # Static pages (About, FAQ, etc.)
51+
├── Gemfile # Ruby dependencies
52+
└── index.md # Homepage
53+
```
54+
55+
## Contributing Content
56+
57+
### Branch Workflow
58+
59+
This repository uses a two-branch workflow:
60+
61+
- **`content`** - Branch for content contributions and editing
62+
- **`main`** - Production branch that deploys the site
63+
64+
When `main` is updated, it automatically syncs changes back to `content` via GitHub Actions.
65+
66+
### How to Contribute
67+
68+
1. **Checkout the `content` branch:**
69+
```bash
70+
git checkout content
71+
```
72+
73+
2. **Create your feature branch:**
74+
```bash
75+
git checkout -b my-new-page-or-fix
76+
```
77+
78+
3. **Make your changes** (see content types below)
79+
80+
4. **Commit and push:**
81+
```bash
82+
git add .
83+
git commit -m "Describe your changes"
84+
git push origin my-new-page-or-fix
85+
```
86+
87+
5. **Open a pull request** targeting the `content` branch
88+
89+
## Adding Content
90+
91+
### Adding a New Page
92+
93+
1. Create a new markdown file in the `pages/` directory, e.g., `pages/my-page.md`
94+
2. Add front matter at the top:
95+
96+
```yaml
97+
---
98+
title: My Page Title
99+
permalink: "/my-page"
100+
layout: page
101+
---
102+
```
103+
104+
3. Write your content in Markdown below the front matter
105+
106+
### Adding a Blog Post
107+
108+
1. Create a new file in `_posts/` with the naming format: `YYYY-MM-DD-title.md`
109+
2. Add front matter:
110+
111+
```yaml
112+
---
113+
title: Post Title
114+
date: YYYY-MM-DD HH:MM:SS Z
115+
categories:
116+
- update
117+
layout: post
118+
---
119+
```
120+
121+
3. Write your post content in Markdown
122+
123+
### Editing Existing Content
124+
125+
- **Pages** are in the `pages/` directory
126+
- **Posts** are in the `_posts/` directory
127+
- **Homepage** is `index.md`
128+
129+
Simply edit the corresponding Markdown file.
130+
131+
## Site Configuration
132+
133+
Site-wide settings are in [`_config.yml`](_config.yml):
134+
- Site title, description, and contact email
135+
- Navigation structure
136+
- Google Analytics tracking ID
137+
- Plugin settings
138+
139+
After modifying `_config.yml`, restart `jekyll serve` to see changes.
140+
141+
## Need Help?
142+
143+
For questions or issues, please contact the NYJC Computing team at [nyjc.computing@nyjc.edu.sg](mailto:nyjc.computing@nyjc.edu.sg)

0 commit comments

Comments
 (0)