sgregoratto.me

Hugo files for www.sgregoratto.me
git clone git://git.sgregoratto.me/sgregoratto.me
Log | Files | Refs

commit e8f0c40c9feaec9b037de9c803ec7a318e669989
Author: Stephen Gregoratto <dev@sgregoratto.me>
Date:   Tue, 15 Jan 2019 15:38:06 +1100

Add initial index, blog posts, static files.

Diffstat:
A.gitignore | 2++
AMakefile | 17+++++++++++++++++
Aarchetypes/default.md | 6++++++
Aconfig.toml | 25+++++++++++++++++++++++++
Acontent/_index.md | 40++++++++++++++++++++++++++++++++++++++++
Acontent/blog/_index.md | 3+++
Acontent/blog/how-not-to-blog-2018.md | 22++++++++++++++++++++++
Alayouts/404.html | 0
Alayouts/_default/list.html | 13+++++++++++++
Alayouts/_default/single.html | 7+++++++
Alayouts/index.atom.xml | 24++++++++++++++++++++++++
Alayouts/index.html | 6++++++
Alayouts/partials/footer.html | 11+++++++++++
Alayouts/partials/header.html | 11+++++++++++
Anew | 8++++++++
Astatic/css/code.css | 68++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Astatic/css/style.css | 60++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17 files changed, 323 insertions(+), 0 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,2 @@ +public +static/pubkey.txt diff --git a/Makefile b/Makefile @@ -0,0 +1,17 @@ +SERVER = liquid@blog.sgregoratto.me +WEB_ROOT = /var/www/homepage +RSOPTS = -chavzP + +all: generate +clean: + rm -rf public +gpg: + gpg --armor --export 3FC63D0E2801C3481C442D34A80C0F8E8BABEC8B > static/pubkey.txt +generate: gpg + hugo --minify +test: + hugo server -D +sync: generate + rsync -a public/ $(SERVER):$(WEB_ROOT)/ +.PHONY: clean +.SILENT: clean gpg generate sync diff --git a/archetypes/default.md b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +draft: true +--- + diff --git a/config.toml b/config.toml @@ -0,0 +1,25 @@ +baseURL = "https://www.sgregoratto.me/" +languageCode = "en-AU" +title = "My website" +pygmentsCodeFences = "true" +pygmentsStyle = "lovelace" +pygmentsUseClasses = "true" +FootnoteReturnLinkContents = "↩" + +disableKinds = ["RSS", "taxonomy", "taxonomyTerm"] + +[params] + dateform = "2006-01-02" + +[outputs] + home = ["HTML", "Atom"] + blog = ["HTML", "Atom"] + +[mediaTypes] +[mediaTypes."application/atom"] +suffixes = ["xml"] + +[outputFormats.Atom] +mediaType = "application/atom" +baseName = "atom" +isPlainText = false diff --git a/content/_index.md b/content/_index.md @@ -0,0 +1,40 @@ +--- +date: "2019-01-14T15:15:50+11:00" +draft: false +title: Whoami +--- + +Hello There\! I’m Stephen Gregoratto, computer science student at the +University of Wollongong. I’m currently halfway through my course so +far, but I also do other things in my spare time: + +## Blogging + +I run a blog called [/var/log/trash](/blog/), which mainly covers topics like +programming, text processing and quaint little UNIX things that I pick up/develop. +Don't expect intricate, well detailed posts or furious updates though. Like most +blogs, my posts will eventually be left in the trash heap of history. + +## Arch Packages + +I maintain a couple of packages on the AUR, located +[here](https://aur.archlinux.org/packages/?K=KingofToasters&SeB=m). +They’re mainly a mix of Go projects, UNIX shell tools, text processing +tools or other cool things I find. If anything is wrong with them, feel +free to yell at me in the comment section. + +# Contact + +I have three main email addresses: + +<dl> + <dt><a href=mailto:themanhimself@sgregoratto.me">personal@</a></dt> + <dd>For casual inquiries.</dd> + <dt><a href="mailto:dev@sgregoratto.me">dev@</a></dt> + <dd>Used to send/receive patches for the software projects I work on.</dd> + <dt><a href="mailto:work@sgregoratto.me">work@</a></dt> + <dd>Strictly for employment or work-related information.</dd> +</dl> + +I encourage the use of encrypting your email using my [PGP +Key](/pubkey.txt). diff --git a/content/blog/_index.md b/content/blog/_index.md @@ -0,0 +1,3 @@ +--- +title: /var/log/trash +--- diff --git a/content/blog/how-not-to-blog-2018.md b/content/blog/how-not-to-blog-2018.md @@ -0,0 +1,22 @@ +--- +date: "2019-01-07T21:22:31+11:00" +draft: true +title: How Not to Start a Blog in 2018 +--- + +This is a story about failure. I've wanted to start my own blog for +about a year now, to post about computing things that interest me. I'd +spent three months trying to bootstrap it, but now I've tossed all that +hard work in the bin. I distracted myself with AWK scripts, Makefiles +and shell pipelines and barely focused on the've actual meat of the +blog: it's posts. So now I humbly admit defeat and want to walk through +my failure, and how I moved on from it. + +## In The Beginning + +My urge to blog really started when trying to patch around a faulty[^1] +site generator. [Luke +Smith](https://www.youtube.com/channel/UC2eYFnH61tmytImy1mTYvhA), a +(mostly) Linux-focused youtuber made his own + +[^1]: I say faulty, but really diff --git a/layouts/404.html b/layouts/404.html diff --git a/layouts/_default/list.html b/layouts/_default/list.html @@ -0,0 +1,13 @@ +{{ partial "header.html" . }} +<header> + <h1 class="title">{{.Title}}</h1> +</header> +<table> + {{ range .Pages.ByPublishDate.Reverse }} + <tr> + <td><a href="{{ .Permalink }}">{{ .Title }}</a></td> + <td style="text-align:right"><time>{{.Date.Format .Site.Params.dateform}}</time></td> + </tr> + {{ end }} +</table> +{{ partial "footer.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -0,0 +1,7 @@ +{{ partial "header.html" . }} +<header> +<h1 class="title">{{.Title}}</h1> +<time class="date">{{ .Date.Format "January 2, 2006" }}</time> +</header> +{{ .Content }} +{{ partial "footer.html" . }} diff --git a/layouts/index.atom.xml b/layouts/index.atom.xml @@ -0,0 +1,24 @@ +<feed xmlns="http://www.w3.org/2005/Atom"> + <title>{{ .Site.Title }}</title> + <link href="{{ .Permalink }}atom.xml" rel="self"/> + <link href="{{ .Permalink }}"/> + {{ if not .Date.IsZero }} + <updated>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated> + {{ end }} + <id>{{ .Permalink }}</id> + <author> + <name>{{.Site.Author.Name}}</name> + <email>{{.Site.Author.Email}}</email> + </author> + <generator>Hugo</generator> + {{ range first 15 (where .Data.Pages "Type" "in" .Site.Params.mainSections) }} + <entry> + {{ `<title type="html"><![CDATA[` | safeHTML }}{{ .Title }}]]></title> + <link href="{{ .Permalink }}"/> + <id>{{ .Permalink }}</id> + <published>{{ .Date.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</published> + <updated>{{ .Lastmod.Format "2006-01-02T15:04:05-07:00" | safeHTML }}</updated> + {{ `<content type="html"><![CDATA[` | safeHTML }}{{ .Content }}]]></content> + </entry> + {{ end }} +</feed> diff --git a/layouts/index.html b/layouts/index.html @@ -0,0 +1,6 @@ +{{ partial "header.html" . }} +<header><h1 class="title">{{.Title}}</h1></header> +{{.Content}} +</article> +</body> +</html> diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -0,0 +1,11 @@ +</article> +<hr> +<nav> + <a href="/blog/">Home</a> + <a href="/">About</a> + <a href="/atom.xml">Feed</a> + <!-- <a href="https://github.com/The-King-of-Toasters/">GitHub</a> --> + <a href="/pubkey.txt">PGP</a> +</nav> +</body> +</html> diff --git a/layouts/partials/header.html b/layouts/partials/header.html @@ -0,0 +1,11 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"/> + <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes"/> + <title>{{.Title}}</title> + <link rel="alternate" type="application/atom+xml" title="/var/log/trash Atom Feed" href="atom.xml"/> + <link rel="stylesheet" href="/css/style.css"/> + </head> + <body> + <article> diff --git a/new b/new @@ -0,0 +1,8 @@ +#!/usr/bin/env rc +postdir='blog/' +if(~ $#* 0) { + echo error: no title given >[2=1] + exit 1 +} + +hugo new $postdir^`{echo -n $"* | tr -c 'A-Za-z0-9' '-'}^'.md' --editor B diff --git a/static/css/code.css b/static/css/code.css @@ -0,0 +1,68 @@ +/* Background */ .chroma { background-color: #f0f0f0 } +/* Error */ .chroma .err { } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; width: auto; overflow: auto; display: block; } +/* LineHighlight */ .chroma .hl { display: block; width: 100%;background-color: #ffffcc } +/* LineNumbersTable */ .chroma .lnt { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* LineNumbers */ .chroma .ln { margin-right: 0.4em; padding: 0 0.4em 0 0.4em; } +/* Keyword */ .chroma .k { color: #007020; font-weight: bold } +/* KeywordConstant */ .chroma .kc { color: #007020; font-weight: bold } +/* KeywordDeclaration */ .chroma .kd { color: #007020; font-weight: bold } +/* KeywordNamespace */ .chroma .kn { color: #007020; font-weight: bold } +/* KeywordPseudo */ .chroma .kp { color: #007020 } +/* KeywordReserved */ .chroma .kr { color: #007020; font-weight: bold } +/* KeywordType */ .chroma .kt { color: #902000 } +/* NameAttribute */ .chroma .na { color: #4070a0 } +/* NameBuiltin */ .chroma .nb { color: #007020 } +/* NameClass */ .chroma .nc { color: #0e84b5; font-weight: bold } +/* NameConstant */ .chroma .no { color: #60add5 } +/* NameDecorator */ .chroma .nd { color: #555555; font-weight: bold } +/* NameEntity */ .chroma .ni { color: #d55537; font-weight: bold } +/* NameException */ .chroma .ne { color: #007020 } +/* NameFunction */ .chroma .nf { color: #06287e } +/* NameLabel */ .chroma .nl { color: #002070; font-weight: bold } +/* NameNamespace */ .chroma .nn { color: #0e84b5; font-weight: bold } +/* NameTag */ .chroma .nt { color: #062873; font-weight: bold } +/* NameVariable */ .chroma .nv { color: #bb60d5 } +/* LiteralString */ .chroma .s { color: #4070a0 } +/* LiteralStringAffix */ .chroma .sa { color: #4070a0 } +/* LiteralStringBacktick */ .chroma .sb { color: #4070a0 } +/* LiteralStringChar */ .chroma .sc { color: #4070a0 } +/* LiteralStringDelimiter */ .chroma .dl { color: #4070a0 } +/* LiteralStringDoc */ .chroma .sd { color: #4070a0; font-style: italic } +/* LiteralStringDouble */ .chroma .s2 { color: #4070a0 } +/* LiteralStringEscape */ .chroma .se { color: #4070a0; font-weight: bold } +/* LiteralStringHeredoc */ .chroma .sh { color: #4070a0 } +/* LiteralStringInterpol */ .chroma .si { color: #70a0d0; font-style: italic } +/* LiteralStringOther */ .chroma .sx { color: #c65d09 } +/* LiteralStringRegex */ .chroma .sr { color: #235388 } +/* LiteralStringSingle */ .chroma .s1 { color: #4070a0 } +/* LiteralStringSymbol */ .chroma .ss { color: #517918 } +/* LiteralNumber */ .chroma .m { color: #40a070 } +/* LiteralNumberBin */ .chroma .mb { color: #40a070 } +/* LiteralNumberFloat */ .chroma .mf { color: #40a070 } +/* LiteralNumberHex */ .chroma .mh { color: #40a070 } +/* LiteralNumberInteger */ .chroma .mi { color: #40a070 } +/* LiteralNumberIntegerLong */ .chroma .il { color: #40a070 } +/* LiteralNumberOct */ .chroma .mo { color: #40a070 } +/* Operator */ .chroma .o { color: #666666 } +/* OperatorWord */ .chroma .ow { color: #007020; font-weight: bold } +/* Comment */ .chroma .c { color: #60a0b0; font-style: italic } +/* CommentHashbang */ .chroma .ch { color: #60a0b0; font-style: italic } +/* CommentMultiline */ .chroma .cm { color: #60a0b0; font-style: italic } +/* CommentSingle */ .chroma .c1 { color: #60a0b0; font-style: italic } +/* CommentSpecial */ .chroma .cs { color: #60a0b0; background-color: #fff0f0 } +/* CommentPreproc */ .chroma .cp { color: #007020 } +/* CommentPreprocFile */ .chroma .cpf { color: #007020 } +/* GenericDeleted */ .chroma .gd { color: #a00000 } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericError */ .chroma .gr { color: #ff0000 } +/* GenericHeading */ .chroma .gh { color: #000080; font-weight: bold } +/* GenericInserted */ .chroma .gi { color: #00a000 } +/* GenericOutput */ .chroma .go { color: #888888 } +/* GenericPrompt */ .chroma .gp { color: #c65d09; font-weight: bold } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { color: #800080; font-weight: bold } +/* GenericTraceback */ .chroma .gt { color: #0044dd } +/* GenericUnderline */ .chroma .gl { text-decoration: underline } +/* TextWhitespace */ .chroma .w { color: #bbbbbb } diff --git a/static/css/style.css b/static/css/style.css @@ -0,0 +1,60 @@ +body { + margin: 1em auto; + max-width: 40em; + padding: 0.62em; + font-family: sans-serif; + border: none; + vertical-align: baseline; +} +h1 ,h2, h3 { + line-height: 1.2; +} +.subtitle, .date { + font-weight: bold; +} +.date { + font-weight: bold; + color: #555; + margin: 0; + padding: 0; +} +.footnotes { + font-size: small; + text-decoration: none; +} +table { + width: 100%; + border-collapse: collapse; +} +figure { + font-style: italic; + text-align: center; +} +pre { + background-color: #f2f2f2; + border: 0.1em solid #ccc; + border-radius: .5em; + margin: 0 0 10px; + overflow: auto; + word-wrap: normal; + font-family: monospace; + white-space: pre; + padding: 1em; +} +blockquote { + padding: 0 0 0em 2em; + margin: 0em; + border-left: 0.3em #aaa solid; + color: #666; +} +blockquote p { + font-style: italic; +} +tr:nth-child(even) { + background-color: #f2f2f2; +} +@media print{ + body{ + max-width: none + } +}