This commit is contained in:
Parker TenBroeck 2026-01-16 22:02:02 -05:00
commit 6449151d7a
38 changed files with 779 additions and 0 deletions

17
templates/404.html Normal file
View file

@ -0,0 +1,17 @@
{% extends "base.html" %}
{%- block title -%}Page not found{%- endblock -%}
{%- block robots -%}
<meta name="robots" content="noindex, follow">
{%- endblock -%}
{%- block main -%}
{%- filter indent -%}{%- filter indent -%}
<section class="framed">
<h2>Page not found...</h2>
<p>Sorry, this page doesn't exist. Go back <a href="{{ config.base_url | safe }}">home</a>?</p>
</section>
{%- endfilter -%}{%- endfilter -%}
{%- endblock -%}

137
templates/base.html Normal file
View file

@ -0,0 +1,137 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>
{%- block title -%}
{% if page.title %}{{ page.title }}
{% elif section.title %}{{ section.title }}
{% elif config.title %}{{ config.title }}
{% endif %}
{%- endblock -%}
</title>
{% block feeds %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path='rss.xml', trailing_slash=false) }}">
<link rel="alternate" type="application/atom+xml" title="Atom" href="{{ get_url(path='atom.xml', trailing_slash=false) }}">
{% endblock %}
<link rel="stylesheet" href="{{ get_url(path='style.css', cachebust=true) }}">
{%- if page.extra.stylesheets or section.extra.stylesheets %}
{%- for stylesheet in page.extra.stylesheets | default(value=section.extra.stylesheets) %}
<link rel="stylesheet" href="{{ get_url(path=stylesheet, cachebust=true) }}">
{% endfor -%}
{%- endif %}
{%- if config.extra.favicon %}
{% set image_meta = get_image_metadata(path=config.extra.favicon) -%}
<link rel="icon" type="{{ image_meta.mime | safe }}" href="{{ get_url(path=config.extra.favicon) }}">
{%- if image_meta.mime is ending_with("png") %}
{% set resized_image = resize_image(path=config.extra.favicon, width=180, height=180, op="fit") -%}
<link rel="apple-touch-icon" href="{{ resized_image.url | safe }}">
{%- endif -%}
{%- elif config.extra.favicon_emoji %}
<link rel="icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>{{ config.extra.favicon_emoji }}</text></svg>">
{%- endif %}
{% if current_url %}
<meta property="og:url" content="{{ current_url | safe }}">
<link rel="canonical" href="{{ current_url | safe }}">
{% endif %}
{% if page -%}
<meta property="og:type" content="article">
{% else -%}
<meta property="og:type" content="website">
{% endif -%}
{% if page.title %}
<meta property="og:title" content="{{ page.title }}">
<meta property="twitter:title" content="{{ page.title }}">
{% endif %}
<meta property="twitter:card" content="summary_large_image">
{% if page.extra.preview_img %}
<meta property="og:image" content="{{ get_url(path=page.extra.preview_img) }}" >
<meta property="twitter:image" content="{{ get_url(path=page.extra.preview_img) }}" >
{% endif %}
{%- if page.authors -%}
{%- for author in page.authors %}
<meta name="author" content="{{ author }}">
{%- endfor -%}
{%- elif page and config.author %}
<meta name="author" content="{{ config.author }}">
{%- endif %}
{%- block description -%}
{%- if config.description %}
<meta name="description" content="{{ config.description }}">
{%- endif %}
{%- endblock %}
<meta name="color-scheme" content="dark">
{%- if page.description -%}
<meta property="og:description" content="{{ page.description | markdown(inline=true) | striptags }}">
{% elif page.summary -%}
{%- set inline_summary = page.summary | linebreaksbr | replace(from="<br>", to=" ") | striptags -%}
<meta property="og:description" content="{{ inline_summary | trim_end_matches(pat=".") | safe }}">
{%- elif section.description -%}
<meta property="og:description" content="{{ section.description | markdown(inline=true) | striptags }}">
{% elif config.description -%}
<meta property="og:description" content="{{ config.description }}">
{% endif -%}
<meta property="og:site_name" content="{{ config.title }}">
<meta property="og:updated_time" content="{{ now() }}">
{%- if page.date %}
<meta property="article:published_time" content="{{ page.date | date(format="%+") }}">
{%- endif -%}
{%- if page.updated %}
<meta property="article:modified_time" content="{{ page.updated | date(format="%+") }}">
{%- endif -%}
{%- if page.taxonomies and page.taxonomies.categories %}
<meta property="article:section" content="{{ page.taxonomies.categories[0] }}">
{%- endif -%}
{%- if page.taxonomies and page.taxonomies.tags -%}
{%- for tag in page.taxonomies.tags %}
<meta property="article:tag" content="{{ tag }}">
{%- endfor -%}
{%- endif -%}
</head>
<body data-theme="dark">
<div class="content">
<header class="header">
{% filter indent -%}{%- filter indent -%}
{%- block header -%}
{% include "partials/header.html" %}
{%- endblock -%}
{%- endfilter -%}{%- endfilter %}
</header>
<main id="main">
{% block main %}{% endblock %}
</main>
<footer class="footer">
{% filter indent -%}{%- filter indent -%}
{%- block footer -%}
{% include "partials/footer.html" %}
{%- endblock -%}
{%- endfilter -%}{%- endfilter %}
</footer>
</div>
</body>
</html>

