diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..c1dfd89 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,8 @@ +public +node_modules +.wrangler +.git +manimations/*.* +/zola +/zola-v*.tar.gz +/artifacts diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..a6d1f2f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# Multi-stage build: generate llms.txt with Node, build the site with Zola, +# then serve the static output with static-web-server. +# +# This is the Dokploy/self-hosted deployment path. It's independent of the +# Cloudflare Pages path (`npm run deploy` / wrangler.toml) - that stays in +# place as an option, this doesn't replace it. + +FROM node:22-slim AS llms +WORKDIR /project +COPY . . +RUN node scripts/generate-llms.mjs + +FROM ghcr.io/getzola/zola:v0.23.1 AS zola +WORKDIR /project +COPY . . +COPY --from=llms /project/static/llms.txt static/llms.txt +RUN ["/zola", "build"] + +FROM ghcr.io/static-web-server/static-web-server:2 +COPY --from=zola /project/public /public +EXPOSE 80 diff --git a/build.sh b/build.sh index 6a378d6..812e673 100755 --- a/build.sh +++ b/build.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -euo pipefail -ZOLA_VERSION=0.22.1 +ZOLA_VERSION=0.23.1 echo "Downloading Zola ${ZOLA_VERSION}..." curl -sLJO "https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" diff --git a/content/posts/from-c-to-machine-code/index.md b/content/posts/from-c-to-machine-code/index.md index 5452723..eb4ae32 100644 --- a/content/posts/from-c-to-machine-code/index.md +++ b/content/posts/from-c-to-machine-code/index.md @@ -7,7 +7,7 @@ date = 2026-04-08 tags = ["assembly", "rev", "pwn"] +++ -{{ youtube(id="KbH239zvDtM") }} +{{}} Before diving into how to break a program, we need to understand what the computer is actually executing. When you write a C program, the processor doesn't understand a single line of it. The C language exists for *our* benefit, allowing us to write logic without having to manually shuffle bits around in the processor. @@ -78,9 +78,9 @@ In x64 Linux, when a function is called, the arguments are passed directly into 5. `r8` (Fifth argument) 6. `r9` (Sixth argument) -{% note() %} +{% %} In older x86 32-bit binaries, arguments aren't passed in registers at all; they are pushed onto the stack. When a function finishes and returns a value, that return value is almost always placed in the **`rax`** register (or `eax` in 32-bit). -{% end %} +{% %} ### **Register Sizes and "Words"** diff --git a/content/posts/integrating-netlify.md b/content/posts/integrating-netlify.md index 181582f..10c3fb0 100644 --- a/content/posts/integrating-netlify.md +++ b/content/posts/integrating-netlify.md @@ -76,6 +76,7 @@ The first file, `admin/index.html`, is the entry point for the Netlify CMS admin Now let’s move to the configuration section. These are the configurations that go into the `config.yml` file. This process is different for every site. I followed the guidelines on the website and made minor adjustments. It worked on my website. The configuration options are available at the [docs](). This is how I configured my config.yml file: ```yaml +{% raw %} backend: name: git-gateway branch: netlify-cms # Branch to update (optional; defaults to master) @@ -104,6 +105,7 @@ collections: - { label: 'Categories', name: 'categories', widget: 'list' } - { label: 'Comments', name: 'comment', widget: 'boolean', default: true } - { label: 'Table of Contents', name: 'toc', widget: 'boolean', default: true } +{% endraw %} ``` **Step 5** diff --git a/content/posts/scriptctf2025/index.md b/content/posts/scriptctf2025/index.md index e76f5d7..373fd0a 100644 --- a/content/posts/scriptctf2025/index.md +++ b/content/posts/scriptctf2025/index.md @@ -41,6 +41,7 @@ upload.html display.html ```html +{% raw %} @@ -60,6 +61,7 @@ display.html

Upload another image

+{% endraw %} ``` `[app.py](http://app.py)` diff --git a/templates/feed.json b/templates/feed.json index 05adf30..b28d0a5 100644 --- a/templates/feed.json +++ b/templates/feed.json @@ -1,20 +1,20 @@ { "version": "https://jsonfeed.org/version/1.1", - "title": "{{ config.title | escape }}", - "home_page_url": "{{ config.base_url | escape }}", - "feed_url": "{{ feed_url | escape }}", - "description": "{{ config.description | escape }}", + "title": "{{ config.title | escape_html }}", + "home_page_url": "{{ config.base_url | escape_html }}", + "feed_url": "{{ feed_url | escape_html }}", + "description": "{{ config.description | escape_html }}", "authors": [ { - "name": "{{ config.extra.author | escape }}" + "name": "{{ config.extra.author | escape_html }}" } ], "items": [ {%- for page in pages %} { - "id": "{{ page.permalink | escape }}", - "url": "{{ page.permalink | escape }}", - "title": "{{ page.title | escape }}", + "id": "{{ page.permalink | escape_html }}", + "url": "{{ page.permalink | escape_html }}", + "title": "{{ page.title | escape_html }}", "content_html": {{ page.content | json_encode | safe }}, "date_published": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}" }{% if not loop.last %},{% endif %} diff --git a/templates/index.html b/templates/index.html index 3c3a1e9..69cb43f 100644 --- a/templates/index.html +++ b/templates/index.html @@ -27,8 +27,8 @@ block og_url %}{{ config.base_url }}/{% endblock og_url %} {% block head %} "@type": "Person", "@id": "{{ config.base_url | safe }}/#author" } - {% if page.date %},"datePublished": "{{ page.date | date(format="%+") }}"{% endif %} - {% if page.updated %},"dateModified": "{{ page.updated | date(format="%+") }}"{% elif page.date %},"dateModified": "{{ page.date | date(format="%+") }}"{% endif %} + {% if page.date %},"datePublished": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% endif %} + {% if page.updated %},"dateModified": "{{ page.updated | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% elif page.date %},"dateModified": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% endif %} }{% if not loop.last %},{% endif %} {% endfor %} ] @@ -41,7 +41,7 @@ block og_url %}{{ config.base_url }}/{% endblock og_url %} {% block head %}
{% set post_limit = config.extra.homepage_post_limit | default(value=3) %} - {% for page in section.pages | slice(end=post_limit) %} {% include "partials/post-card.html" %} {% endfor %} + {% for page in section.pages[:post_limit] %} {{}} {% endfor %}
diff --git a/templates/page.html b/templates/page.html index 0ba140d..f93e95c 100644 --- a/templates/page.html +++ b/templates/page.html @@ -8,12 +8,12 @@ {% block og_title %}{{ page.title }}{% endblock og_title %} {% block og_description %}{{ page.description | default(value=config.description) }}{% endblock og_description %} {% block og_url %}{{ page.permalink }}{% endblock og_url %} -{% block og_type %}{% if page.ancestors is containing("posts/_index.md") %}article{% else %}website{% endif %}{% endblock og_type %} +{% block og_type %}{% if "posts/_index.md" in page.ancestors %}article{% else %}website{% endif %}{% endblock og_type %} {% block og_image %}{{ config.base_url }}{{ page.extra.image | default(value="/images/og-image.png") }}{% endblock og_image %} {% block og_extra %} - {% if page.ancestors is containing("posts/_index.md") %} - {% if page.date %}{% endif %} - {% if page.updated %}{% endif %} + {% if "posts/_index.md" in page.ancestors %} + {% if page.date %}{% endif %} + {% if page.updated %}{% endif %} {% if page.taxonomies.tags %} {% for tag in page.taxonomies.tags %} @@ -29,7 +29,7 @@ {% block twitter_image %}{{ config.base_url }}{{ page.extra.image | default(value="/images/og-image.png") }}{% endblock twitter_image %} {% block head %} - {% if page.ancestors is containing("posts/_index.md") %} + {% if "posts/_index.md" in page.ancestors %} +{% endcomponent youtube %} diff --git a/templates/taxonomy_single.html b/templates/taxonomy_single.html index 2954d35..cb81d13 100644 --- a/templates/taxonomy_single.html +++ b/templates/taxonomy_single.html @@ -32,8 +32,8 @@ term.permalink }}{% endblock og_url %} {% block head %} "@type": "Person", "@id": "{{ config.base_url | safe }}/#author" } - {% if page.date %},"datePublished": "{{ page.date | date(format="%+") }}"{% endif %} - {% if page.updated %},"dateModified": "{{ page.updated | date(format="%+") }}"{% elif page.date %},"dateModified": "{{ page.date | date(format="%+") }}"{% endif %} + {% if page.date %},"datePublished": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% endif %} + {% if page.updated %},"dateModified": "{{ page.updated | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% elif page.date %},"dateModified": "{{ page.date | date(format="%Y-%m-%dT%H:%M:%S%:z") }}"{% endif %} }{% if not loop.last %},{% endif %} {% endfor %} ]