Skip to content

Commit

Permalink
Merge pull request #742 from alexwlchan/tidy-up-config
Browse files Browse the repository at this point in the history
Tidy up my _config.yml configuration file
  • Loading branch information
alexwlchan authored Apr 5, 2024
2 parents 6eeaba0 + 89774da commit 9733278
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 23 deletions.
83 changes: 67 additions & 16 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,74 @@
title: "alexwlchan"
emails:
personal: "[email protected]"
wellcome: "[email protected]"
# ====================
# Global configuration
# ====================
#
# See https://jekyllrb.com/docs/configuration/options/#global-configuration

source: "src"
destination: "_site"

include:

# This file is used by Netlify to define redirects. I also use it
# to create the custom 404 page.
#
# Jekyll ignores files that start with an underscore, so I need to
# include this explicitly.
#
# See https://docs.netlify.com/routing/redirects/
- "_redirects"

# =====================
# Build command options
# =====================
#
# See https://jekyllrb.com/docs/configuration/options/#build-command-options

# This enables strict parsing of the YAML front matter.
strict_front_matter: true

# =====================
# Serve command options
# =====================
#
# See https://jekyllrb.com/docs/configuration/options/#serve-command-options

port: 5757
host: "0.0.0.0"
livereload: true

# ==============
# Liquid options
# ==============
#
# See https://jekyllrb.com/docs/configuration/liquid/

liquid:
error_mode: strict
strict_filters: true

# Note: I deliberately omit `strict_variables: true` here, because
# sometimes I want to be able to skip variables in the front matter
# (e.g. I don't want to set an empty `nav_section: ""` for every page
# which doesn't belong to a section).

# ==================
# Template variables
# ==================
#
# These variables aren't part of any third-party Jekyll plugin; they're
# placeholders used in my templates.

title: "alexwlchan"
author: "Alex Chan"
description: "Alex Chan's personal blog"

email: "[email protected]"
url: "https://alexwlchan.net"

source: "src"
destination: "_site"
description: "Alex Chan's personal website"

# ================
# Remaining config

date_format: "%-d %B %Y"

Expand All @@ -22,11 +82,6 @@ keep_files: [
"favicons", "favicon.png", "favicon.ico", "headers",
]

# This is the file used by Netlify to define redirects and the custom
# 404 page. If we don't include this, Jekyll skips it in the sitebuild.
include:
- "_redirects"

markdown: "kramdown"

kramdown:
Expand All @@ -41,10 +96,6 @@ highlighter: "rouge"
plugins:
- "jekyll-include-cache"

liquid:
error_mode: "strict"
strict_filters: true

sass:
sass_dir: "_scss"
style: "compressed"
2 changes: 1 addition & 1 deletion src/404.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ title: 404 Not Found

You might want to try looking in the [homepage](/), or my [blog archive](/all-posts/).

If you were expecting to see something here, please [drop me an email]({{ site.emails.personal|encode_mailto }}?subject=404 Not Found on alexwlchan.net).
If you were expecting to see something here, please [drop me an email]({{ site.email | encode_mailto }}?subject=404 Not Found on alexwlchan.net).
2 changes: 1 addition & 1 deletion src/410.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ title: 410 Gone
You've followed a link that used to work, but it's not here any more.
Old content may be accessible through [the Internet Archive](https://archive.org/).

If you think I've removed something useful by mistake, please [send me an email]({{ site.emails.personal|encode_mailto }}?subject=410 Gone on alexwlchan.net).
If you think I've removed something useful by mistake, please [send me an email]({{ site.email|encode_mailto }}?subject=410 Gone on alexwlchan.net).
2 changes: 1 addition & 1 deletion src/_includes/head.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% assign safe_title = page.title | markdownify_oneline | smartify | strip_html %}

<title>{% if page.title and page.title != site.title and page.title != "" %}{{ safe_title }} &ndash; {% endif %}{{ site.title | smartify }}</title>
<title>{% if page.title and page.title != site.title and page.title != "" %}{{ safe_title }} &ndash; {% endif %}{{ site.title }}</title>

<meta name="description" content="{{ page.summary | default: site.description | escape }}">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,6 @@ And if you know of other good ones, please let me know!
This is just part of a bigger conversation at Wellcome about how we do a better job of trans inclusion.
A policy is part of that, but there's more we can do -- I'll be thinking about it more over the next few months, and hopefully I'll write about some of it here.

If you're interested in what we're doing, please get in touch -- by [Twitter] or <a href="{{ site.emails.personal | encode_mailto }}">email</a>.
If you're interested in what we're doing, please get in touch -- by [Twitter] or <a href="{{ site.email | encode_mailto }}">email</a>.

[Twitter]: https://twitter.com/alexwlchan
4 changes: 2 additions & 2 deletions src/atom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ layout: default_xml
<link href="{{ '/' | absolute_url }}" rel="alternate" type="text/html" />
<updated>{{ site.time | date_to_xmlschema }}</updated>
<id>{{ '/' | absolute_url | xml_escape }}</id>
<title type="html">{{ site.title | smartify | xml_escape }}</title>
<title type="html">{{ site.title | xml_escape }}</title>
<subtitle>{{ site.description | xml_escape }}</subtitle>

<author>
<name>{{ site.author | xml_escape }}</name>
<email>{{ site.emails.personal | xml_escape }}</email>
<email>{{ site.email | xml_escape }}</email>
</author>

{% assign all_posts = site.posts %}
Expand Down
2 changes: 1 addition & 1 deletion src/say-thanks.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ A nice email can really make my day!

If you're feeling extra generous, you can [send me a coffee][kofi] on Ko-fi.

[email]: {{ site.emails.personal | encode_mailto }}
[email]: {{ site.email | encode_mailto }}
[kofi]: https://ko-fi.com/alexwlchan

0 comments on commit 9733278

Please sign in to comment.