Snabbreferens för att konfigurera och publicera statiska Jekyll-webbplatser med GitHub Pages.
Katalogstruktur
.
├── _config.yml # Webbplatskonfiguration
├── _includes/ # Återanvändbara mallfragment
├── _layouts/ # Grundläggande sidlayouter
├── _posts/ # Blogginlägg (YYYY-MM-DD-title.md)
├── _sass/ # SASS / SCSS-stilfragment
├── assets/ # Bilder, kompilerade stilar, JS
└── index.md # Startsidans innehåll
Konfiguration (_config.yml)
title: My Documentation
description: Quick reference cheatsheets
baseurl: "/my-repo"
url: "https://username.github.io"
# Beroenden för GitHub Pages
plugins:
- jekyll-feed
- jekyll-seo-tag
- jekyll-sitemap
markdown: kramdown
theme: minima
Frontmatter-huvud
---
layout: post
title: "Getting Started with Jekyll"
date: 2026-10-25 12:00:00 +0000
categories: [development, tools]
tags: [jekyll, static-site]
---
Liquid mallhjälpare
Utdata och variabler
{{ site.title }}
{{ page.title }}
{{ content }}
Villkor och loopar
{% if page.comments %}
{% include comments.html %}
{% endif %}
<ul>
{% for post in site.posts limit:5 %}
<li><a href="{{ post.url | relative_url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
Lokal testning
# Installera beroenden
bundle install
# Starta lokal utvecklingsserver med live reload
bundle exec jekyll serve --livereload