Thank you for your interest in contributing! This document provides guidelines for developing and contributing to this personal website.
- Write simple, readable code over clever solutions
- Avoid unnecessary abstractions
- Keep configuration minimal
- Prefer boring, proven technologies
- Make minimal changes to achieve the goal
- Each PR should address one specific issue
- Avoid refactoring unrelated code
- Keep commits focused and atomic
- Don't add features "just in case"
- Minimize dependencies
- Question whether new dependencies are truly necessary
- Keep the build process simple
- Node.js version 20 (specified in
.nvmrc) - npm (comes with Node.js)
-
Clone the repository
git clone https://github.com/benkutil/benkutil.github.io.git cd benkutil.github.io -
Install dependencies
npm install
-
Set up environment variables (optional)
cp .env.sample .env # Edit .env with your values if needed -
Start development server
npm start
The site will be available at
http://localhost:8080with hot-reload enabled. -
Build for production
npm run build:prod
src/- Source files for the website_includes/- Reusable templates and layouts_data/- Global data files
.eleventy.js- Main Eleventy configuration_config/- Additional configuration files (filters, shortcodes)
- Use existing layouts when possible
- Keep templates simple and focused
- Avoid complex logic in templates
- Place global data in
src/_data/ - Use JavaScript or JSON for data files
- Keep data structure flat when possible
- Add custom filters in
_config/filters.js - Add custom shortcodes in
_config/shortcode.js - Document any new filters or shortcodes
- Use the
imageshortcode for responsive images - Images are automatically optimized during build
- Place source images in appropriate directories
-
Local Testing
- Always test with
npm startbefore submitting - Check multiple pages to ensure no regressions
- Test in production mode with
npm run build:prod
- Always test with
-
Build Verification
- Ensure the build completes without errors
- Check that generated files look correct
- Verify no broken links or missing assets
- Check existing issues to avoid duplicates
- Open an issue to discuss significant changes
- Keep changes focused on a single concern
-
Create a branch
git checkout -b feature/your-feature-name
-
Make your changes
- Follow the engineering principles above
- Keep changes minimal and focused
- Write clear commit messages
-
Test thoroughly
- Run
npm startand verify changes locally - Run
npm run build:prodto ensure production build works - Check for any console errors or warnings
- Run
-
Submit your PR
- Use the PR template
- Reference related issues
- Provide clear description of changes
- Include screenshots for visual changes
-
Address feedback
- Respond to review comments
- Make requested changes promptly
- Keep the PR scope focused
- Use clear, descriptive commit messages
- Start with a verb in present tense (e.g., "Add", "Fix", "Update")
- Keep first line under 72 characters
- Add details in the body if needed
Example:
Add RSS feed for blog posts
- Configured eleventy-plugin-rss
- Created feed template
- Added feed link to layout
- Use consistent indentation (spaces as per existing code)
- Keep lines reasonably short
- Remove trailing whitespace
- End files with a newline
- Use ES6+ features appropriately
- Prefer
constoverlet, avoidvar - Use template literals for string interpolation
- Keep functions small and focused
- Follow existing CSS organization
- Avoid inline styles
- Use meaningful class names
- Keep specificity low
- Use proper heading hierarchy
- Include alt text for images
- Keep lines reasonably short for readability
- Question whether the dependency is truly necessary
- Check bundle size impact
- Verify the package is actively maintained
- Prefer packages with minimal dependencies
- Document why the dependency is needed
- Test thoroughly after updates
- Update one dependency at a time when possible
- Check for breaking changes in release notes
If you have questions or run into problems:
- Check existing issues and documentation
- Open a new issue with details about your question
- Be patient and respectful in all interactions
Thank you for contributing! 🎉