Commit 90d11ad7 authored by Ruben Schade's avatar Ruben Schade
Browse files

Added posts for mid April 2019

parent ae324122
......@@ -22,7 +22,7 @@ So you hit up the paper towel dispenser, only to discover there isn't anywhere c
My name is Ruben Schade, and I'm mostly harmless. I live to tinker with vintage computer hardware, write, drink interesting coffee in nice cafes in the mid-morning, and flesh out about pages not unlike this one. My beautiful girlfriend Clara and I spend far too much time drinking bubble tea and [travelling].
I make a living as a technical writer and solution architect for an IaaS company in Sydney and San Francisco, but I grew up in Singapore where I developed a taste for well-funded infrastructure, lah.
I make a living as a technical writer and solutions architect for an IaaS company in Sydney and San Francisco, but I grew up in Singapore where I developed a taste for well-funded infrastructure.
[Clara]: http://kiri.sasara.moe/
[podcast]: https://rubenerd.com/show/
......
---
title: "Don’t confuse gohugo by adding symlinks"
date: "2019-04-17T00:21:46+10:00"
abstract: "Cannot walk regular file... strikes again."
year: "2019"
category: Software
tag:
- blogging
- gohugo
- troubleshooting
location: Sydney
---
I was wondering why [Hugo](https://gohugo.io) could generate on my FreeBSD cloud VM, but not locally. I ran a plain hugo command:
$ hugo
==> Error: Cannot walk regular file
Could this just be it? If so, it's one of the most routine mistakes one can make on a \*nix system.
Earlier in the week I'd created a symlink to the layouts directory of my current theme, to save some typing.
$ ln -s ./themes/rubenerd-rubi/layouts ./layouts
Even though Hugo's `config.yaml` was specifically set to use that theme, it still attempted to load that folder as well. I've since learned this is expected, and in fact desired behavior: you may want to override a theme with a local site file.
*(Yes, I use YAML. I couldn't grok TOML).*
So lesson learned, don't try and get clever.
......@@ -6,13 +6,12 @@
SERVER="rubenerd.com"
THUMB="video.jpg"
PLAY1X="../metadata/play@1x.png"
PLAY2X="../metadata/play@2x.png"
## Download video thumbnail
VIDEO=`youtube-dl --get-thumb --no-warnings $1 | tail -1`
curl -Lo "$THUMB" "$VIDEO"
curl -Lo "video.jpg" "$VIDEO"
## Get video title
TITLE=`youtube-dl --get-title --no-warnings $1 | tail -1`
......@@ -36,5 +35,5 @@ convert -resize 500x281 "video.jpg" -quality 97 "yt-$ID@1x.jpg" \
+page "$PLAY1X" -flatten "yt-$ID@1x.jpg"
## Upload files and delete on success
scp yt-$ID@*jpg $SERVER:$YEAR/ && rm -rf yt-$ID@*jpg && rm -rf "$THUMB"
scp yt-$ID@*jpg $SERVER:$YEAR/ && rm -rf yt-$ID@*jpg
{{ partial "header.html" . }}{{ $paginator := .Paginate (where .Pages "Type" "post") }}{{ range $paginator.Pages }}
{{ partial "header.html" . }}{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}{{ range $paginator.Pages }}
{{ safeHTML "<!-- Blog post です -->" }}
<article class="post" resource="{{ .Permalink }}">
......@@ -20,6 +20,7 @@
{{ safeHTML "<!-- Content ends です -->" }}
</main>
{{ safeHTML "<!-- Pagination links です -->" }}
<nav id="pagination">{{ if .Paginator.HasPrev }}<a rel="Next" id="page-newer" href="{{ .Paginator.Prev.URL }}">Newer posts</a> <span aria-hidden="true" class="page-arrow">&larr;</span>{{ end }}
<span id="page-number">Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span>
......
......@@ -103,8 +103,8 @@ table th, table td {
padding:0.3em 1em;
}
table code {
background:transparent;
font-size:12px;
background:transparent;
font-size:12px;
}
figure {
margin-left:0;
......@@ -136,7 +136,7 @@ figcaption {
/***** RETINA です*****/
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution:144dpi) {
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution:192dpi) {
body {
background-image: url("rubi@2x.jpg");
background-size:190px 559px;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment