My personal blog site lives here, kindly hosted by GitHub Pages.
Follow @OwlCoder for new posts.
My life in code language:
void LifeLoop()
{
Code();
Family();
Fun();
}
.NightOwlCoder
- Static Site Generator: Jekyll 3.x
- Theme: jekyll-theme-hacker
- Hosting: GitHub Pages
- Comments: Disqus
- Analytics: Google Analytics
- Plugins:
- jekyll-feed (RSS)
- jekyll-seo-tag (SEO optimization)
- jekyll-paginate (Pagination)
- jekyll-sitemap (Sitemap generation)
NightOwlCoder.github.io/
βββ _config.yml # Site configuration
βββ _posts/ # Blog posts (Markdown files)
βββ _pages/ # Static pages
β βββ 404.md # Error page
β βββ about.md # About page
β βββ archive.md # Posts archive
βββ _layouts/ # Page templates
β βββ default.html # Base layout
β βββ page.html # Static pages
β βββ post.html # Blog posts
βββ _includes/ # Reusable components
β βββ header.html
β βββ footer.html
β βββ head.html
β βββ analytics.html
β βββ disqus_comments.html
βββ _sass/ # Custom styles (SCSS)
βββ assets/ # Images and media files
βββ css/ # Main stylesheet
βββ index.html # Homepage
βββ Gemfile # Ruby dependencies
βββ README.md # This file
βββ AGENT.md # AI agent instructions
- Ruby 2.5+ installed
- Bundler gem installed (
gem install bundler)
- Clone the repository:
git clone https://github.com/NightOwlCoder/NightOwlCoder.github.io.git
cd NightOwlCoder.github.io- Install dependencies:
bundle install- Run the development server:
bundle exec jekyll serve- Open your browser to
http://localhost:4000
The site will auto-regenerate when you make changes to files.
-
Create a new file in the
_posts/directory with the naming convention:YYYY-MM-DD-title-slug.mdExample:
2024-01-15-my-awesome-post.md -
Add front matter at the top of the file:
--- layout: post title: "Your Post Title" date: 2024-01-15 20:00:00 -0800 categories: category1 category2 category3 ---
-
Write your content in Markdown below the front matter
-
Add images to the
assets/folder and reference them:
-
Commit and push to GitHub:
git add . git commit -m "Add new blog post: Your Post Title" git push origin master
GitHub Pages will automatically build and deploy your changes within a few minutes.
See AGENT.md for detailed instructions on how to use an AI assistant to create blog posts.
- Place image files in the
assets/directory - Reference images in your posts using relative paths:

- Optionally resize images:
{:width="350px"}
Edit _config.yml to customize:
- Site title and description
- Social media links
- Google Analytics ID
- Disqus shortname
- Pagination settings
- Modify SCSS files in
_sass/directory - Edit
css/main.scssto import custom styles
- Edit HTML templates in
_layouts/ - Modify reusable components in
_includes/
---
layout: post # Required: Always 'post'
title: "Your Title" # Required: Post title
date: YYYY-MM-DD HH:MM:SS -0800 # Required: Publication date
categories: cat1 cat2 # Optional: Post categories
excerpt: "Short summary" # Recommended: Used for auto-tweet and previews
image: /assets/post-image.png # Optional: Custom social media preview image
comments: true # Optional: Enable/disable Disqus comments
---π¦ Automatic Twitter Posting
When you push a new blog post to GitHub, it automatically posts to @OwlCoder with:
- Post title
- Custom excerpt (if provided)
- Link to the full post
- Preview card with image
Setup Requirements:
- Twitter API credentials configured in GitHub Secrets
- See
docs/X-API-SETUP-GUIDE.mdfor setup instructions - See
docs/AUTO-TWEET-SUMMARY.mdfor complete documentation
Best Practices:
- Always include an
excerpt:field for better tweet text - Add an
image:field for custom preview images (optional) - Without custom image, defaults to NightOwlCoder logo
- Keep excerpts under 150 characters for best results
Main site configuration including:
- Site metadata (title, description, URLs)
- Jekyll settings (theme, plugins)
- Pagination configuration
- Social media links
- Analytics and comments configuration
Ruby gem dependencies for Jekyll and plugins
This site automatically deploys via GitHub Pages when you push to the master branch.
No manual deployment steps required!
- β Responsive design
- β Syntax highlighting for code blocks
- β Pagination (4 posts per page)
- β
RSS feed at
/atom.xml - β SEO optimized
- β Google Analytics integration
- β Disqus comments
- β Twitter integration
- β Sitemap generation
bundle update
bundle installClear the cache:
bundle exec jekyll clean
bundle exec jekyll serve- Wait 2-5 minutes for GitHub Pages to rebuild
- Check the Actions tab in your GitHub repository for build status
- Ensure
_config.ymlis valid YAML
Content is copyrighted. Code structure follows Jekyll's standard MIT license.
Built with β€οΈ using Jekyll and hosted on GitHub Pages