Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modularize General Meeting page #686

Merged
merged 13 commits into from
May 15, 2024
Merged

Modularize General Meeting page #686

merged 13 commits into from
May 15, 2024

Conversation

g1oom
Copy link
Member

@g1oom g1oom commented May 8, 2024

Overview

Resolves #671 by creating a dynamic general meeting page gm.js in the /pages/ directory. This page populates the website with data retrieved from gmData.json, which is generated by the script gm-generator.mjs in the /scripts/ directory. The generator script runs before the build process to fetch data from this spreadsheet. For testing, access the page at localhost:3000/gm through the development server.

Changes

pages/gm.js (NEW)

  • Removed all unused imports
  • Dynamically updates SEO data
  • Auto-populates all visible information on the website

scripts/gm-generator.mjs (NEW)

  • Generates gmData.json
  • Retrieves data from this spreadsheet using googleapi

package.json

  • Added gmp script: node scripts/gm-generator.mjs
  • Added npm run gmp in the build script

.gitignore:

  • Added gmData.json

netlify.toml

  • Added npm run gmp before npm build

lint.yml

  • Added run: npm run gmp

node-build.yml

  • Added - run: npm run gmp

Possible Changes

  • All the old GM pages are still under /pages/gm directory, so we can either delete them or leave them for the users to access (e.g. https://www.uclaacm.com/gm/w24)

g1oom and others added 11 commits April 15, 2024 18:11
- fetch data from google sheets to populate fields in skeleton gm page
Created a script to pull data from Google Sheets;
the new town-hall page automatically populates the data.

Still need to work on processing data from past town hall meetings.
NOTE: The Winter 2021 Town Hall Metting is still static b/c of the video
This eases access to the town hall page.
/town-hall/town-hall --> /town-hall
_redirects:     Remove redirect on /town-hall
netlify.toml:   Add 'npm run thp' before build
package.json:   Add thp script
lint.yml:       Add '- run: npm run thp'
node-build.yml: Add '- run: npm run thp'
@g1oom g1oom self-assigned this May 8, 2024
Copy link
Contributor

@ArshMalik02 ArshMalik02 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added two comments in code to update the GitHub workflows. Everything else lgtm, great work!!

.github/workflows/lint.yml Show resolved Hide resolved
.github/workflows/node-build.yml Show resolved Hide resolved
@snigdha-kansal snigdha-kansal merged commit 552bfce into main May 15, 2024
8 checks passed
@snigdha-kansal snigdha-kansal deleted the modular_gm branch May 15, 2024 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modularize GM Page
4 participants