Skip to content

Commit 5bf1123

Browse files
authored
Merge pull request #3 from twz123/blog-title
Change blog title to "The Zero Friction Kubernetes Blog"
2 parents 1d75b30 + cc6f194 commit 5bf1123

File tree

9 files changed

+184
-35
lines changed

9 files changed

+184
-35
lines changed

.hugo_build.lock

Whitespace-only changes.

README.md

Lines changed: 53 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
# k0s Team Blog — Adding a post (Hugo)
1+
# The Zero Friction Kubernetes Blog
22

3-
This repo powers the k0s team blog using [Hugo](https://gohugo.io/). If you can open a PR, you can publish a post.
3+
The repository that powers the [k0sproject community blog][blog] static site.
4+
Built with [Hugo] and the [PaperMod] theme. If you can open a pull request, you
5+
can publish a post.
6+
7+
[blog]: https://blog.k0sproject.io/
8+
[Hugo]: https://gohugo.io/
9+
[PaperMod]: https://github.com/adityatelange/hugo-PaperMod
410

511
## Quick start
612

7-
1. Create a new post (Hugo leaf bundle with its own folder):
13+
1. Create a new post (Hugo "leaf bundle" with its own folder):
814

9-
```sh
10-
hugo new content/posts/my-post-title/index.md
11-
```
15+
```sh
16+
hugo new content/posts/my-post-title/index.md
17+
```
1218

1319
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:
1620

17-
```sh
18-
hugo server -D
19-
```
21+
3. Add any images/files into the **same folder** as the post (e.g.,
22+
`content/posts/my-post-title/diagram.png`).
2023

21-
5. When ready to publish, set `draft: false` and open a PR.
24+
4. Preview locally:
2225

23-
---
26+
```sh
27+
hugo server -D
28+
```
29+
30+
5. When ready to publish, set `draft: false` and open a pull request.
2431

2532
## Front matter (copy–paste)
2633

@@ -44,52 +51,66 @@ cover:
4451

4552
Write Markdown content **below** the front matter.
4653

47-
**Notes**
54+
Additional notes:
4855

4956
* `date` is ISO-8601; use UTC or your local time.
5057
* Leave `draft: true` while iterating; change to `false` to publish.
5158
* 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-
---
59+
* If the `summary` is omitted, the first paragraph in the article will be used
60+
as summary.
5561

5662
## Images & media
5763

58-
* Keep assets **inside the posts folder** (leaf bundle).
64+
* Keep assets **inside the post's folder** (leaf bundle).
5965
Example tree:
6066

61-
```
67+
```text
6268
content/blog/my-post-title/
6369
├─ index.md
6470
├─ cover.png
6571
└─ diagram.png
6672
```
73+
6774
* Reference them with relative paths:
6875

6976
```md
7077
![Control plane layout](./diagram.png)
7178
```
79+
7280
* Optional Hugo figure shortcode:
7381

7482
```md
7583
{{< figure src="diagram.png" caption="Control plane layout" >}}
7684
```
85+
7786
* Aim for small files (<1 MB). Add meaningful alt text.
7887

79-
---
88+
## Local development
89+
90+
Prerequisites:
8091

81-
## Local preview
92+
* Git (for cloning the repository and its submodule)
93+
* Hugo **extended** version (0.120.0 or newer recommended)
8294

8395
```sh
84-
hugo server -D
96+
git clone https://github.com/k0sproject/blog.git blog.k0sproject.io
97+
cd blog.k0sproject.io
98+
git submodule update --init --recursive
8599
```
86100

87-
* `-D` shows drafts.
88-
* Visit the URL Hugo prints and verify formatting, links, code blocks, and images.
101+
Start a live-reloading development server (Hugo watches for changes and
102+
refreshes the browser automatically):
89103

90-
---
104+
```sh
105+
hugo server --buildDrafts --buildFuture
106+
```
107+
108+
Visit <http://localhost:1313/> to preview the site. This approach ensures assets
109+
such as CSS are served correctly; loading `public/index.html` directly from the
110+
filesystem will usually miss theme assets because the site is built with the
111+
production `baseURL`.
91112

92-
## Pull Request checklist
113+
## Pull request checklist
93114

94115
* [ ] `title`, `date`, `author`, `summary` set
95116
* [ ] `draft: false` for publishing
@@ -98,11 +119,14 @@ hugo server -D
98119
* [ ] No broken relative paths
99120
* [ ] Post matches the tone and headings of existing posts
100121

101-
---
102-
103122
## Conventions
104123

105124
* **File/folder name**: use-kebab-case (`my-post-title`)
106125
* **Code blocks**: use fenced blocks with language hints (e.g., `sh`, `yaml`)
107-
* **Internal links**: prefer relative links within the repo
126+
* **Internal links**: prefer relative links within the repository
127+
128+
## License
108129

130+
Content and configuration are distributed under the Creative Commons
131+
Attribution-ShareAlike 4.0 International license. See `LICENSE` for the
132+
full text.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.custom-icon-social-k0sproject {
2+
display: inline-flex;
3+
align-items: center;
4+
}
5+
6+
.custom-icon-social-k0sproject > span {
7+
display: inline-flex;
8+
}
9+
10+
.custom-icon-social-k0sproject .icon-dark {
11+
display: none;
12+
}
13+
14+
body.dark .custom-icon-social-k0sproject .icon-light {
15+
display: none;
16+
}
17+
18+
body.dark .custom-icon-social-k0sproject .icon-dark {
19+
display: inline-flex;
20+
}

hugo.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
baseURL: https://blog.k0sproject.io/
22
languageCode: en
3-
title: k0s - The Kubernetes Distribution
3+
title: The Zero Friction Kubernetes Blog
44
theme: PaperMod
55
enableRobotsTXT: true
66
markup:
77
highlight:
88
noClasses: false
9-
copyright:
9+
copyright: >-
1010
Copyright &copy; 2023 k0sproject a Series of LF Projects, LLC.
1111
For website terms of use, trademark policy and other project policies please see [Linux Foundation policies](https://lfprojects.org/policies/).
1212
- All rights reserved.
@@ -17,13 +17,15 @@ params:
1717
showCodeCopyButtons: true
1818
showShareButtons: true
1919
descriptions: true
20-
author: k0s team
20+
author: k0sproject authors
2121
homeInfoParams:
22-
Title: k0s - The Kubernetes Distribution
23-
Content: The Official Blog of k0s Community
22+
Title: The Zero Friction Kubernetes Blog
23+
Content: Official blog of the k0sproject community
2424
socialIcons:
25-
- name: Website
25+
- name: k0s
2626
url: https://k0sproject.io
27+
- name: k0smotron
28+
url: https://k0smotron.io
2729
- name: GitHub
2830
url: https://github.com/k0sproject
2931
- name: X

layouts/partials/social_icons.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<div class="social-icons" {{ with .align }}align="{{ . }}" {{- end }}>
2+
{{- range site.Params.socialIcons }}
3+
{{- $icon := trim .name " " | lower -}}
4+
<a href="{{ trim .url " " | safeURL }}" target="_blank" rel="noopener noreferrer me"
5+
title="{{ (.title | default .name) | title }}">
6+
{{- if eq $icon "k0s" -}}
7+
<span class="custom-icon custom-icon-social-k0sproject">
8+
<span class="icon-light">{{- partial "svg/k0s-logo-light.svg" . -}}</span>
9+
<span class="icon-dark">{{- partial "svg/k0s-logo-dark.svg" . -}}</span>
10+
</span>
11+
{{- else if eq $icon "k0smotron" -}}
12+
<span class="custom-icon custom-icon-social-k0sproject">
13+
<span class="icon-light">{{- partial "svg/k0smotron-logo-light.svg" . -}}</span>
14+
<span class="icon-dark">{{- partial "svg/k0smotron-logo-dark.svg" . -}}</span>
15+
</span>
16+
{{- else -}}
17+
{{- partial "svg.html" . -}}
18+
{{- end -}}
19+
</a>
20+
{{- end }}
21+
</div>
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 14 additions & 0 deletions
Loading
Lines changed: 26 additions & 0 deletions
Loading
Lines changed: 28 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)