|
2 | 2 |
|
3 | 3 | # ACM Hack Website |
4 | 4 |
|
5 | | - |
6 | 5 | [](code-of-conduct.md) |
7 | 6 | [](https://github.com/uclaacm/hack.uclaacm.com/actions?query=workflow%3A%22Deploy+to+GitHub+Pages%22) |
8 | 7 | \ |
9 | 8 | \ |
10 | | -This repository contains the code for ACM Hack’s website! |
| 9 | +This repository contains the code for ACM Hack’s website! |
11 | 10 |
|
12 | | -This website is developed with [Gatsby](https://www.gatsbyjs.org/) and |
13 | | -[Material UI](https://material-ui.com/), and is an active project being |
14 | | -developed by ACM Hack’s Dev Team. |
| 11 | +This website is developed with [React](https://react.dev/) using |
| 12 | +[Vite](https://vite.dev/), and is an active project being |
| 13 | +developed by ACM Hack’s Dev Team. |
15 | 14 |
|
16 | 15 | #### ACM Hack Dev Team Contributors |
17 | | -- Katelyn Yu [(@katelynsyu)](https://github.com/katelynsyu) |
18 | | -- Einar Balan [(@EinarBalan)](https://github.com/EinarBalan) |
| 16 | + |
19 | 17 | - James Wu [(@jamesmwu)](https://github.com/jamesmwu) |
20 | | -- Nathan Zhang [(@nathanzzhang)](https://github.com/nathanzzhang) |
21 | | -- Lillian Gonick [(@lilliangonick)](https://github.com/lilliangonick) |
22 | | -- Max Akira Lee [(@maxywaxyy)](https://github.com/maxywaxyy) |
23 | 18 | - Jenna Wang [(@ariyin)](https://github.com/ariyin) |
24 | | -- Jakob Reinwald [(@jakobreinwald)](https://github.com/jakobreinwald) |
| 19 | +- Hannah Kendall [(@hannahkendall04)](https://github.com/orgs/uclaacm/people/hannahkendall04) |
| 20 | +- Kayla Hamakawa [(@kaylahama)](https://github.com/orgs/uclaacm/people/kaylahama) |
| 21 | +- Andy Lewis [(@datowq)](https://github.com/orgs/uclaacm/people/datowq) |
| 22 | +- Nathan Zhang [(@nathanzzhang)](https://github.com/nathanzzhang) |
25 | 23 |
|
26 | 24 | #### Alumni Dev Team Contributors |
27 | | -- Timothy Gu [(@TimothyGu)](https://github.com/TimothyGu/) |
| 25 | + |
| 26 | +- Jakob Reinwald [(@jakobreinwald)](https://github.com/jakobreinwald) |
| 27 | +- Katelyn Yu [(@katelynsyu)](https://github.com/katelynsyu) |
| 28 | +- Nareh Agazaryan [(@nareha)](https://github.com/nareha) |
| 29 | +- Einar Balan [(@EinarBalan)](https://github.com/EinarBalan) |
| 30 | +- Alex Xia [(@khxia)](https://github.com/khxia/) |
28 | 31 | - Jody Lin [(@jodymlin)](https://github.com/jodymlin/) |
29 | 32 | - Galen Wong [(@GalenWong)](https://github.com/GalenWong/) |
30 | | -- Alex Xia [(@khxia)](https://github.com/khxia/) |
31 | | -- Nareh Agazaryan [(@nareha)](https://github.com/nareha) |
| 33 | +- Timothy Gu [(@TimothyGu)](https://github.com/TimothyGu/) |
32 | 34 |
|
33 | 35 | ACM Hack is a subcomittee of [ACM @ UCLA](http://www.uclaacm.com/), the largest |
34 | 36 | Computer Science student organization in Southern California. Check out [our |
35 | 37 | website](https://hack.uclaacm.com/) to learn more about who we are and what we |
36 | 38 | do! |
37 | 39 |
|
38 | 40 | ## Getting Started |
| 41 | + |
39 | 42 | You’ll need: |
| 43 | + |
40 | 44 | - [Git](https://git-scm.com/) |
41 | | -- [Node.js](https://nodejs.org/en/) |
42 | | -- [Yarn 1.x](https://classic.yarnpkg.com/en/) (Note that we don’t yet work with |
43 | | - Yarn 2.) |
44 | | -- if you use VSCode, we recommend you install the |
45 | | - [EditorConfig](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) |
46 | | - extension |
| 45 | +- [Node.js 20.x](https://nodejs.org/en/) |
| 46 | +- If you use VSCode, we recommend you install the |
| 47 | + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) |
| 48 | + extension to adhere to our linter rules. |
47 | 49 |
|
48 | 50 | ### Running the Project |
| 51 | + |
49 | 52 | Type the following lines in your command line: |
| 53 | + |
50 | 54 | ```sh |
51 | 55 | $ git clone https://github.com/uclaacm/hack.uclaacm.com.git |
52 | 56 | $ cd hack.uclaacm.com |
53 | 57 | $ npm install |
54 | 58 | $ npm run dev |
55 | 59 | ``` |
| 60 | + |
56 | 61 | You can then navigate to `http://localhost:8000/` in your browser to see the |
57 | 62 | website! |
58 | 63 |
|
59 | 64 | ### Notes |
60 | | -- Be sure to run `yarn` every time there are changes to `package.json`. Usually |
61 | | - you’ll want to run `yarn` in the following scenarios: |
| 65 | + |
| 66 | +- Be sure to run `npm install` every time there are changes to `package.json`. Usually |
| 67 | + you’ll want to run `npm install` in the following scenarios: |
62 | 68 | - after pulling from main |
63 | 69 | - after merging main into your branch |
64 | 70 | - after switching branches (that may have different dependencies) |
65 | 71 | - This project uses ESLint to ensure code style compliance. ESLint is |
66 | 72 | automatically run when you try to make a Git commit, though this can be |
67 | 73 | overridden in exigent circumstances with `--no-verify`. To run ESLint |
68 | | - manually, do `yarn lint`. |
| 74 | + manually, do `npm run lint`. |
69 | 75 |
|
70 | 76 | ### Troubleshooting |
| 77 | + |
71 | 78 | If something breaks in a weird way, try the following in order: |
72 | | -- run `yarn` |
73 | | -- delete the `public`, `.cache`, and `node_modules/.cache` directories |
| 79 | + |
| 80 | +- run `npm install` |
74 | 81 | - delete the `node_modules` directory entirely and reinstall dependencies |
75 | | - by running `yarn` |
| 82 | + by running `npm install` |
76 | 83 |
|
77 | | -## Maintenance |
| 84 | +## Maintenance |
78 | 85 |
|
79 | 86 | ### Adding Blog Posts |
80 | 87 |
|
81 | | -The blogs that are written in Markdown format. |
| 88 | +Our blogs are written in Markdown format. |
82 | 89 |
|
83 | | -To add new blogs, create a folder of the term under the directory `posts/`, |
84 | | -if it does not exist yet (e.g. `winter2020`). Then, create the directory that |
| 90 | +To add new blogs, create a folder of the term under the directory `blogPosts/`. If the current year does not exist yet (e.g. `winter2030`). Then, create the directory that |
85 | 91 | holds the blog post (e.g. `hoth-intro`). This would be the path to the blog |
86 | | -post: |
| 92 | +post: |
87 | 93 |
|
88 | 94 | ``` |
89 | | -hack.uclaacm.com/blogs/winter2020/hoth-intro/ |
| 95 | +hack.uclaacm.com/blogs/winter2020-hoth-intro/ |
90 | 96 | ``` |
91 | 97 |
|
92 | | -Then, create a `index.md` markdown file. |
| 98 | +Then, create a `index.md` markdown file. |
93 | 99 | Start the file with the following metadata format. |
94 | 100 |
|
95 | | -```yml |
96 | | ---- |
97 | | -date: 2019-10-08 |
98 | | -title: "Function and this" |
99 | | -subtitle: "JavaScript Chats with ACM Hack Session 1" |
100 | | -author: "Galen Wong" |
101 | | ---- |
102 | 101 | ``` |
103 | | - |
104 | | -Since the title and subtitle are specified in the metadata already, you don't |
105 | | -need to specify it again in the body of the markdown. You should avoid using |
106 | | -level 1 and level 2 title (aka `#` and `##`) since they represent the title |
107 | | -and the subtitle. Adding an author is _optional_. |
108 | | - |
109 | | -### Adding Events to Workshop Archive |
110 | | - |
111 | | -The event workshops are stored in yaml format. |
112 | | - |
113 | | -To add event workshops to the archive, go to |
114 | | -`src/data/archive/`. |
115 | | - |
116 | | -To create a new quarter section, add a new folder to the `archive` |
117 | | -folder with the following format `<quarter><year>`. |
118 | | -> **Note:** the |
119 | | -> name of the folder doesn't hold any affect on the queries made (aka |
120 | | -> the name of the folder is not used anywhere), but follow the |
121 | | -> specified format for organization. |
122 | | - |
123 | | -To add a specific event, create a `yml` file in the quarter |
124 | | -folder. Each Yaml file should contain information |
125 | | -for only _**one**_ event. |
126 | | - |
127 | | -Each event Yaml file should be |
128 | | -created with the following structure: |
129 | | -```yml |
130 | | -- name: Event Name |
131 | | - quarter: <Quarter> <year> |
132 | | - mainLink: <best overall event link (ex: github, slides, etc.)> |
133 | | - tags: ['overall', 'event', 'tags'] |
134 | | - directors: |
135 | | - - Director 1 |
136 | | - - Director 2 |
137 | | - - etc. |
138 | | - |
139 | | - workshops: |
140 | | - - name: Workshop 1 Title |
141 | | - repo: <link to github repo> |
142 | | - slides: <link to slides> |
143 | | - youtube: <link to video> |
144 | | - tags: ['workshop', 'specific', 'tags'] |
145 | | - presenter: |
146 | | - - Presenter 1 |
147 | | - - Presenter 2 |
148 | | - - etc. |
149 | | - - name: Workshop 2 Title |
150 | | - ...etc. |
| 102 | +# Title |
| 103 | +## Subtitle |
| 104 | +### <Date> |
| 105 | +#### By <Authors> |
151 | 106 | ``` |
152 | 107 |
|
153 | | -**Notes on the Yaml fields:** |
154 | | -
|
155 | | -| Field | Required | Notes | |
156 | | -| ----------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | |
157 | | -| `name` (Event) | yes | Name of the event | |
158 | | -| `quarter` | yes | Quarter event was held. _Must_ follow the format `<Quarter> <year>` because `ArchivePageTemplate.js` uses this value to index, sort, and organize events. | |
159 | | -| `mainLink` | no | Link most relevant to the overall event. | |
160 | | -| `tags` | yes | List of overall tags for the event | |
161 | | -| `directors` | no | List of directors for the event | |
162 | | -| `workshops` | no | List of workshops for the event | |
163 | | -| `name` (workshop) | yes | Name of workshop | |
164 | | -| `repo` | no | Link to the GitHub (usually README) | |
165 | | -| `slides` | no | Link to slides | |
166 | | -| `youtube` | no | Link to online recording | |
167 | | -| `tags` | yes | List of tags specific to workshop | |
168 | | -| `presenters` | no | List of presenters for the workshop | |
| 108 | +Example: |
169 | 109 |
|
170 | | -### Changing Officer Profiles |
171 | | - |
172 | | -Officers come and go. We don't stay in college forever. To change the officer |
173 | | -profiles, go to `src/components/PhotoPage/PhotoPage.js`. Modify the array |
174 | | -directly. |
| 110 | +``` |
| 111 | +# Function and This |
| 112 | +## JavaScript Chats with ACM Hack Session 1 |
| 113 | +### October 8th, 2019 |
| 114 | +#### By Galen Wong |
| 115 | +``` |
175 | 116 |
|
| 117 | +Finally, update `src/data/blogs.js` by adding another object to the `blogs` array. The object should be of the following format: |
176 | 118 |
|
177 | | -The profile pictures of the officer is put under `src/images/about`. The naming |
178 | | -of the file should be `<id>.jpg` or `<id>.png` where `<id>` is specified in |
179 | | -the data in `PhotoPage.js`. |
| 119 | +``` |
| 120 | +{ |
| 121 | + id: '<quarterYear>-<blogTitle>, |
| 122 | + title: <title>, |
| 123 | + author: <author>, |
| 124 | + date: <date (as a string)>, |
| 125 | + readTime: <readTime>, |
| 126 | + summary: <summary (matches subtitle)> |
| 127 | + markdown: new URL(<pathToPost>), import meta.url).href, |
| 128 | +} |
| 129 | +``` |
180 | 130 |
|
181 | | -### Maintaining Events |
| 131 | +### Adding Events to Workshop Archive |
182 | 132 |
|
183 | | -We list our events in our home page and the event page. |
184 | | -To change the events, change `src/data/events.js`. |
185 | | -The banner of the events are put under `src/images/event`. |
186 | | -The format of an event is as follow: |
| 133 | +The event workshop data is statically stored (for now) in `src/data/archive.js`. This is incomplete as of Nov 2024, as a result of our migration off of the Gatsby infrastructure to v2 of the Hack website. |
187 | 134 |
|
188 | | -```js |
189 | | -{ |
190 | | - name: 'Passion Talks', |
191 | | - date: getDateTime(2020, 5, 13, 18), |
192 | | - location: 'Zoom', |
193 | | - imgFilePath: 'event/2020s-passion-talks.png', |
194 | | - rsvpLink: 'https://forms.gle/rn5CxAByps4KgVLp6', |
195 | | - detailLink: 'https://www.facebook.com/events/275484680297266/' |
196 | | -}, |
197 | | -``` |
| 135 | +You can reference `src/data/archive` for the previous yml files containing workshop data. |
198 | 136 |
|
199 | | -If you are in development mode, hot-reloading might not work for updating |
200 | | -events. You need to manually do `yarn develop` again. |
| 137 | +### Changing Officer Profiles |
201 | 138 |
|
202 | | -### Maintaining Event Highlights |
| 139 | +Officers come and go. We don't stay in college forever. To change the officer |
| 140 | +profiles, go to `src/data/profiles.js`. Modify the array |
| 141 | +directly. |
203 | 142 |
|
204 | | -We list some of our featured events in our event page. |
205 | | -To change the featured events, go to `data/highlights.js`. |
| 143 | +The profile pictures of the officer is put under `src/images/team`. The naming |
| 144 | +of the file should be `<id>.jpg`, where `<id>` is specified in |
| 145 | +the data in `profiles.js`. |
206 | 146 |
|
207 | | -```js |
208 | | -{ |
209 | | - name: 'Hackschool', |
210 | | - description: 'A coolest event', |
211 | | - imgFilePath: 'event/2019f-hackschool.png', |
212 | | - button: 'Curriculum', |
213 | | - link: 'https://github.com/uclaacm/hackschool-f19' |
214 | | -}, |
215 | | -``` |
| 147 | +This format follows as well for `team-easter-egg`. |
216 | 148 |
|
217 | | -The banner images of these highlighted events can also be found in |
218 | | -`src/images/event`. The `button` field will be rendered as a link that points |
219 | | -to `link`. |
| 149 | +To modify alumni data, directly modify the array at `src/data/alumni.js`. |
220 | 150 |
|
221 | 151 | ## Deployment |
222 | 152 |
|
223 | | -Deployment is done automatically when the `main` branch is updated. |
224 | | -We use GitHub Actions to deploy our site into GitHub pages. We have |
225 | | -our domain `hack.uclaacm.com` to point to this GitHub page. |
| 153 | +Deployment is done automatically when the `main` branch is updated. |
| 154 | +We deploy using Netlify, and have our domain name `hack.uclaacm.com` set to point towards that deployment. |
226 | 155 |
|
227 | 156 | ### Continuous Integration (CI) |
228 | 157 |
|
229 | | -We had set up Netlify to build our site for preview for every pull request. |
230 | | -You can see the preview link right at our pull request. |
| 158 | +We set up Netlify to build our site for preview for every pull request. |
| 159 | +You can see the preview link right at our pull request. |
231 | 160 |
|
232 | 161 | But do note that Netlify has a monthly limit of 1000 build minutes. We share |
233 | 162 | this quota with the HOTH website. Don't push too much. |
0 commit comments