Skip to content

josephinealinea/my-jekyll-github

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

My Jekyll Blog

A personal blog built with Jekyll and hosted on GitHub Pages. Write your thoughts, share your experiences, and connect with others through markdown blog posts.

Features

  • Clean, responsive design using the Minima theme
  • Markdown support for easy blog post creation
  • Automatic RSS feed generation
  • SEO optimized with meta tags and structured data
  • GitHub Pages ready for easy deployment
  • Custom styling with SCSS

Quick Start Commands

πŸš€ Click to expand quick commands

Setup & Installation

# Clone repository
git clone https://github.com/yourusername/my-jekyll-github.git
cd my-jekyll-github

# Install dependencies
bundle install

# Run locally
bundle exec jekyll serve

# Build site
bundle exec jekyll build

# Clean and rebuild
bundle exec jekyll clean && bundle exec jekyll build

Development Commands

# Serve with live reload
bundle exec jekyll serve --livereload

# Serve on different port
bundle exec jekyll serve --port 4001

# Build with verbose output
bundle exec jekyll build --verbose

# Update dependencies
bundle update

Git Operations

# Add all changes
git add .

# Commit changes
git commit -m "Update blog content"

# Push to GitHub
git push origin main

# Check status
git status

Getting Started

Prerequisites

  • Ruby (2.4.0 or higher)
  • Jekyll (4.0 or higher)
  • Bundler

Installation

  1. Clone the repository

    git clone https://github.com/yourusername/my-jekyll-github.git
    cd my-jekyll-github
  2. Install dependencies

    bundle install
  3. Run the site locally

    bundle exec jekyll serve
  4. Open your browser Navigate to http://localhost:4000 to view your blog

Creating Blog Posts

New Post Structure

To create a new blog post:

  1. Create a new file in the _posts directory
  2. Name it with the format: YYYY-MM-DD-title.md
  3. Add front matter at the top:
---
layout: post
title: "Your Post Title"
date: YYYY-MM-DD HH:MM:SS +0000
categories: category1 category2
---
  1. Write your content in Markdown below the front matter

Example Post

---
layout: post
title: "My First Blog Post"
date: 2024-01-17 10:00:00 +0000
categories: personal thoughts
---

# Welcome to my blog!

This is my first blog post written in **Markdown**.

## Features

- Easy to write
- Great formatting
- Code support

```python
def hello_world():
    print("Hello, World!")

That's it! Your post will automatically appear on the blog.


## Customization

### Site Configuration

Edit `_config.yml` to customize:
- Site title and description
- Author information
- Social media links
- Base URL for GitHub Pages
- Theme settings

### Styling

Customize the appearance by editing:
- `assets/main.scss` - Main stylesheet
- `_layouts/` - Page layouts
- `_includes/` - Reusable components

### Adding Pages

Create new pages by adding markdown files with front matter:

```yaml
---
layout: page
title: "Page Title"
permalink: /page-url/
---

Deployment

GitHub Pages

  1. Push to GitHub

    git add .
    git commit -m "Initial blog setup"
    git push origin main
  2. Enable GitHub Pages

    • Go to your repository settings
    • Navigate to Pages section
    • Select source branch (usually main)
    • Your site will be available at https://yourusername.github.io/jekyll-github

Custom Domain

To use a custom domain:

  1. Add your domain to _config.yml
  2. Create a CNAME file in the root directory
  3. Configure DNS settings with your domain provider

File Structure

jekyll-github/
β”œβ”€β”€ _config.yml          # Site configuration
β”œβ”€β”€ _layouts/            # Page layouts
β”‚   β”œβ”€β”€ default.html     # Default layout
β”‚   └── post.html        # Blog post layout
β”œβ”€β”€ _includes/           # Reusable components
β”‚   β”œβ”€β”€ head.html        # Head section
β”‚   β”œβ”€β”€ header.html      # Navigation header
β”‚   └── footer.html      # Site footer
β”œβ”€β”€ _posts/              # Blog posts (markdown files)
β”œβ”€β”€ assets/              # CSS, JS, images
β”‚   └── main.scss        # Main stylesheet
β”œβ”€β”€ index.html           # Homepage
β”œβ”€β”€ about.md             # About page
β”œβ”€β”€ Gemfile              # Ruby dependencies
└── README.md            # This file

Troubleshooting

Common Issues

  1. Port already in use

    bundle exec jekyll serve --port 4001
  2. Dependencies not found

    bundle update
  3. Build errors

    bundle exec jekyll build --verbose

Getting Help

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Submit a pull request

License

This project is open source and available under the MIT License.

Support

If you have questions or need help:

  • Open an issue on GitHub
  • Check the documentation
  • Join the Jekyll community

Happy blogging! πŸš€

2. Gitignore and File Management

Here's the .gitignore file you should create:

# Jekyll build output
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ruby dependencies
.bundle/
vendor/

# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db

# IDE files
.vscode/
.idea/
*.swp
*.swo
*~

# Logs
*.log

# Temporary files
*.tmp
*.temp

# Environment files
.env
.env.local
.env.*.local

# Node modules (if using any Node.js tools)
node_modules/
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Backup files
*.bak
*.backup

Files You SHOULD Commit to GitHub:

βœ… Source files (always commit):

  • _config.yml - Site configuration
  • _layouts/ - Page layouts
  • _includes/ - Reusable components
  • _posts/ - Blog posts
  • assets/ - Source stylesheets and images
  • index.html - Homepage
  • about.md - About page
  • Gemfile - Ruby dependencies
  • README.md - Documentation
  • .gitignore - Git ignore rules

Files You SHOULD NOT Commit:

❌ Never commit these:

  • _site/ - Generated HTML (Jekyll builds this)
  • .sass-cache/ - Sass compilation cache
  • .jekyll-cache/ - Jekyll build cache
  • .bundle/ - Bundler cache
  • vendor/ - Ruby gems
  • Gemfile.lock - Lock file (controversial, but generally not needed for Jekyll sites)
  • .DS_Store - macOS system files
  • IDE configuration files
  • Log files
  • Environment files

Why This Matters:

  1. _site/ - This is generated by Jekyll and should be rebuilt on each deployment
  2. Cache files - These are temporary and machine-specific
  3. Dependencies - Should be installed fresh on each deployment
  4. System files - Not relevant to your project

Deployment Workflow:

  1. Local development:

    bundle exec jekyll serve
  2. Commit source files:

    git add .
    git commit -m "Update blog content"
    git push origin main
  3. GitHub Pages automatically:

    • Builds your site from source
    • Ignores _site/ and other generated files
    • Deploys the built version

This setup ensures your repository stays clean with only source code, while GitHub Pages handles the build process automatically!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published