Compare commits
No commits in common. "main" and "feat/zola" have entirely different histories.
68
.drone.yml
68
.drone.yml
@ -1,68 +0,0 @@
|
|||||||
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: {}
|
|
1009
ci/Cargo.lock
generated
1009
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.26"
|
chrono = "0.4.24"
|
||||||
color-eyre = "0.6.2"
|
color-eyre = "0.6.2"
|
||||||
dagger-sdk = "0.2.22"
|
dagger-sdk = "0.2.19"
|
||||||
eyre = "0.6.8"
|
eyre = "0.6.8"
|
||||||
tokio = { version = "1.31.0", features = ["full"] }
|
tokio = { version = "1.27.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<()> {
|
||||||
let _ = dotenv::dotenv();
|
dotenv::dotenv().unwrap();
|
||||||
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,12 +34,10 @@ 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(pull_articles_docker_image)
|
.from("docker.io/kasperhermansen/pull-articles:1680482220")
|
||||||
.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())
|
||||||
@ -51,9 +49,8 @@ async fn main() -> eyre::Result<()> {
|
|||||||
"areas/blog/posts",
|
"areas/blog/posts",
|
||||||
"--out",
|
"--out",
|
||||||
"/mnt/posts",
|
"/mnt/posts",
|
||||||
"--static-out=/mnt/static",
|
|
||||||
])
|
])
|
||||||
.directory("/mnt/");
|
.directory("/mnt/posts");
|
||||||
|
|
||||||
let dist_dir = client
|
let dist_dir = client
|
||||||
.container_opts(
|
.container_opts(
|
||||||
@ -74,14 +71,7 @@ async fn main() -> eyre::Result<()> {
|
|||||||
])
|
])
|
||||||
.with_workdir("/app")
|
.with_workdir("/app")
|
||||||
.with_directory(".", src.id().await?)
|
.with_directory(".", src.id().await?)
|
||||||
.with_directory(
|
.with_directory("content/posts", pull_articles.id().await?)
|
||||||
"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?,
|
||||||
@ -139,7 +129,7 @@ async fn main() -> eyre::Result<()> {
|
|||||||
|
|
||||||
let update_deployment = client
|
let update_deployment = client
|
||||||
.container()
|
.container()
|
||||||
.from(update_deployments_docker_image)
|
.from("kasperhermansen/update-deployment:1680472594")
|
||||||
.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,6 +1,5 @@
|
|||||||
# 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
|
||||||
|
@ -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.<!-- more -->
|
duis.
|
||||||
|
|
||||||
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
|
||||||
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
|
||||||
"regexManagers": [
|
|
||||||
{
|
|
||||||
"fileMatch": [
|
|
||||||
".*.rs$"
|
|
||||||
],
|
|
||||||
"matchStrings": [
|
|
||||||
"let.*docker_image.*\"(?<depName>.*):(?<currentValue>.*)\";"
|
|
||||||
],
|
|
||||||
"datasourceTemplate": "docker"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
Binary file not shown.
Before Width: | Height: | Size: 162 KiB |
@ -594,10 +594,6 @@ html,
|
|||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mt-auto {
|
|
||||||
margin-top: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.block {
|
.block {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
@ -610,14 +606,6 @@ 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;
|
||||||
}
|
}
|
||||||
@ -630,32 +618,12 @@ 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;
|
||||||
@ -666,11 +634,6 @@ 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;
|
||||||
@ -681,11 +644,6 @@ 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));
|
||||||
@ -2124,26 +2082,3 @@ 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,16 +43,3 @@
|
|||||||
.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,59 +6,19 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>kasperhermansen | {% block title %}{% endblock title %}</title>
|
<title>kasperhermansen</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" />
|
||||||
|
|
||||||
{{ post_macros::styles() }}
|
<link rel="stylesheet" href="{{ get_url(path="styles/styles.css") | safe }}" />
|
||||||
|
|
||||||
<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 class="space-y-6">
|
<ul>
|
||||||
{%- 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 | safe }}>{{page.title}}</a>
|
<a href={{ page.permalink }}>{{page.title}}</a>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<div class="meta">
|
<div class="meta">
|
||||||
@ -27,14 +27,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if not hide_read_more %}
|
{% if not hide_read_more %}
|
||||||
<a class="readmore text-peach" href={{ page.permalink | safe }}>Read more ⟶</a>
|
<a class="readmore text-peach" href={{ page.permalink }}>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 | safe }}">‹ back</a>
|
<a class="previous" href="{{ top_section.permalink }}">‹ 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 | safe }}">‹ back</a>
|
<a class="previous" href="{{ top_section.permalink }}">‹ back</a>
|
||||||
{% endmacro section_back_link %}
|
{% endmacro section_back_link %}
|
||||||
|
@ -1,44 +1,32 @@
|
|||||||
{% 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>
|
||||||
<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>
|
<p class="subtitle"><strong>{{ page.date }}</strong></p>
|
||||||
{{ page.content | safe }}
|
{{ page.content | safe }}
|
||||||
</article>
|
</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 | safe }}">‹ {{ page.lower.title }}</a>
|
<a class="previous" href="{{ page.lower.permalink }}">‹ {{ page.lower.title }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if page.higher %}
|
{% if page.higher %}
|
||||||
<a class="next" href="{{ page.higher.permalink | safe }}">{{ page.higher.title }} ›</a>
|
<a class="next" href="{{ page.higher.permalink }}">{{ page.higher.title }} ›</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
|
||||||
|
@ -1,26 +1,21 @@
|
|||||||
{% 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 -%}
|
{% endif -%}
|
||||||
<h1 class="title text-peach text-3xl">
|
<h1 class="title text-peach text-3xl">
|
||||||
{{ section.title }}
|
{{ section.title }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
{%- if paginator %}
|
{%- if paginator %}
|
||||||
{%- set show_pages = paginator.pages -%}
|
{%- set show_pages = paginator.pages -%}
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -28,23 +23,22 @@
|
|||||||
{% endif -%}
|
{% endif -%}
|
||||||
|
|
||||||
{{ post_macros::list_posts(pages=show_pages) }}
|
{{ post_macros::list_posts(pages=show_pages) }}
|
||||||
</main>
|
</main>
|
||||||
{% if paginator %}
|
{% if paginator %}
|
||||||
<ul class="pagination">
|
<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 | safe }} class="page-link" aria-label="Previous"><span aria-hidden="true">←
|
<a href={{ paginator.previous }} class="page-link" aria-label="Previous"><span aria-hidden="true">← Prev</span></a>
|
||||||
Prev</span></a>
|
|
||||||
</span>
|
</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 | safe }} class="page-link" aria-label="Next"><span aria-hidden="true">Next →</span></a>
|
<a href={{ paginator.next }} 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