Codebase Improvement Suggestions
Codebase Improvement Suggestions
High-priority
Fix accidental global variables in
assets/js/collapse.js. The click handler assigns$headerand$contentwithoutconst/let, which creates globals and can leak state across scripts. Use block-scoped variables and wrap the logic in an IIFE or$(document).ready(...)to avoid polluting global scope.Align
assets/js/collapse.jswith the main JS bundle.assets/js/collapse.jsis not included in theuglifypipeline (package.jsononly bundles_main.js+ plugin files). If this behavior is intended for production, include it in the build script; otherwise remove dead/unreferenced script code.Replace interval-based resize polling with event-driven debounce in
assets/js/_main.js. The sticky footer recalculation currently usessetInterval(..., 250)and adidResizeflag. This pattern runs forever and is less efficient than a debouncedresizehandler.Pin and lock Ruby dependencies for reproducible Jekyll builds. The repository has a
Gemfilebut noGemfile.lock. Add a lockfile and document the supported Ruby/Bundler versions to avoid environment drift.
Medium-priority
Correct configuration typos and stale defaults in
_config.yml.publication_category.standardizations.titlecurrently saysStradization Contributions, which looks like a typo. Alsorepositorystill points to the upstream template (academicpages/academicpages.github.io) instead of this site repo.Normalize analytics provider type in
_config.yml.analytics.provideris currently the string"false"instead of a booleanfalse. This can lead to subtle Liquid condition mismatches.Modernize legacy social keys in
_config.yml. Keys likegoogle_plusare deprecated and can be removed to simplify maintenance and reduce config noise.
Nice-to-have
Add CI checks for JS bundle and site build. Add a workflow that runs
npm run build:jsandbundle exec jekyll build(after dependency install) so regressions are caught before deploy.Document local setup pitfalls in
README.md. Add a short troubleshooting section for network-restricted gem install failures and required tools (ruby,bundler,jekyll,node,npm).Add linting/formatting for custom JS. Introduce ESLint + Prettier for
assets/js/*.jsto catch issues like implicit globals and keep style consistent.
