Personal blog and portfolio site built with Jekyll and hosted on GitHub Pages.
This repository contains the source code for the blog, which is automatically built and published by GitHub Pages whenever changes are pushed to the master branch.
- Ruby 2.7+ (check with
ruby --version) - Bundler gem (install with
gem install bundler)
-
Clone the repository:
git clone https://github.com/davidslv/davidslv.github.com.git cd davidslv.github.com -
Install dependencies:
bundle install
-
Start the Jekyll development server:
bundle exec jekyll serve -P 3333 -
View the site: Open your browser to http://localhost:3333
The site will automatically rebuild when you make changes to source files.
-
Create a new file in
_posts/directory:- Filename format:
YYYY-MM-DD-post-title.markdown - Example:
2025-11-05-my-new-post.markdown
- Filename format:
-
Add front matter (YAML header):
--- layout: post title: "Your Post Title" date: 2025-11-05 21:40:00 categories: ruby development tags: [ruby rails performance] --- Your post content starts here...
-
Write your content in Markdown:
- Use standard Markdown syntax
- Code blocks are supported with syntax highlighting
- Mermaid diagrams are supported (see below)
layout: Always usepostfor blog poststitle: The post title (displayed in browser and post heading)date: Publication date (format:YYYY-MM-DD HH:MM:SS)categories: Space-separated categories (determines URL structure)tags: Array of tags for categorization
This blog supports Mermaid.js diagrams. Include them in your posts using code blocks:
```mermaid
graph TB
A[Start] --> B[Process]
B --> C[End]
```The diagrams will automatically render when the page loads. See the Mermaid documentation for all diagram types.
.
βββ _config.yml # Jekyll configuration
βββ _includes/ # Reusable HTML components
β βββ head.html # HTML head (includes Mermaid.js)
β βββ header.html # Site header
β βββ footer.html # Site footer
βββ _layouts/ # Page templates
β βββ default.html # Default layout
β βββ page.html # Static page layout
β βββ post.html # Blog post layout
βββ _posts/ # Blog posts (markdown files)
βββ _sass/ # SCSS stylesheets
β βββ _base.scss # Base styles
β βββ _layout.scss # Layout styles (includes Mermaid styling)
β βββ _syntax-highlighting.scss
βββ css/ # Main stylesheet entry point
β βββ main.scss
βββ img/ # Images and assets
βββ about.md # About page
βββ index.html # Homepage
βββ feed.xml # RSS feed
βββ CNAME # Custom domain configuration
βββ Gemfile # Ruby dependencies
βββ README.md # This file
GitHub Pages automatically builds and publishes this site when you push changes to the master branch:
-
Push to GitHub:
git add . git commit -m "Your commit message" git push origin master
-
GitHub Pages automatically:
- Detects the push to
masterbranch - Runs
bundle installto install dependencies - Runs
bundle exec jekyll buildto build the site - Publishes the
_site/directory to the web - Site is live at
https://davidslv.github.io(or your custom domain)
- Detects the push to
-
Build Status:
- Check build status in the "Actions" tab of your GitHub repository
- Build logs show any errors or warnings
- Typical build time: 1-3 minutes
The site is configured to use a custom domain (davidslv.uk):
- The
CNAMEfile specifies the custom domain - DNS must be configured to point to GitHub Pages
- SSL certificate is automatically provisioned by GitHub
To build the site locally without running the server:
bundle exec jekyll buildThis generates the _site/ directory with static HTML files. Note: The _site/ directory is not committed to git (it's build output).
# Start development server with auto-reload
bundle exec jekyll serve
# Start with drafts visible
bundle exec jekyll serve --drafts
# Start with future-dated posts
bundle exec jekyll serve --futureDependencies are managed via Gemfile:
- github-pages: Includes Jekyll and all plugins supported by GitHub Pages
- Automatically locks to versions compatible with GitHub Pages
Update dependencies:
bundle updateSite settings are in _config.yml:
- Site title, description, and author info
- Base URL and domain
- Markdown processor (kramdown)
- Social media links
Important: After changing _config.yml, restart the Jekyll server.
- β Markdown-based content - Write posts in Markdown
- β Mermaid diagrams - Visual diagrams in blog posts
- β Syntax highlighting - Code blocks with syntax highlighting
- β RSS feed - Automatic RSS feed generation
- β Responsive design - Mobile-friendly layout
- β
Custom domain - Configured for
davidslv.uk - β Category-based URLs - Posts organized by category
- β Tag support - Tag posts for better organization
- Ensure Ruby and Bundler are installed
- Run
bundle installto install dependencies - Check Ruby version compatibility (2.7+)
- Restart the Jekyll server after changing
_config.yml - Clear browser cache (hard refresh: Cmd+Shift+R / Ctrl+Shift+R)
- Check for build errors in terminal output
- Check browser console for JavaScript errors
- Ensure Mermaid.js CDN is accessible
- Verify code block syntax:
```mermaid(with language specified)
- Check GitHub Actions tab for build logs
- Ensure
GemfileandGemfile.lockare committed - Verify Jekyll version compatibility with GitHub Pages
All content and code in this repository are the property of the author unless otherwise stated.
This is a personal blog repository. If you find issues or have suggestions, feel free to open an issue or submit a pull request.
Built with β€οΈ using Jekyll and GitHub Pages