Deep-MI Website - Quick Reference
# First time setup
gem install bundler --user-install
bundle install
# Run locally
bundle exec jekyll serve
# Visit: http://localhost:4000
# Validate before committing
./scripts/validate_yaml.rb
./scripts/validate_posts.sh
Create: _posts/YYYY-MM-DD-Title.md
Copy template from: _templates/post-template.md
Add images to: /static/img/
Validate: ./scripts/validate_posts.sh
Prepare photo: 365×365px, JPG
Optimize: ./scripts/optimize_images.sh member photo.jpg
Save to: /static/img/members/lastname.jpg
Add entry to: _data/members.yml (see _templates/member-template.md)
Validate: ./scripts/validate_yaml.rb
Prepare teaser: Max 200px height, JPG, max 100KB
Optimize: ./scripts/optimize_images.sh pub image.jpg
Save files:
Image: /static/pub/id.jpg
BibTeX: /static/pub/id.bib
PDF (optional): /static/pub/id.pdf
Add entry to: _data/publications.yml (see _templates/publication-template.md)
Validate: ./scripts/validate_yaml.rb
Content Type
Data File
Assets
Template
News Posts
_posts/*.md
/static/img/
_templates/post-template.md
Members
_data/members.yml
/static/img/members/
_templates/member-template.md
Publications
_data/publications.yml
/static/pub/
_templates/publication-template.md
Alumni
_data/alumni.yml
-
-
Visitors
_data/visitors.yml
-
-
Type
Size
Format
Max Size
Member Photo
365×365px, 72 DPI
JPG
100KB
Publication Teaser
Max 200px height
JPG
100KB
Post Images
Reasonable
JPG/PNG
500KB
# YAML data files (members, publications, etc.)
./scripts/validate_yaml.rb
# Post filename format (YYYY-MM-DD-title.md)
./scripts/validate_posts.sh
# Image optimization
./scripts/optimize_images.sh member < file>
./scripts/optimize_images.sh pub < file>
bundle install
bundle update
# Install correct Ruby version
rbenv install 3.1.0
rbenv local 3.1.0
Check indentation (2 spaces)
Use single quotes for strings
Escape quotes: Alzheimer''s (two single quotes)
Required fields must be present
# Optimize automatically (requires ImageMagick)
./scripts/optimize_images.sh member static/img/members/photo.jpg
./scripts/optimize_images.sh pub static/pub/teaser.jpg
Install ImageMagick :
macOS: brew install imagemagick
Linux: sudo apt-get install imagemagick or sudo yum install imagemagick
Windows: imagemagick.org
# Full build and test
bundle exec jekyll build
bundle exec htmlproofer ./_site --disable-external
# Clean build
bundle exec jekyll clean
bundle exec jekyll build
# Update dependencies
bundle update
# Install pre-commit hook
cp scripts/pre-commit.sh .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit
Check CONTRIBUTING.md for detailed guidelines
Review templates in _templates/
See existing examples in data files
Contact lab web administrator