Personal blog generated by jekyll on github pages
- Jekyll 4.4.1 - Static site generator
- GitHub Pages - Hosting and deployment
- SCSS/Sass - CSS preprocessing
- Markdown - Content authoring
- HTMLHint & Stylelint - Code quality
- Google Analytics - Traffic tracking
- GitHub Actions - Automated workflows
- Ruby 2.7+ (recommend 3.x via Homebrew:
brew install ruby) - Node.js and npm
# Install Ruby dependencies
bundle install
# Install Node dependencies
npm install# Start local server with drafts (http://127.0.0.1:4000)
bundle exec jekyll serve --drafts
# Or use npm script
npm run jekyll:serve
# Build site without serving
bundle exec jekyll buildThis project uses HTMLHint and Stylelint for code quality. A pre-commit hook automatically runs linters before committing.
npm run lint- Run HTML lintingnpm run lint:scss- Run SCSS lintingnpm run lint:scss:fix- Auto-fix SCSS issues
Configuration:
- HTML rules:
.htmlhintrc - SCSS rules:
.stylelintrc.json
Automated code quality checks run before each commit:
Husky (.husky/pre-commit):
- HTML and SCSS linting
pre-commit (.pre-commit-config.yaml):
- Post filename validation (kebab-case)
Post filenames must follow the format: YYYY-MM-DD-kebab-case-title.markdown
Commands:
pre-commit run --all-files- Run all pre-commit hooks manuallynpm run prepare- Reinstall Husky hooks after changes--no-verifyflag - Skip hooks temporarily
Create blog posts from anywhere using GitHub Issues:
-
Create a new issue:
- Open GitHub mobile app
- Navigate to repository and tap "+" for new issue
- Title: Your post title
- Body: Your post content in markdown
-
Add tags (optional):
- Include line:
Tags: tag1, tag2in the issue body
- Include line:
-
Working with drafts:
- Create issue without the "new-post" label
- Continue editing until ready
- Add the "new-post" label when ready to publish
-
Publish post:
- First create the issue WITHOUT the "new-post" label
- Add the "new-post" label when ready to publish
- Workflow creates properly formatted post file
- Issue is automatically closed with link to published post
-
Edit existing posts:
- Navigate to
_postsfolder in GitHub - Edit the markdown file directly
- Navigate to
Images are automatically optimized when added or modified in the repository:
-
How it works:
- GitHub Actions workflow runs whenever images are added or modified
- Uses the Calibre image optimization engine to compress images
- JPEG and PNG files are compressed to 80% quality (good balance of size/quality)
- Optimized images are automatically committed back to the repository
-
Adding images:
- Place images in the
assetsfolder - Reference in posts using markdown:
 - Optimization happens automatically on commit
- Place images in the
-
Manual optimization:
- You can manually trigger optimization by running the workflow from the Actions tab
- Select the "optimize-images" workflow and click "Run workflow"
Broken links are automatically checked:
- Runs weekly (Sundays at midnight)
- Runs on pushes to main that modify posts or pages
- Creates a GitHub issue if broken links are found
Pull requests are automatically validated:
- Jekyll build is tested on every PR
- Ensures site builds successfully before merging