Skip to content

Commit 69fdac0

Browse files
authored
Merge pull request #1 from ncopa/add-readme
Update README.md
2 parents 12ccc91 + 7cff187 commit 69fdac0

File tree

1 file changed

+108
-1
lines changed

1 file changed

+108
-1
lines changed

README.md

Lines changed: 108 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,108 @@
1-
# blog.k0sproject.io
1+
# k0s Team Blog — Adding a post (Hugo)
2+
3+
This repo powers the k0s team blog using [Hugo](https://gohugo.io/). If you can open a PR, you can publish a post.
4+
5+
## Quick start
6+
7+
1. Create a new post (Hugo “leaf bundle” with its own folder):
8+
9+
```sh
10+
hugo new content/posts/my-post-title/index.md
11+
```
12+
13+
2. Open the generated file and fill in front matter (see below).
14+
3. Add any images/files into the **same folder** as the post (e.g., `content/posts/my-post-title/diagram.png`).
15+
4. Preview locally:
16+
17+
```sh
18+
hugo server -D
19+
```
20+
21+
5. When ready to publish, set `draft: false` and open a PR.
22+
23+
---
24+
25+
## Front matter (copy–paste)
26+
27+
```yaml
28+
---
29+
title: "Your Post Title"
30+
date: 2025-09-25T09:00:00Z
31+
author: "Your Name"
32+
tags: ["k0s", "kubernetes", "how-to"]
33+
draft: true
34+
cover:
35+
image: "cover.png" # relative to this post folder
36+
caption: "Image caption"
37+
# Optional
38+
# summary: "1–2 sentence summary for list pages."
39+
# description: "SEO description (140–160 chars)"
40+
# canonicalURL: "https://example.com/original"
41+
# categories: ["Engineering"]
42+
---
43+
```
44+
45+
Write Markdown content **below** the front matter.
46+
47+
**Notes**
48+
49+
* `date` is ISO-8601; use UTC or your local time.
50+
* Leave `draft: true` while iterating; change to `false` to publish.
51+
* Use `tags`/`categories` that already exist where possible.
52+
* If the `summary` is omitted, the first paragraph in the article will be used as summary.
53+
54+
---
55+
56+
## Images & media
57+
58+
* Keep assets **inside the post’s folder** (leaf bundle).
59+
Example tree:
60+
61+
```
62+
content/blog/my-post-title/
63+
├─ index.md
64+
├─ cover.png
65+
└─ diagram.png
66+
```
67+
* Reference them with relative paths:
68+
69+
```md
70+
![Control plane layout](./diagram.png)
71+
```
72+
* Optional Hugo figure shortcode:
73+
74+
```md
75+
{{< figure src="diagram.png" caption="Control plane layout" >}}
76+
```
77+
* Aim for small files (<1 MB). Add meaningful alt text.
78+
79+
---
80+
81+
## Local preview
82+
83+
```sh
84+
hugo server -D
85+
```
86+
87+
* `-D` shows drafts.
88+
* Visit the URL Hugo prints and verify formatting, links, code blocks, and images.
89+
90+
---
91+
92+
## Pull Request checklist
93+
94+
* [ ] `title`, `date`, `author`, `summary` set
95+
* [ ] `draft: false` for publishing
96+
* [ ] Images load; alt text present
97+
* [ ] Links/code blocks render correctly
98+
* [ ] No broken relative paths
99+
* [ ] Post matches the tone and headings of existing posts
100+
101+
---
102+
103+
## Conventions
104+
105+
* **File/folder name**: use-kebab-case (`my-post-title`)
106+
* **Code blocks**: use fenced blocks with language hints (e.g., `sh`, `yaml`)
107+
* **Internal links**: prefer relative links within the repo
108+

0 commit comments

Comments
 (0)