# 8bit Zola

**URL:** <https://zola.discourse.group/t/8bit-zola/1977>\
**Category:** Uncategorized\
**Created:** [December 19, 2023, 3:28am UTC](https://zola.discourse.group/t/8bit-zola/1977 "2023-12-19T03:28:37Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [December 19, 2023, 3:28am UTC](https://zola.discourse.group/t/8bit-zola/1977/1 "2023-12-19T03:28:37Z")

</div>

Just finished porting from Jekyll, this is impressive! Managed to move 100% of the layout _and_ improve some stuff along the way. And Tera, very nice!!

> **[Migrating to Zola](https://charlesrocket.github.io/posts/jekyll-to-zola/)**
>
> Migrating from Jekyll to Zola

Tho CSP with GitHub is a bit awkward:

```auto
{% if page.extra.image %}
  {% set page_image_hash = get_hash(literal=macros::image_style(url=page.extra.image), base64=true, sha_type=512) %}
{% endif %}

```

Maybe theres a better way (besides moving out)

Oh, forgot about `404` 😅

---

<div class="post-metadata">

**Author:** ![keats](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@keats](https://zola.discourse.group/u/keats)\
**Post date:** [December 19, 2023, 9:17am UTC](https://zola.discourse.group/t/8bit-zola/1977/2 "2023-12-19T09:17:16Z")

</div>

> Tho CSP with GitHub is a bit awkward:

Is the image a URL or a path to an image in the repo?

---

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [December 19, 2023, 1:19pm UTC](https://zola.discourse.group/t/8bit-zola/1977/3 "2023-12-19T13:19:28Z")

</div>

@keats Right now post images are local, but the issue is with the style tag cause I can not move this into the main SASS file:

```auto
{%- macro image_style(url) -%}
#posts.inner-post-page .block-left {background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("{{ url }}") no-repeat;background-size: cover;}
{%- endmacro image_style -%}

```

---

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [January 12, 2024, 12:53am UTC](https://zola.discourse.group/t/8bit-zola/1977/4 "2024-01-12T00:53:16Z")

</div>

There is probably a nicer way to do it:

```auto
{% if page.extra.image %}
  {% set page_image_hash = get_hash(literal=macros::image_style(url=page.extra.image), base64=true, sha_type=512) %}
{% else %}
  {% set default_post_image_hash = get_hash(literal=macros::image_style(url=get_url(path=config.extra.default_post_image)), base64=true, sha_type=512) %}
{% endif %}
{% set main_images_hash = get_hash(literal=macros::main_images_style(home_url=get_url(path=config.extra.home_image), posts_url=get_url(path=config.extra.post_list_image)), base64=true, sha_type=512) %}

```

macros:

```auto
{%- macro main_images_style(home_url, posts_url) -%}
#posts .block-left {background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("{{ posts_url | safe }}") no-repeat;background-size: cover, cover;} .block-left {background: linear-gradient(rgba(44,45,51,0.9), rgba(44,45,51,0.9)), url("{{ home_url | safe }}") no-repeat;background-size: cover;}
{%- endmacro main_images_style -%}

{%- macro image_style(url) -%}
#posts.inner-post-page .block-left {background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("{{ url | safe }}") no-repeat;background-size: cover;}
{%- endmacro image_style -%}

```

CSP value for external images in posts:

```auto

{% if page.extra.image %}{% if page.extra.image is starting_with("https://") %}{{ page.extra.image }}{% endif %}{% endif %}

```

CSP value for css:

```auto

{% if page_image_hash %}'sha512-{{ page_image_hash | safe }}'{% else %}'sha512-{{ default_post_image_hash | safe }}'{% endif %} 'sha512-{{ main_images_hash | safe }}

```

This is still not enough for GHP due the lack of header tunings so I moved to netlify [https://failsafe.monster/](https://failsafe.monster/)

> **[Mozilla Observatory](https://observatory.mozilla.org/analyze/failsafe.monster)**
>
> The Mozilla Observatory is a project designed to help developers, system administrators, and security professionals configure their sites safely and securely.

---

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [February 14, 2024, 10:58pm UTC](https://zola.discourse.group/t/8bit-zola/1977/5 "2024-02-14T22:58:12Z")

</div>

my port is now public [GitHub - charlesrocket/halve-z: Retro two-column theme for Zola](https://github.com/charlesrocket/halve-z)

---

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [October 4, 2025, 4:39pm UTC](https://zola.discourse.group/t/8bit-zola/1977/6 "2025-10-04T16:39:21Z")

</div>

added mastodon comment system

> <https://github.com/charlesrocket/halve-z/pull/43>
>
> Simple comment system with stats and a nested tree.

> <https://github.com/charlesrocket/halve-z/pull/44>

---

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [October 5, 2025, 2:05am UTC](https://zola.discourse.group/t/8bit-zola/1977/7 "2025-10-05T02:05:21Z")

</div>

future-proofed the comment function and added lazy loading for heavy threads. decided not to handle avatars since they would overload the design. but after sleeping on it, i guess i could compress and pixelate them too. gotta benchmark this first, tho

---

<div class="post-metadata">

**Author:** ![charlie137](https://yyz2.discourse-cdn.com/free1/user_avatar/zola.discourse.group/charlie137/32/1140_2.png) [@charlie137](https://zola.discourse.group/u/charlie137)\
**Post date:** [October 5, 2025, 9:05pm UTC](https://zola.discourse.group/t/8bit-zola/1977/8 "2025-10-05T21:05:13Z")

</div>

skipped pixelation on avatars; small images turned out to look just fine. instead, added verification and bot badges. very happy with the results, and i didn’t have to break my strict CSP!!