19
templates/blog-page.html Normal file
View file

@ -0,0 +1,19 @@
{% extends "base.html" %}
{% block main %}
<div class="blog-page">
<div class="title">
<h1>{{ page.title }}</h1>
<p><time>{{page.date}}</time>
{% if page.taxonomies %}{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %} • #{{tag}} {% endfor %}
{% endif %}{% endif %}
</p>
</div>
{{ page.content | safe }}
</div>
{% endblock main %}

15
templates/blog.html Normal file
View file

@ -0,0 +1,15 @@
{% extends "base.html" %}
{% import "macros/post.html" as posts %}
{% block main %}
<div class="blog">
{% for page in section.pages %}
{{ posts::excerpt(page=page) }}
{% endfor %}
</div>
{% endblock main %}

36
templates/index.html Normal file
View file

@ -0,0 +1,36 @@
{% extends "base.html" %}
{% import "macros/post.html" as posts %}
{% block main %}
<p>
Hi, I'm Parker. I like to talk about silly computer things and whatever else comes to mind.
</p>
<p>
You can find <a href="{{ get_url(path='@/blog/_index.md') }}">Posts</a>,
<a href="{{ get_url(path='@/projects/_index.md') }}">Projects</a>,
<a href="{{ get_url(path='@/crafts/_index.md') }}">Crafts</a>,
<a href="{{ get_url(path='@/pictures/_index.md') }}">Pictures</a>, and
<a href="{{ get_url(path='tags') }}">Tags</a> up above on any page.
</p>
<p>Please note that this page is currently under construction; not all content is finished.</p>
<p>If you'd like to employ me please take a look at my <a href="{{get_url(path='resume.pdf')}}">resume</a>.</p>
<br>
<p>Heres a list of stuff I'd like you to checkout:</p>
<ul>
<li>{{ posts::page_link(path="projects/automata.md") }}</li>
<li>{{ posts::page_link(path="projects/software-renderer.md") }}</li>
<li>{{ posts::page_link(path="projects/ansi.md") }}</li>
<li>{{ posts::page_link(path="projects/generators.md") }}</li>
<li>{{ posts::page_link(path="projects/fastexpr.md") }}</li>
<li>{{ posts::page_link(path="projects/kernel.md") }}</li>
<li>{{ posts::page_link(path="blog/first.md") }}</li>
</ul>
{% endblock main %}

View file

@ -0,0 +1,28 @@
{%- macro excerpt(page) -%}
<article class="excerpt">
<h1><a href="{{ page.permalink | safe }}">{{ page.title }}</a></h1>
<p><time>{{page.date | date(format="%b %d, %Y")}}</time>
{% if page.taxonomies %}{% if page.taxonomies.tags %}
{% for tag in page.taxonomies.tags %}
{% set url = get_taxonomy_url(kind="tags", name=tag, lang=page.lang) %}
<a href = "{{url}}">#{{tag}}</a>
{% endfor %}
{% endif %}{% endif %}
</p>
<div class="description">
{{page.description | markdown | safe}}
</div>
</article>
{%- endmacro -%}
{% macro page_link(path) %}
{% set p = get_page(path=path) %}
<a href="{{ p.permalink }}">{{ p.title }}</a>
{% if p.date %}
<time datetime="{{ p.date }}">
{{ p.date | date(format="%b %d, %Y") }}
</time>
{% endif %}
{% endmacro %}

View file

@ -0,0 +1,9 @@
{%- macro prettify(term) -%}
{%- if taxonomy.name == "categories" -%}
{{- "{" ~ term ~ "}" | safe -}}
{%- elif taxonomy.name == "tags" -%}
{{- "#" ~ term | safe -}}
{%- else -%}
{{- term | safe -}}
{%- endif -%}
{%- endmacro -%}

View file

