Compare commits
69 Commits
Author | SHA1 | Date | |
---|---|---|---|
f765358449 | |||
bc2cfdcac7 | |||
1c4ebb2d92 | |||
7aec5f142b | |||
1d5c587eb5 | |||
318b7ff9d4 | |||
d30619374d | |||
f8566c92f6 | |||
3823b7d54f | |||
ee7e935df5 | |||
3b7165ea33 | |||
13250afd05 | |||
7bb55b4f25 | |||
7ed2e5bf4f | |||
adb2629df2 | |||
214c245a1a | |||
82061831fd | |||
285cf1ab5c | |||
9c04e695ca | |||
3a9b4b6656 | |||
81730d93e9 | |||
428ba7d306 | |||
977bd35514 | |||
e755412185 | |||
f5b08c2567 | |||
6ec7794b84 | |||
f620806cb3 | |||
8c4f68c3d7 | |||
909b55fca2 | |||
ae7246dbbf | |||
24e189b899 | |||
60838233ef | |||
797489a512 | |||
bbb0754b89 | |||
9c92f76cf3 | |||
23e3ef2459 | |||
bf24985233 | |||
218fe025a4 | |||
445254a70d | |||
7e42e9a54c | |||
c9a001d174 | |||
591039abec | |||
32726c55fb | |||
b242484521 | |||
d9212bc373 | |||
4b1b76794e | |||
8a60a60134 | |||
9a24f10522 | |||
bb147f28f6 | |||
6b83d44777 | |||
43780b28cb | |||
8aa72cc61d | |||
809c93f529 | |||
ef0638087a | |||
8d8db8de54 | |||
fa61414c65 | |||
b2509dc893 | |||
cc0ce69084 | |||
111487760b | |||
66fc0c9895 | |||
6cb913bb1f | |||
7aed882368 | |||
b172be0276 | |||
4292d067ae | |||
9dd7daaf00 | |||
a0c5f8facf | |||
201fcdb0eb | |||
7f0d854d33 | |||
4828b83c23 |
68
.drone.yml
Normal file
68
.drone.yml
Normal 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:1690570181415
|
||||||
|
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: {}
|
1011
ci/Cargo.lock
generated
1011
ci/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -6,10 +6,10 @@ edition = "2021"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
chrono = "0.4.24"
|
chrono = "0.4.26"
|
||||||
color-eyre = "0.6.2"
|
color-eyre = "0.6.2"
|
||||||
dagger-sdk = "0.2.19"
|
dagger-sdk = "0.2.22"
|
||||||
eyre = "0.6.8"
|
eyre = "0.6.8"
|
||||||
tokio = { version = "1.27.0", features = ["full"] }
|
tokio = { version = "1.31.0", features = ["full"] }
|
||||||
tokio-scoped = "0.2.0"
|
tokio-scoped = "0.2.0"
|
||||||
dotenv = "0.15.0"
|
dotenv = "0.15.0"
|
||||||
|
@ -5,7 +5,7 @@ use tokio::sync::Mutex;
|
|||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> eyre::Result<()> {
|
async fn main() -> eyre::Result<()> {
|
||||||
dotenv::dotenv().unwrap();
|
let _ = dotenv::dotenv();
|
||||||
let client = dagger_sdk::connect().await?;
|
let client = dagger_sdk::connect().await?;
|
||||||
|
|
||||||
let src = client.host().directory_opts(
|
let src = client.host().directory_opts(
|
||||||
@ -34,10 +34,12 @@ async fn main() -> eyre::Result<()> {
|
|||||||
let tag = chrono::Utc::now().timestamp();
|
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 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:1690413158";
|
||||||
|
let update_deployments_docker_image = "docker.io/kasperhermansen/update-deployment:1690401410";
|
||||||
|
|
||||||
let pull_articles = client
|
let pull_articles = client
|
||||||
.container()
|
.container()
|
||||||
.from("docker.io/kasperhermansen/pull-articles:1680482220")
|
.from(pull_articles_docker_image)
|
||||||
.with_exec(vec!["echo", &format!("{}", tag)])
|
.with_exec(vec!["echo", &format!("{}", tag)])
|
||||||
.with_env_variable("GIT_USERNAME", "kjuulh")
|
.with_env_variable("GIT_USERNAME", "kjuulh")
|
||||||
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
|
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
|
||||||
@ -49,8 +51,9 @@ async fn main() -> eyre::Result<()> {
|
|||||||
"areas/blog/posts",
|
"areas/blog/posts",
|
||||||
"--out",
|
"--out",
|
||||||
"/mnt/posts",
|
"/mnt/posts",
|
||||||
|
"--static-out=/mnt/static",
|
||||||
])
|
])
|
||||||
.directory("/mnt/posts");
|
.directory("/mnt/");
|
||||||
|
|
||||||
let dist_dir = client
|
let dist_dir = client
|
||||||
.container_opts(
|
.container_opts(
|
||||||
@ -71,7 +74,14 @@ async fn main() -> eyre::Result<()> {
|
|||||||
])
|
])
|
||||||
.with_workdir("/app")
|
.with_workdir("/app")
|
||||||
.with_directory(".", src.id().await?)
|
.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(
|
.with_file(
|
||||||
"content/posts/_index.md",
|
"content/posts/_index.md",
|
||||||
src.file("content/posts/_index.md").id().await?,
|
src.file("content/posts/_index.md").id().await?,
|
||||||
@ -129,7 +139,7 @@ async fn main() -> eyre::Result<()> {
|
|||||||
|
|
||||||
let update_deployment = client
|
let update_deployment = client
|
||||||
.container()
|
.container()
|
||||||
.from("kasperhermansen/update-deployment:1680472594")
|
.from(update_deployments_docker_image)
|
||||||
.with_env_variable("GIT_USERNAME", "kjuulh")
|
.with_env_variable("GIT_USERNAME", "kjuulh")
|
||||||
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
|
.with_env_variable("GIT_PASSWORD", std::env::var("GIT_PASSWORD").unwrap())
|
||||||
.with_exec(vec![
|
.with_exec(vec![
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# The URL the site will be built for
|
# The URL the site will be built for
|
||||||
base_url = "https://blog.kasperhermansen.com"
|
base_url = "https://blog.kasperhermansen.com"
|
||||||
|
generate_feed = true
|
||||||
|
|
||||||
[markdown]
|
[markdown]
|
||||||
# Whether to do syntax highlighting
|
# Whether to do syntax highlighting
|
||||||
|
0
content/images/.gitkeep
Normal file
0
content/images/.gitkeep
Normal 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
|
proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia
|
||||||
eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim.
|
eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim.
|
||||||
Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa
|
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
|
Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim
|
||||||
labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi
|
labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi
|
||||||
|
14
renovate.json
Normal file
14
renovate.json
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"regexManagers": [
|
||||||
|
{
|
||||||
|
"fileMatch": [
|
||||||
|
".*.rs$"
|
||||||
|
],
|
||||||
|
"matchStrings": [
|
||||||
|
"let.*docker_image.*\"(?<depName>.*):(?<currentValue>.*)\";"
|
||||||
|
],
|
||||||
|
"datasourceTemplate": "docker"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
BIN
static/images/kjuulh.jpg
Normal file
BIN
static/images/kjuulh.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 162 KiB |
@ -594,6 +594,10 @@ html,
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-auto {
|
||||||
|
margin-top: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.block {
|
.block {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@ -606,6 +610,14 @@ html,
|
|||||||
display: list-item;
|
display: list-item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-6 {
|
||||||
|
height: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.w-6 {
|
||||||
|
width: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
.max-w-3xl {
|
.max-w-3xl {
|
||||||
max-width: 48rem;
|
max-width: 48rem;
|
||||||
}
|
}
|
||||||
@ -618,12 +630,32 @@ html,
|
|||||||
place-content: space-around;
|
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]) {
|
.space-y-4 > :not([hidden]) ~ :not([hidden]) {
|
||||||
--tw-space-y-reverse: 0;
|
--tw-space-y-reverse: 0;
|
||||||
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
|
||||||
margin-bottom: calc(1rem * 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 {
|
.px-4 {
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
@ -634,6 +666,11 @@ html,
|
|||||||
padding-bottom: 0.5rem;
|
padding-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.py-3 {
|
||||||
|
padding-top: 0.75rem;
|
||||||
|
padding-bottom: 0.75rem;
|
||||||
|
}
|
||||||
|
|
||||||
.py-8 {
|
.py-8 {
|
||||||
padding-top: 2rem;
|
padding-top: 2rem;
|
||||||
padding-bottom: 2rem;
|
padding-bottom: 2rem;
|
||||||
@ -644,6 +681,11 @@ html,
|
|||||||
line-height: 2.25rem;
|
line-height: 2.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.text-gray-300 {
|
||||||
|
--tw-text-opacity: 1;
|
||||||
|
color: rgb(209 213 219 / var(--tw-text-opacity));
|
||||||
|
}
|
||||||
|
|
||||||
.text-peach {
|
.text-peach {
|
||||||
--tw-text-opacity: 1;
|
--tw-text-opacity: 1;
|
||||||
color: rgba(var(--ctp-peach), var(--tw-text-opacity));
|
color: rgba(var(--ctp-peach), var(--tw-text-opacity));
|
||||||
@ -2082,3 +2124,26 @@ html,
|
|||||||
.blog-summary > p:first-child {
|
.blog-summary > p:first-child {
|
||||||
margin-top: 0px;
|
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));
|
||||||
|
}
|
||||||
|
@ -43,3 +43,16 @@
|
|||||||
.blog-summary > p:first-child {
|
.blog-summary > p:first-child {
|
||||||
@apply mt-0;
|
@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);
|
||||||
|
}
|
||||||
|
@ -6,19 +6,59 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<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 name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
|
<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>
|
<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: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>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<section class="section container mx-auto">
|
<section class="section container mx-auto">
|
||||||
{% block content %} {% endblock %}
|
{% block content %} {% endblock %}
|
||||||
</section>
|
</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.2/js/all.min.js"
|
||||||
|
crossorigin="anonymous"></script>
|
||||||
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
{% macro list_posts(pages) %}
|
{% macro list_posts(pages) %}
|
||||||
<ul>
|
<ul class="space-y-6">
|
||||||
{%- for page in pages %}
|
{%- for page in pages %}
|
||||||
<section class="list-item">
|
<section class="list-item">
|
||||||
<h1 class="title text-peach">
|
<h1 class="title text-peach">
|
||||||
<a href={{ page.permalink }}>{{page.title}}</a>
|
<a href={{ page.permalink | safe }}>{{page.title}}</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
@ -27,10 +27,14 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not hide_read_more %}
|
{% if not hide_read_more %}
|
||||||
<a class="readmore text-peach" href={{ page.permalink }}>Read more ⟶</a>
|
<a class="readmore text-peach" href={{ page.permalink | safe }}>Read more ⟶</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
{% endfor -%}
|
{% endfor -%}
|
||||||
</ul>
|
</ul>
|
||||||
{% endmacro list_posts %}
|
{% endmacro list_posts %}
|
||||||
|
|
||||||
|
{% macro styles() %}
|
||||||
|
<link rel="stylesheet" href="{{ get_url(path="styles/styles.css") | safe }}" />
|
||||||
|
{% endmacro styles %}
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
{% macro page_back_link(page) %}
|
{% macro page_back_link(page) %}
|
||||||
{% set top_section = get_section(path=page.ancestors | last) %}
|
{% set top_section = get_section(path=page.ancestors | last) %}
|
||||||
<a class="previous" href="{{ top_section.permalink }}">‹ back</a>
|
<a class="previous" href="{{ top_section.permalink | safe }}">‹ back</a>
|
||||||
{% endmacro page_back_link %}
|
{% endmacro page_back_link %}
|
||||||
|
|
||||||
{% macro section_back_link(section) %}
|
{% macro section_back_link(section) %}
|
||||||
{% set top_section = get_section(path=section.ancestors | last) %}
|
{% set top_section = get_section(path=section.ancestors | last) %}
|
||||||
<a class="previous" href="{{ top_section.permalink }}">‹ back</a>
|
<a class="previous" href="{{ top_section.permalink | safe }}">‹ back</a>
|
||||||
{% endmacro section_back_link %}
|
{% endmacro section_back_link %}
|
||||||
|
@ -1,32 +1,44 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
|
||||||
|
{% block extra_head %}
|
||||||
|
<link rel="canonical" href="{{ page.permalink | safe }}">
|
||||||
|
<meta property="og:url" content="{{ page.permalink | safe }}" />
|
||||||
|
{% endblock extra_head %}
|
||||||
|
|
||||||
|
{% block title %}
|
||||||
|
{{ page.title }}
|
||||||
|
{% endblock title %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="mx-auto px-4 max-w-3xl py-8">
|
<div class="mx-auto px-4 max-w-3xl py-8">
|
||||||
|
|
||||||
<div class="py-2">
|
<div class="py-2">
|
||||||
{{ prev_macros::page_back_link(page=page) }}
|
{{ prev_macros::page_back_link(page=page) }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<article class="blog-content">
|
<article class="blog-content">
|
||||||
<h1 class="title">
|
<h1 class="title">
|
||||||
{{ page.title }}
|
{{ page.title }}
|
||||||
</h1>
|
</h1>
|
||||||
<p class="subtitle"><strong>{{ page.date }}</strong></p>
|
<a href="https://github.com/kjuulh" target="_blank" rel="noopener noreferrer"
|
||||||
{{ page.content | safe }}
|
class="text-peach hover:text-orange-400">
|
||||||
</article>
|
@kjuulh
|
||||||
|
</a>
|
||||||
|
<p class="subtitle"><strong>{{ page.date }}</strong></p>
|
||||||
|
{{ page.content | safe }}
|
||||||
|
</article>
|
||||||
|
|
||||||
{% if page.lower or page.higher %}
|
{% if page.lower or page.higher %}
|
||||||
<div class="flex place-content-around max-w-lg mx-auto">
|
<div class="flex place-content-around max-w-lg mx-auto">
|
||||||
{% if page.lower %}
|
{% if page.lower %}
|
||||||
<a class="previous" href="{{ page.lower.permalink }}">‹ {{ page.lower.title }}</a>
|
<a class="previous" href="{{ page.lower.permalink | safe }}">‹ {{ page.lower.title }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.higher %}
|
{% if page.higher %}
|
||||||
<a class="next" href="{{ page.higher.permalink }}">{{ page.higher.title }} ›</a>
|
<a class="next" href="{{ page.higher.permalink | safe }}">{{ page.higher.title }} ›</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
|
@ -1,44 +1,50 @@
|
|||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
|
|
||||||
|
{% block extra_head %}
|
||||||
|
<link rel="canonical" href="{{ section.permalink | safe }}">
|
||||||
|
<meta property="og:url" content="{{ section.permalink | safe }}" />
|
||||||
|
{% endblock extra_head %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="container mx-auto px-4 max-w-3xl py-8 space-y-4">
|
<div class="container mx-auto px-4 max-w-3xl py-8 space-y-4">
|
||||||
|
|
||||||
{% if section.ancestors | length > 0 %}
|
{% if section.ancestors | length > 0 %}
|
||||||
{{ prev_macros::section_back_link(section=section) }}
|
{{ prev_macros::section_back_link(section=section) }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if section.extra.section_path -%}
|
{% if section.extra.section_path -%}
|
||||||
{% set section = get_section(path=section.extra.section_path) %}
|
{% set section = get_section(path=section.extra.section_path) %}
|
||||||
{% endif -%}
|
|
||||||
<h1 class="title text-peach text-3xl">
|
|
||||||
{{ section.title }}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<main>
|
|
||||||
{%- if paginator %}
|
|
||||||
{%- set show_pages = paginator.pages -%}
|
|
||||||
{% else %}
|
|
||||||
{%- set show_pages = section.pages -%}
|
|
||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
<h1 class="title text-peach text-3xl">
|
||||||
|
{{ section.title }}
|
||||||
|
</h1>
|
||||||
|
|
||||||
{{ post_macros::list_posts(pages=show_pages) }}
|
<main>
|
||||||
</main>
|
{%- if paginator %}
|
||||||
{% if paginator %}
|
{%- set show_pages = paginator.pages -%}
|
||||||
<ul class="pagination">
|
{% else %}
|
||||||
|
{%- set show_pages = section.pages -%}
|
||||||
|
{% endif -%}
|
||||||
|
|
||||||
|
{{ post_macros::list_posts(pages=show_pages) }}
|
||||||
|
</main>
|
||||||
|
{% if paginator %}
|
||||||
|
<ul class="pagination">
|
||||||
{% if paginator.previous %}
|
{% if paginator.previous %}
|
||||||
<span class="page-item page-prev">
|
<span class="page-item page-prev">
|
||||||
<a href={{ paginator.previous }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a>
|
<a href={{ paginator.previous | safe }} class="page-link" aria-label="Previous"><span aria-hidden="true">←
|
||||||
</span>
|
Prev</span></a>
|
||||||
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if paginator.next %}
|
{% if paginator.next %}
|
||||||
<span class="page-item page-next">
|
<span class="page-item page-next">
|
||||||
<a href={{ paginator.next }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
|
<a href={{ paginator.next | safe }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
|
||||||
</span>
|
</span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
Loading…
Reference in New Issue
Block a user