Skip to content

Commit

Permalink
empty zola blog with customized lightspeed theme
Browse files Browse the repository at this point in the history
  • Loading branch information
deadbaed committed Jun 22, 2023
0 parents commit 3dc78c8
Show file tree
Hide file tree
Showing 11 changed files with 224 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
public/
static/processed_images/
.DS_Store
20 changes: 20 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
title = "deadbaed"
description = "broke my bed now it's dead"

# The URL the site will be built for
base_url = "https://blog.x4m3.rocks"

compile_sass = true

generate_feed = true
feed_filename = "atom.xml"

[markdown]
highlight_code = true
highlight_theme = "gruvbox-light"

[extra]
footer_links = [
{url = "$BASE_URL/atom.xml", name = "RSS"},
{url = "https://philippeloctaux.com", name = "Website"},
]
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# deadbaed

my blog

## tech

- [zola](https://www.getzola.org)
- theme is [lightspeed](https://github.com/carpetscheme/lightspeed) with some edits
50 changes: 50 additions & 0 deletions sass/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
html,
body {
background: #fffaf7;
color: #2d2d2d;
font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
"Segoe UI Symbol";
}
a,
a:visited {
color: darkred;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
main {
margin: auto;
max-width: 38rem;
padding: 0.8rem;
}
pre {
background: white;
overflow: scroll;
padding: 1rem;
}
td {
border: 1px solid #2d2d2d;
padding: 10px;
}
img {
height: auto;
max-width: 100%;
}
.homepage-list {
list-style: none;
padding: 1rem 0;
}
.homepage-list li {
align-items: center;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
margin-bottom: 10px;
}
@media (max-width: 38rem) {
.homepage-list li a {
width: 100%;
}
}
1 change: 1 addition & 0 deletions static/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
blog.x4m3.rocks
Binary file added static/favicon.ico
Binary file not shown.
7 changes: 7 additions & 0 deletions templates/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "index.html" %}
{% block title %}404 not found{%endblock title %}

{% block content %}
<h1>404 not found</h1>
<p>Maybe the page you are looking for changed its url, <a href="{{ config.base_url | safe }}/">go home</a> to try finding it again?</p>
{% endblock content %}
92 changes: 92 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
{% import "macros.html" as macros %}

<!DOCTYPE html>
<html lang="en">
{% block head %}
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<title>{% block title %}{{ config.title }}{% endblock title %}</title>
<meta name="description" content="{% block description %}{{ config.description }}{% endblock description %}" />
<link rel="shortcut icon" href="{{ get_url(path="favicon.ico") | safe }}" />
<link rel="alternate" type="application/atom+xml" title="RSS" href="{{ get_url(path="atom.xml") | safe }}">

{% set data = load_data(path="public/style.css", format="plain") -%}
<style>{{ data | safe }}</style>

{% block seo -%}
<meta property="og:site_name" content="{% block ogsitename %}{{config.title}}{% endblock ogsitename %}">
{% if config.extra.author -%}
<meta name="author" content="{{ config.extra.author }}" />
{%- endif %}
<meta property="og:title" content="{% block ogtitle %}{{config.title}}{% endblock ogtitle %}">
<meta property="og:description" content="{% block ogdesc %}{{config.description}}{% endblock ogdesc %}">
<meta property="og:url" content="{% block ogurl %}{{config.base_url | safe }}{% endblock ogurl %}">
<meta property="og:image" content="{% block ogimage %}{% if config.extra.ogimage %}{{ get_url(path=config.extra.ogimage) | safe }}{% endif %}{% endblock ogimage %}">

{% if page.date -%}
<meta property="og:type" content="article" />
<meta property="article:published_time" content="{{ page.date | date(format="%+") }}" />
{%- endif %}

{% if page.earlier -%}
<link rel="prev" href="{{ page.earlier.permalink | safe }}" />
{%- endif %}
{% if page.later -%}
<link rel="next" href="{{ page.later.permalink | safe }}" />
{%- endif %}
{%- endblock seo -%}

{% block extra_head %}
{% endblock extra_head %}

<script defer data-domain="blog.x4m3.rocks" src="https://plausible.y.z.x4m3.rocks/js/script.js"></script>
</head>
{% endblock head %}

<body>
<main id="main" role="main">

{% block header %}
<header role="banner">
<h3 style="margin-top:0;">
<a href="{{ config.base_url | safe }}" title="Home">{{ config.title }}</a>
<br /><small>{{ config.description }}</small>
</h3>
</header>
<hr />
{% endblock header %}

{% block content %}
<ul class="homepage-list">
{% for post in section.pages %}
{{ macros::post_in_list(post=post) }}
{% endfor %}
</ul>
{% endblock content %}

{% block footer %}
<footer role="contentinfo">
<hr />
{% if config.extra.footer_links %}
<nav style="margin-bottom:1rem;" role="navigation">
{% for item in config.extra.footer_links %}
<a href="{{ item.url | replace(from="$BASE_URL", to=config.base_url) | safe }}">{{ item.name }}</a>
{% if loop.last %}{% else %}
<span>&middot;</span>
{% endif %}
{% endfor %}
</nav>
{% endif %}
{% block taglines %}
{% endblock taglines %}
</footer>
{% endblock footer %}

</main>
{% block after_main %}
{% endblock after_main %}
</body>
</html>

7 changes: 7 additions & 0 deletions templates/macros.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% macro post_in_list(post) %}
<li>
<a href="{{ post.permalink | safe }}">{{ post.title }}</a>
<time style="font-size:90%;" datetime="{{ post.date | date(format="%+") }}">{{ post.date | date(format="%B %d, %Y") }}</time>
</li>
{% endmacro post_in_list %}

26 changes: 26 additions & 0 deletions templates/page.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{% extends "index.html" %}

{% block title %}{{ page.title }} &middot; {{ config.title }}{% endblock title %}
{% block description %}{{ page.description | default(value=config.description) }}{% endblock description %}

{% block ogtitle %}{{ page.title }}{% endblock ogtitle %}
{% block ogdesc %}{{ page.description }}{% endblock ogdesc %}
{% block ogurl %}{{ page.permalink | safe }}{% endblock ogurl%}
{% block ogimage -%}
{%- if page.extra.image -%}{{ get_url(path=page.extra.image) | safe }}
{%- elif config.extra.ogimage -%}{{ get_url(path=config.extra.ogimage) | safe }}
{%- endif -%}
{%- endblock ogimage %}


{% block content %}
<article>
<h1>{{ page.title }}</h1>

{% if page.date %}
<p style="font-size:90%;">Posted on <time datetime="{{ page.date | date(format="%+") }}">{{ page.date | date(format="%B %d, %Y") }}</time></p>
{% endif %}

{{ page.content | safe }}
</article>
{% endblock content %}
10 changes: 10 additions & 0 deletions templates/shortcodes/gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<div>
{% for asset in page.assets -%}
{%- if asset is matching("[.](jpg|png|gif)$") and asset is containing(path) -%}
{% set image = resize_image(path=asset, width=240, op="fit_width") %}
<a href="{{ get_url(path=asset) }}" target="_blank">
<img src="{{ image.url }}" />
</a>
{%- endif %}
{%- endfor %}
</div>

0 comments on commit 3dc78c8

Please sign in to comment.