Matas Petrikas

Product Developer, Author & Electronic Music Creator

Blog Publishing Guide

This guide explains how to publish blog articles on your website.

Overview

The blog system uses Jekyll, a static site generator that converts Markdown files into HTML pages. Blog posts are stored in the _posts directory and automatically appear on the blog landing page at /blog/.

Creating a New Blog Post

1. File Naming Convention

Blog posts must follow this naming convention:

YYYY-MM-DD-title-of-post.md

Examples:

The date in the filename determines the post’s publication date.

2. File Location

All blog posts must be placed in the _posts directory at the root of the repository.

3. Front Matter

Every blog post must start with YAML front matter (metadata between triple dashes). Here’s the basic template:

---
layout: default
title: "Your Post Title"
date: 2025-01-15
excerpt: "A brief summary of your post that appears on the blog landing page. Keep it concise and engaging."
---

Your blog post content starts here...

Front Matter Fields:

4. Writing Your Post

After the front matter, write your content in Markdown format. The site uses Kramdown, which supports:

5. Example Blog Post

Create a file named 2025-01-15-welcome-to-my-blog.md in the _posts directory:

---
layout: default
title: "Welcome to My Blog"
date: 2025-01-15
excerpt: "Introducing my new blog where I'll share thoughts on product development, electronic music, and technology."
---

# Welcome!

I'm excited to launch this blog where I'll be sharing my thoughts and experiences on:

- Product development and management
- Electronic music production
- Technology and software engineering
- My journey building projects like Vai Kai and Dangė Records

## What to Expect

I'll be posting regularly about topics that interest me and hopefully interest you too. Stay tuned for more content!

You can always reach out to me via [email](mailto:matas.petrikas@gmail.com) if you have any questions or feedback.

Publishing Workflow

  1. Create your markdown file in _posts/ with the correct naming convention
  2. Add front matter with title, date, and excerpt
  3. Write your content in Markdown
  4. Commit your changes: git add _posts/your-post.md && git commit -m "Add new blog post"
  5. Push to GitHub: git push origin main
  6. Wait for GitHub Pages to rebuild (usually takes 1-2 minutes)
  7. Visit your blog at https://petrikas.de/blog/ to see your new post

Tips

Working with Drafts

Jekyll supports draft posts that you can work on without publishing them immediately. Drafts are stored in the _drafts directory.

Creating a Draft

  1. Create a new markdown file in the _drafts directory
  2. No date needed in the filename - just use title-of-draft.md
  3. Add front matter (title and optional excerpt, but no date)

Example draft file: _drafts/my-thoughts-on-ai.md

---
layout: default
title: "My Thoughts on AI"
excerpt: "Work in progress on artificial intelligence and creativity"
---

Draft content goes here...

Previewing Drafts Locally

To preview your drafts locally:

bundle exec jekyll serve --drafts

This will show drafts on your local blog as if they were published (using the current date).

Publishing a Draft

When you’re ready to publish a draft:

  1. Add a date to the front matter
  2. Rename the file to include the date: YYYY-MM-DD-title.md
  3. Move it from _drafts/ to _posts/
  4. Commit and push

Note: Drafts in _drafts/ will not appear on your live blog - they’re only visible when running Jekyll with the --drafts flag.

Blog Landing Page

The blog landing page is located at blog.html and automatically displays all posts from the _posts directory in reverse chronological order (newest first). Each post shows:

Need Help?