26 Commits

Author SHA1 Message Date
b242484521 Merge branch 'main' into renovate/all
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
2023-07-26 22:52:49 +00:00
d9212bc373 feat: with renovate match
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-27 00:47:14 +02:00
4b1b76794e fix(deps): update all dependencies
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
2023-07-26 22:39:30 +00:00
8a60a60134 feat: with images
All checks were successful
continuous-integration/drone/push Build is passing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-27 00:29:04 +02:00
9a24f10522 feat: with password
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:58:39 +02:00
bb147f28f6 feat: fallible dotenv
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:54:41 +02:00
6b83d44777 feat: back to gnu
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:52:13 +02:00
43780b28cb feat: trying with ldd
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:50:09 +02:00
8aa72cc61d feat: set proper path
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:48:04 +02:00
809c93f529 feat: add musl tools
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:45:47 +02:00
ef0638087a feat: add unknown linux musl
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:43:32 +02:00
8d8db8de54 feat: add deps
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:40:25 +02:00
fa61414c65 feat: trying another form of execution
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:36:37 +02:00
b2509dc893 feat: get sum
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:35:27 +02:00
cc0ce69084 feat: add debugging
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:32:18 +02:00
111487760b feat: fix path
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:30:38 +02:00
66fc0c9895 feat: add drone
Some checks failed
continuous-integration/drone/push Build is failing
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-24 10:26:55 +02:00
6cb913bb1f feat: update
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-11 12:12:47 +02:00
7aed882368 feat: with mastodon
Signed-off-by: kjuulh <contact@kjuulh.io>
2023-07-11 10:58:31 +02:00
b172be0276 Merge pull request 'Configure Renovate' (#6) from renovate/configure into main
Reviewed-on: https://git.front.kjuulh.io/kjuulh/kasperhermansen-blog/pulls/6
2023-05-19 18:51:10 +00:00
4292d067ae Add renovate.json 2023-04-11 14:40:45 +00:00
9dd7daaf00 feat: add canonical header 2023-04-11 16:20:30 +02:00
a0c5f8facf feat: updated 2023-04-09 12:27:51 +02:00
201fcdb0eb feat: add meta tags 2023-04-05 01:05:26 +02:00
7f0d854d33 chore: update dagger_sdk 2023-04-05 00:44:51 +02:00
4828b83c23 Merge pull request 'Add zola' (#5) from feat/zola into main
Reviewed-on: https://git.front.kjuulh.io/kjuulh/kasperhermansen-blog/pulls/5
2023-04-03 00:49:41 +00:00
14 changed files with 589 additions and 659 deletions

68
.drone.yml Normal file
View File

@@ -0,0 +1,68 @@
type: docker
kind: pipeline
name: "shuttle-drone-templates"
steps:
- name: "wait for dind"
image: docker:dind
volumes:
- name: dockersock
path: /var/run
environment:
DOCKER_BUILDKIT: 1
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
commands:
- ls /var/run
- set -eu
- sleep 10
- echo "$${DOCKER_PASSWORD}" | docker login --password-stdin --username="$${DOCKER_USERNAME}"
- name: "build"
image: docker.io/kasperhermansen/shuttle-drone:1690329880340
volumes:
- name: dockersock
path: /var/run
environment:
DOCKER_BUILDKIT: 1
DOCKER_PASSWORD:
from_secret: docker_password
DOCKER_USERNAME:
from_secret: docker_username
DRONE_TOKEN:
from_secret: drone_token
SSH_KEY:
from_secret: gitea_id_ed25519
GIT_USERNAME:
from_secret: GIT_USERNAME
GIT_PASSWORD:
from_secret: GIT_PASSWORD
commands:
- set -eu
- apt update && apt install -y libssl-dev pkg-config openssl # musl-tools
- eval `ssh-agent`
- mkdir -p ~/.ssh
- echo "$SSH_KEY" | base64 -d > ~/.ssh/id_ed25519
- chmod -R 600 ~/.ssh
- ssh-add
- echo "$DOCKER_PASSWORD" | docker login --password-stdin --username="$DOCKER_USERNAME" docker.io
#- rustup target add x86_64-unknown-linux-musl
- cd ci || exit 1
- cargo build
- cd - || exit 1
# - sha1sum ci/target/x86_64-unknown-linux-musl/debug/ci
# - ldd ci/target/x86_64-unknown-linux-musl/debug/ci
# - "./ci/target/x86_64-unknown-linux-musl/debug/ci"
- sha1sum ci/target/debug/ci
- ldd ci/target/debug/ci
- "./ci/target/debug/ci"
services:
- name: docker
image: docker:dind
privileged: true
volumes:
- name: dockersock
path: /var/run
volumes:
- name: dockersock
temp: {}

996
ci/Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,10 +6,10 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
chrono = "0.4.24"
chrono = "0.4.26"
color-eyre = "0.6.2"
dagger-sdk = "0.2.19"
dagger-sdk = "0.2.22"
eyre = "0.6.8"
tokio = { version = "1.27.0", features = ["full"] }
tokio = { version = "1.29.1", features = ["full"] }
tokio-scoped = "0.2.0"
dotenv = "0.15.0"

View File

@@ -5,7 +5,7 @@ use tokio::sync::Mutex;
#[tokio::main]
async fn main() -> eyre::Result<()> {
dotenv::dotenv().unwrap();
let _ = dotenv::dotenv();
let client = dagger_sdk::connect().await?;
let src = client.host().directory_opts(
@@ -34,10 +34,12 @@ async fn main() -> eyre::Result<()> {
let tag = chrono::Utc::now().timestamp();
let github_zola_download = format!("https://github.com/barnumbirr/zola-debian/releases/download/v{zola_version}/zola_{zola_version}_{debian_platform}_{debian_edition}.deb");
let pull_articles_docker_image = "docker.io/kasperhermansen/pull-articles:1690403944";
let update_deployments_docker_image = "docker.io/kasperhermansen/update-deployment:1690401410";
let pull_articles = client
.container()
.from("docker.io/kasperhermansen/pull-articles:1680482220")
.from(pull_articles_docker_image)
.with_exec(vec!["echo", &format!("{}", tag)])
.with_env_variable("GIT_USERNAME", "kjuulh")
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
@@ -49,8 +51,9 @@ async fn main() -> eyre::Result<()> {
"areas/blog/posts",
"--out",
"/mnt/posts",
"--static-out=/mnt/static",
])
.directory("/mnt/posts");
.directory("/mnt/");
let dist_dir = client
.container_opts(
@@ -71,7 +74,14 @@ async fn main() -> eyre::Result<()> {
])
.with_workdir("/app")
.with_directory(".", src.id().await?)
.with_directory("content/posts", pull_articles.id().await?)
.with_directory(
"content/posts",
pull_articles.directory("posts").id().await?,
)
.with_directory(
"static/assets",
pull_articles.directory("static").id().await?,
)
.with_file(
"content/posts/_index.md",
src.file("content/posts/_index.md").id().await?,
@@ -129,7 +139,7 @@ async fn main() -> eyre::Result<()> {
let update_deployment = client
.container()
.from("kasperhermansen/update-deployment:1680472594")
.from(update_deployments_docker_image)
.with_env_variable("GIT_USERNAME", "kjuulh")
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
.with_exec(vec![

View File

@@ -1,5 +1,6 @@
# The URL the site will be built for
base_url = "https://blog.kasperhermansen.com"
generate_feed = true
[markdown]
# Whether to do syntax highlighting

0
content/images/.gitkeep Normal file
View File

View File

@@ -15,7 +15,7 @@ commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa
proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia
eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim.
Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa
duis.
duis.<!-- more -->
Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim
labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi

14
renovate.json Normal file
View File

@@ -0,0 +1,14 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"regexManagers": [
{
"fileMatch": [
"^main.rs$"
],
"matchStrings": [
"let.*docker_image.*\"(?<depName>.*):(?<version>.*)\";"
],
"datasourceTemplate": "docker"
}
]
}

BIN
static/images/kjuulh.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 KiB

View File

@@ -594,6 +594,10 @@ html,
margin-right: auto;
}
.mt-auto {
margin-top: auto;
}
.block {
display: block;
}
@@ -606,6 +610,14 @@ html,
display: list-item;
}
.h-6 {
height: 1.5rem;
}
.w-6 {
width: 1.5rem;
}
.max-w-3xl {
max-width: 48rem;
}
@@ -618,12 +630,32 @@ html,
place-content: space-around;
}
.justify-center {
justify-content: center;
}
.space-x-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-x-reverse: 0;
margin-right: calc(1rem * var(--tw-space-x-reverse));
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
}
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}
.space-y-6 > :not([hidden]) ~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}
.bg-cover {
background-size: cover;
}
.px-4 {
padding-left: 1rem;
padding-right: 1rem;
@@ -634,6 +666,11 @@ html,
padding-bottom: 0.5rem;
}
.py-3 {
padding-top: 0.75rem;
padding-bottom: 0.75rem;
}
.py-8 {
padding-top: 2rem;
padding-bottom: 2rem;
@@ -644,6 +681,11 @@ html,
line-height: 2.25rem;
}
.text-gray-300 {
--tw-text-opacity: 1;
color: rgb(209 213 219 / var(--tw-text-opacity));
}
.text-peach {
--tw-text-opacity: 1;
color: rgba(var(--ctp-peach), var(--tw-text-opacity));
@@ -2082,3 +2124,26 @@ html,
.blog-summary > p:first-child {
margin-top: 0px;
}
.custom-icon {
display: inline-block;
font-size: inherit;
height: 1em;
overflow: visible;
vertical-align: -0.125em;
fill: currentColor;
}
.gitea {
background-image: url(https://git.front.kjuulh.io/assets/img/logo.svg);
}
.hover\:text-gray-900:hover {
--tw-text-opacity: 1;
color: rgb(17 24 39 / var(--tw-text-opacity));
}
.hover\:text-orange-400:hover {
--tw-text-opacity: 1;
color: rgb(251 146 60 / var(--tw-text-opacity));
}

View File

@@ -43,3 +43,16 @@
.blog-summary > p:first-child {
@apply mt-0;
}
.custom-icon {
display: inline-block;
font-size: inherit;
height: 1em;
overflow: visible;
vertical-align: -0.125em;
fill: currentColor;
}
.gitea {
background-image: url(https://git.front.kjuulh.io/assets/img/logo.svg);
}

View File

@@ -6,19 +6,59 @@
<head>
<meta charset="utf-8">
<title>kasperhermansen</title>
<title>kasperhermansen | {% block title %}{% endblock title %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="{{ get_url(path="styles/styles.css") | safe }}" />
{{ post_macros::styles() }}
<script defer data-domain="blog.kasperhermansen.com" src="https://plausible.front.kjuulh.io/js/script.js"></script>
<meta name="description" content="Kasper Hermansen's blog is a hub of insights on platform engineering. ">
<meta name="keywords" content="Kasper Hermansen, kjuulh, blog, technology, platform engineering, cloud native">
<meta property="og:title" content="Kasper Hermansen's blog is a hub of insights on platform engineering">
<meta property="og:description" content="Kasper Hermansen's blog is a hub of insights on platform engineering">
<meta property="og:image" content="https://blog.kasperhermansen.com/images/kjuulh.jpg">
<meta property="og:url" content="https://blog.kasperhermansen.com/">
<meta property="og:type" content="website">
<meta property="og:site_name" content="Kasper Hermansen's Blog">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Kasper Hermansen's blog is a hub of insights on platform engineering">
<meta name="twitter:description" content="Kasper Hermansen's blog is a hub of insights on platform engineering">
<meta name="twitter:image" content="https://blog.kasperhermansen.com/images/kjuulh.jpg">
<meta name="twitter:creator" content="@kjuulh">
<link rel="alternate" type="application/atom+xml" title="ATOM" href="{{ get_url(path="atom.xml", trailing_slash=false) }}">
{% block extra_head %}
{% endblock extra_head %}
</head>
<body>
<section class="section container mx-auto">
{% block content %} {% endblock %}
</section>
<footer>
<footer class="mt-auto py-3">
<div class="container mx-auto px-4">
<div class="flex justify-center space-x-4">
<a href="https://github.com/kjuulh" target="_blank" rel="noopener noreferrer"
class="text-gray-300 hover:text-gray-900">
<i class="fab fa-github"></i>
</a>
<a href="https://www.linkedin.com/in/kasper-hermansen-50b0b0132/" target="_blank" rel="noopener noreferrer"
class="text-gray-300 hover:text-gray-900">
<i class="fab fa-linkedin"></i>
</a>
<a href="https://git.front.kjuulh.io/kjuulh" target="_blank" rel="noopener noreferrer"
class="text-gray-300 hover:text-gray-900 custom-icon h-6 w-6 gitea bg-cover"> </a>
<a rel="me" href="https://fosstodon.org/@kjuulh" class="text-gray-300 hover:text-gray-900" target="_blank"><i class="fa-brands fa-mastodon"></i></a>
</div>
</div>
</footer>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/js/all.min.js"
crossorigin="anonymous"></script>
</footer>
</body>
</html>

View File

@@ -1,5 +1,5 @@
{% macro list_posts(pages) %}
<ul>
<ul class="space-y-6">
{%- for page in pages %}
<section class="list-item">
<h1 class="title text-peach">
@@ -34,3 +34,7 @@
{% endfor -%}
</ul>
{% endmacro list_posts %}
{% macro styles() %}
<link rel="stylesheet" href="{{ get_url(path="styles/styles.css") | safe }}" />
{% endmacro styles %}

View File

@@ -1,9 +1,17 @@
{% extends "base.html" %}
{% block extra_head %}
<link rel="canonical" href="{{ page.permalink }}">
{% endblock extra_head %}
{% block title %}
{{ page.title }}
{% endblock title %}
{% block content %}
<div class="mx-auto px-4 max-w-3xl py-8">
<div class="py-2">
{{ prev_macros::page_back_link(page=page) }}
</div>
@@ -12,6 +20,9 @@
<h1 class="title">
{{ page.title }}
</h1>
<a href="https://github.com/kjuulh" target="_blank" rel="noopener noreferrer" class="text-peach hover:text-orange-400">
@kjuulh
</a>
<p class="subtitle"><strong>{{ page.date }}</strong></p>
{{ page.content | safe }}
</article>