summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToby Vincent <tobyv13@gmail.com>2023-05-30 17:15:19 -0500
committerToby Vincent <tobyv13@gmail.com>2023-05-30 17:15:19 -0500
commite73de9d3dfc3da7fed92fcf3245a39ffe8dce6f9 (patch)
treecb946147093b74de1fce2fffe97eab075632f987
parent2dee9e4b88378d39002db86514ce48b6718e50d3 (diff)
feat: wrote about page and improved styles
-rw-r--r--config.toml31
-rw-r--r--content/_index.md11
-rw-r--r--content/about.md42
-rw-r--r--content/code/_index.md1
-rw-r--r--content/posts/_index.md1
-rw-r--r--content/posts/bees.md1
-rw-r--r--content/posts/yubikey.md8
-rw-r--r--sass/style.scss34
-rw-r--r--templates/index.html11
-rw-r--r--templates/macros.html53
-rw-r--r--templates/page.html10
-rw-r--r--templates/post.html5
-rw-r--r--templates/section.html9
-rw-r--r--templates/shortcodes/meta.html11
14 files changed, 153 insertions, 75 deletions
diff --git a/config.toml b/config.toml
index eefc5f3..0bac0c8 100644
--- a/config.toml
+++ b/config.toml
@@ -18,4 +18,33 @@ highlight_themes_css = [
[extra]
repository = "https://git.sr.ht/~tobyvin/tobyvin.dev"
license = "MIT"
-author = "Toby Vincent"
+
+[[extra.meta]]
+name = "Email"
+href = "mailto:contact@tobyvin.dev"
+display = "contact@tobyvin.dev"
+
+[[extra.meta]]
+name = "GitHub"
+href = "https://github.com/tobyvin"
+display = "tobyvin"
+
+[[extra.meta]]
+name = "Sourcehut"
+href = "https://sr.ht/~tobyvin"
+display = "~tobyvin"
+
+[[extra.meta]]
+name = "LinkedIn"
+href = "https://linkedin.com/in/tobyvin"
+display = "tobyvin"
+
+[[extra.meta]]
+name = "IRC Nick"
+href = "irc:irc.libra.chat"
+display = "tobyvin"
+
+[[extra.meta]]
+name = "PGP Key"
+href = "/publickey.asc"
+display = "C8F6E06F5C8E2634"
diff --git a/content/_index.md b/content/_index.md
index 33cae83..cb213cd 100644
--- a/content/_index.md
+++ b/content/_index.md
@@ -3,8 +3,9 @@ title = "Toby Vincent"
description = "Software Engineer - Tinker - Problem ~~creator~~ solver"
+++
-- email: [contact@tobyvin.dev](mailto:contact@tobyvin.dev)
-- github: [tobyvin](https://github.com/tobyvin)
-- sourcehut: [~tobyvin](https://sr.ht/~tobyvin)
-- linkedin: [tobyvin](https://linkedin.com/in/tobyvin)
-- pgp: [C8F6E06F5C8E2634](/publickey.asc)
+Learn [about](@/about.md) me, check out my [code](@/code/_index.md), or see if
+I've gotten around to writing any blog [posts](@/posts/_index.md).
+
+---
+
+{{ meta() }}
diff --git a/content/about.md b/content/about.md
index 65d0adb..89ec9ba 100644
--- a/content/about.md
+++ b/content/about.md
@@ -1,8 +1,42 @@
+++
-title = "About"
-date = 2023-05-17
+title = "Hello, World!"
+description = "About me"
+authors = ["Toby Vincent"]
+++
-## Toby Vincent
+My name is Toby Vincent. Some things about me; I have a passion for writing
+software, solving problems, and learning about new things. I consider myself to
+be a utilitarian in most regards, and live my life pretty minimally. I always
+enjoy an intriguing conversion and I try my best to have a positive impact on
+anyone I can.
-I am me.
+## Tools
+
+In the past few years, I writing code almost exclusively in Rust, and have grown
+to really love the language. I find the core design principals of the language
+to be well thought out, pragmatic, and intentional. That being said, I have
+enjoyed many other languages such as C, Python, and C#.
+
+As for my development environment, in short, I use Neovim on Arch Linux. The
+slightly longer version can be found in my dotfiles which are available on
+[Sourcehut] and [GitHub].
+
+In the end, it's the designing of systems, defining of logic, and solving of
+problems that I love. The tools I use; language, editor, or otherwise; are
+merely a means to that end.
+
+## My code is your code
+
+I, along with many others, feel software should be as accessible as possible,
+and support the idea of free (as in freedom) software. To the end, the code I
+write in my free time is released under MIT or Apache-2.0 licenses.
+
+## AMA, really
+
+Feel free to contact me through any channel. I'm open to any offers, questions,
+or just good conversations. :)
+
+{{ meta() }}
+
+[Sourcehut]: https://sr.ht/~tobyvin/.dotfiles
+[GitHub]: https://github.com/tobyvin/.dotfiles
diff --git a/content/code/_index.md b/content/code/_index.md
index b0f0ee4..3d9d56f 100644
--- a/content/code/_index.md
+++ b/content/code/_index.md
@@ -1,6 +1,7 @@
+++
title = "Code"
sort_by = "weight"
+description = "Noteable-ish projects"
+++
An exhastive list of my projects can be found on
diff --git a/content/posts/_index.md b/content/posts/_index.md
index 21e938a..b33cac7 100644
--- a/content/posts/_index.md
+++ b/content/posts/_index.md
@@ -1,5 +1,4 @@
+++
title = "Posts"
sort_by = "date"
-page_template = "post.html"
+++
diff --git a/content/posts/bees.md b/content/posts/bees.md
index 7e320dd..4e3413f 100644
--- a/content/posts/bees.md
+++ b/content/posts/bees.md
@@ -1,6 +1,5 @@
+++
title = "Bees"
-date = 2023-05-17
description = "Bees, what are they even about"
authors = ["Toby Vincent"]
+++
diff --git a/content/posts/yubikey.md b/content/posts/yubikey.md
index 0ba41d8..1dee3f2 100644
--- a/content/posts/yubikey.md
+++ b/content/posts/yubikey.md
@@ -1,8 +1,12 @@
+++
-title = "WSL2, Yubikey, and You! 🫵"
+title = "WSL2, Yubikey, and You"
description = "A WSL2 YubiKey setup guide."
-date = 2022-08-04T18:57:50Z
+date = 2022-08-04
+updated = 2022-08-24
authors = ["Toby Vincent"]
+
+[extra]
+toc = true
+++
## UPDATE 2022-8-24
diff --git a/sass/style.scss b/sass/style.scss
index bccc367..c2eddb8 100644
--- a/sass/style.scss
+++ b/sass/style.scss
@@ -26,8 +26,10 @@ a {
color: var(--aqua-dim);
}
+ text-decoration: none;
+
&:hover {
- text-decoration: none;
+ text-decoration: underline;
}
&:active {
@@ -35,14 +37,6 @@ a {
}
}
-nav a {
- text-decoration: none;
-
- &:hover {
- text-decoration: underline;
- }
-}
-
footer {
color: var(--gray);
font-size: 0.8rem;
@@ -127,10 +121,22 @@ body {
& > * {
display: inline;
}
+ }
+ }
- & > time {
- text-decoration: underline;
- }
+ address {
+ dl {
+ display: grid;
+ grid-template-columns: max-content auto;
+ }
+
+ dt {
+ grid-column-start: 1;
+ }
+
+ dd {
+ margin-left: 1rem;
+ grid-column-start: 2;
}
}
@@ -149,11 +155,7 @@ body {
li > article > header > hgroup > :first-child a {
color: var(--blue);
- text-decoration: none;
- &:hover {
- text-decoration: underline;
- }
&:visited {
color: var(--blue-dim);
}
diff --git a/templates/index.html b/templates/index.html
index 2a975e8..1118adb 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -1,4 +1,3 @@
-{# vim: set ft=htmldjango: #}
{% import "macros.html" as macros %}
<!DOCTYPE html>
<html lang="en">
@@ -28,17 +27,17 @@
<link rel="alternate"
type="application/rss+xml"
title="RSS"
- href="{{ get_url(path="rss.xml") | safe }}" />
+ href="{{ get_url(path="rss.xml", trailing_slash=false) }}" />
<link rel="stylesheet" type="text/css" href="/style.css" />
</head>
<body>
<header>
<nav>
- <span>{{ macros::nav_item(name=config.title, url=config.base_url) }}</span>
+ <span>{{ macros::nav_item(name=config.title, path="@/_index.md") }}</span>
<ul>
- <li>{{ macros::nav_item(name="About",url=get_url(path="@/about.md") ) }}</li>
- <li>{{ macros::nav_item(name="Code",url=get_url(path="@/code/_index.md") ) }}</li>
- <li>{{ macros::nav_item(name="Posts",url=get_url(path="@/posts/_index.md") ) }}</li>
+ <li>{{ macros::nav_item(name="About", path="@/about.md") }}</li>
+ <li>{{ macros::nav_item(name="Code", path="@/code/_index.md") }}</li>
+ <li>{{ macros::nav_item(name="Posts", path="@/posts/_index.md") }}</li>
</ul>
</nav>
</header>
diff --git a/templates/macros.html b/templates/macros.html
index 14dc9e7..3d96bc3 100644
--- a/templates/macros.html
+++ b/templates/macros.html
@@ -1,12 +1,17 @@
{# misc macros #}
-{% macro nav_item(name, url) %}
- {% if page %}
- {% set curr_url = get_url(path=page.path) %}
- {% elif section %}
- {% set curr_url = get_url(path=section.path) %}
- {% endif %}
- {% set url = url | trim_end_matches(pat="/") %}
- <a {% if curr_url and curr_url == url %}class="active"{% endif %} href={{ url }}>{{ name }}</a>
+{% macro meta_item(name, href, text) %}
+ <tr>
+ <td>
+ <strong>{{ name }}</strong>
+ </td>
+ <td>
+ <a href="{{ href }}">{{ text }}</a>
+ </td>
+ </tr>
+{% endmacro nav %}
+{% macro nav_item(name, path) %}
+ {% set url = get_url(path=path,trailing_slash=true) %}
+ <a {% if url == current_url %}class="active"{% endif %} href={{ url }}>{{ name }}</a>
{% endmacro nav %}
{% macro toc_item(item, depth=0) %}
<li>
@@ -28,11 +33,11 @@
</nav>
{% endif %}
{% endmacro %}
-{% macro header(item, full=false) %}
+{% macro header(item, link=true) %}
<header>
<hgroup>
<h1>
- {% if full or not item.permalink %}
+ {% if not link or not item.permalink %}
{{ item.title }}
{% elif item.extra.external %}
<a href="{{ item.extra.external }}">{{ item.title }}</a>
@@ -61,25 +66,19 @@
</time>
{% endif %}
{% if item.authors %}
- <address class="author">
- by
- {% for author in item.authors -%}
- {% if author == config.extra.author %}
- <a rel="author" href="{{ config.base_url }}">{{ author }}</a>,
- {% elif item.extra[author] %}
- <a rel="author" href="{{ item.extra[author] }}">{{ author }}</a>,
- {% else %}
- {{ author }}
- {% endif %}
- {% endfor %}
- </address>
+ <span>
+ <address>
+ by
+ {{ item.authors | join(sep=", ") }}
+ </address>
+ </span>
+ {% endif %}
+ {% if item.updated %}
+ <time datetime="{{ item.updated | date(format="%Y-%m-%d") }}">
+ (Edited: {{ item.updated | date(format="%d %b %Y") }})
+ </time>
{% endif %}
</p>
</footer>
{% endif %}
- {% if full and item.toc %}
- {{ macros::toc(toc=item.toc) }}
- {% elif item.summary %}
- <p>{{ item.summary | safe }} ...</p>
- {% endif %}
{% endmacro %}
diff --git a/templates/page.html b/templates/page.html
index 6548f9a..9b5f49a 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -1,10 +1,8 @@
{% extends "index.html" %}
{% block content %}
- <header>
- <hgroup>
- <h1>{{ page.title | safe }}</h1>
- <p>{{ page.description | default(value="") | markdown(inline=true) | safe }}</p>
- </hgroup>
- </header>
+ {{ macros::header(item=page, link=false) }}
+ {%- if page.toc and page.extra.toc -%}
+ {{ macros::toc(toc=page.toc) }}
+ {%- endif -%}
{{ page.content | safe }}
{% endblock content %}
diff --git a/templates/post.html b/templates/post.html
deleted file mode 100644
index 4381722..0000000
--- a/templates/post.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "index.html" %}
-{% block content %}
- {{ macros::header(item=page, full=true) }}
- {{ page.content | safe }}
-{% endblock content %}
diff --git a/templates/section.html b/templates/section.html
index aa120aa..b18fde2 100644
--- a/templates/section.html
+++ b/templates/section.html
@@ -4,7 +4,14 @@
<ul class="simple">
{% for item in section.pages %}
<li>
- <article>{{ macros::header(item=item) }}</article>
+ <article>
+ {{ macros::header(item=item) }}
+ {% if item.summary %}
+ <p>
+ {{ item.summary | safe }}<a href="{{ item.permalink }}#continue-reading">...</a>
+ </p>
+ {% endif %}
+ </article>
</li>
{% endfor %}
</ul>
diff --git a/templates/shortcodes/meta.html b/templates/shortcodes/meta.html
new file mode 100644
index 0000000..5a92161
--- /dev/null
+++ b/templates/shortcodes/meta.html
@@ -0,0 +1,11 @@
+{% import "macros.html" as macros %}
+<address>
+ <dl>
+ {%- for item in config.extra.meta -%}
+ <dt>{{ item.name }}</dt>
+ <dd>
+ <a href="{{ item.href }}">{{ item.display }}</a>
+ </dd>
+ {%- endfor -%}
+ </dl>
+</address>