@ -0,0 +1,8 @@
<p><a href="https://github.com/ParkerTenBroeck">ParkerTenBroeck</a> on GitHub
|
<a href="mailto:parker@parkertenbroeck.ca">parker@parkertenbroeck.ca</a>
|
<a href="{{ get_url(path='rss.xml', trailing_slash=false) }}">RSS</a>
|
<a href="{{ get_url(path='atom.xml', trailing_slash=false) }}">Atom</a>

View file

@ -0,0 +1,10 @@
<div class="title">
<a href="{{config.base_url}}">Hey! it's Grey</a>
</div>
<nav>
<a href="{{ get_url(path='@/blog/_index.md') }}">Posts</a>
<a href="{{ get_url(path='@/projects/_index.md') }}">Projects</a>
<a href="{{ get_url(path='@/crafts/_index.md') }}">Crafts</a>
<a href="{{ get_url(path='@/pictures/_index.md') }}">Pictures</a>
<a href="{{ get_url(path='tags') }}">Tags</a>
</nav>

95
templates/robots.txt Normal file
View file

@ -0,0 +1,95 @@
User-agent: TurnitinBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: Omgilibot
Disallow: /
User-agent: 008
Disallow: /
User-agent: voltron
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: AdsBot-Google
Disallow: /
User-agent: Amazonbot
Disallow: /
User-agent: Anthropic-ai
Disallow: /
User-agent: AwarioRssBot
Disallow: /
User-agent: AwarioSmartBot
Disallow: /
User-agent: Bytespider
Disallow: /
User-agent: CCBot
Disallow: /
User-agent: ChatGPT-User
Disallow: /
User-agent: ClaudeBot
Disallow: /
User-agent: Claude-Web
Disallow: /
User-agent: Cohere-ai
Disallow: /
User-agent: DataForSeoBot
Disallow: /
User-agent: FacebookBot
Disallow: /
User-agent: Google-Extended
Disallow: /
User-agent: GPTBot
Disallow: /
User-agent: ImagesiftBot
Disallow: /
User-agent: Magpie-crawler
Disallow: /
User-agent: Omgili
Disallow: /
User-agent: Omgilibot
Disallow: /
User-agent: Peer39_crawler
Disallow: /
User-agent: Peer39_crawler/1.0
Disallow: /
User-agent: PerplexityBot
Disallow: /
User-agent: YouBot
Disallow: /
Sitemap: {{ get_url(path="sitemap.xml") }}

View file

@ -0,0 +1,18 @@
{% extends "base.html" %}
{% import "macros/taxonomy.html" as macros %}
{% block main %}
<h1>{{ taxonomy.name | title }}</h1>
{%- set num_terms = terms | length %}
<ul class="taxonomy-list{%- if num_terms > 16 %} three-column{%- elif num_terms > 8 %} two-column{%- endif -%}">
{%- for term in terms %}
{%- set page_count = [term.page_count ~ " post", term.page_count | pluralize] | join %}
<li><a href="{{ term.permalink | safe }}">{{ macros::prettify(term=term.name) }}</a> ({{ page_count }})</li>
{%- endfor %}
</ul>
{% endblock main %}

View file

@ -0,0 +1,39 @@
{% extends "base.html" %}
{% import "macros/taxonomy.html" as macros %}
{% import "macros/post.html" as posts %}
{%- block title -%}
{{ term.name | title }} | {{ config.title }}
{%- endblock -%}
{# {%- block feeds -%}
{%- if taxonomy.feed -%}
{%- for filename in config.feed_filenames -%}
{%- if taxonomy.name is ending_with("ies") -%}
{%- set singular_name = taxonomy.name | replace(from="ies", to="y") -%}
{%- else -%}
{%- set singular_name = taxonomy.name | trim_end_matches(pat="s") -%}
{%- endif -%}
{%- set feed_title = config.title ~ " | Posts in the '" ~ term.name ~ "' " ~ singular_name -%}
{%- set feed_filename = taxonomy.name ~ "/" ~ term.name ~ "/" ~ filename -%}
{{ feed_macros::link_alternate(filename=feed_filename, title=feed_title) }}
{% endfor -%}
{%- endif -%}
{%- endblock -%} #}
{% block rss %}
{% set rss_path = "tags/" ~ term.name ~ "/rss.xml" %}
<link rel="alternate" type="application/rss+xml" title="RSS" href="{{ get_url(path=rss_path, trailing_slash=false) }}">
{% endblock rss %}
{%- block main -%}
<h1>{{ macros::prettify(term=term.name) }}</h1>
<div>
{%- for page in paginator.pages | default(value=term.pages) %}
{{ posts::excerpt(page=page) }}
{%- endfor %}
</div>
{%- endblock -%}