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)
Overview
Resolves #671 by creating a dynamic general meeting page
gm.js
in the/pages/
directory. This page populates the website with data retrieved fromgmData.json
, which is generated by the scriptgm-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)scripts/gm-generator.mjs
(NEW)gmData.json
googleapi
package.json
gmp
script:node scripts/gm-generator.mjs
npm run gmp
in the build script.gitignore
:gmData.json
netlify.toml
npm run gmp
beforenpm build
lint.yml
run: npm run gmp
node-build.yml
- run: npm run gmp
Possible Changes
/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)