Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ jobs:
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true # might not be needed for current setup
hugo-version: '0.154.5'
extended: true

- name: Build blog
run: hugo --minify
run: hugo

- name: Deploy blog to github pages
uses: peaceiris/actions-gh-pages@v3
Expand All @@ -41,13 +41,9 @@ jobs:
# GITHUB_CONTEXT: ${{ toJson(github) }}
# run: echo $GITHUB_CONTEXT

- name: Purge cloudflare cache
- name: Purge Cloudflare cache
if: github.ref == 'refs/heads/main'
uses: jakejarvis/cloudflare-purge-action@master
env:
CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
GTOKEN: ${{ github.token }}
GUSER: ${{ github.repository_owner }}
GREPO: blog
run: |
chmod +x ./purge_cloudflare_cache.sh
./purge_cloudflare_cache.sh $GUSER $GREPO $GTOKEN
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE_ID }}
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
18 changes: 10 additions & 8 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@ baseURL = "/"
languageCode = "en-us"
title = "Just a bunch of stuff"
theme = "binario"
paginate = 10

[Author]
[pagination]
pagerSize = 10

[Params]
authorbox = true

[Params.Author]
name = "asabla"
bio = "Just your average developer monkey"
related = true
relatedMax = 5

[Params]
authorbox = true

[Params.Entry]
tor = true
tocOpen = true
Expand All @@ -32,13 +34,13 @@ paginate = 10
# https://www.w3.org/TR/appmanifest/
# https://developers.google.com/web/fundamentals/web-app-manifest/
[Params.Manifest]
name = "Binario"
shortName = "Binario"
name = "Just a bunch of stuff"
shortName = "asabla blog"
display = "browser"
startUrl = "/"
backgroundColor = "#2a2a2a"
themeColor = "#1b1b1b"
description = "Responsive card-based & code-light Hugo theme"
description = "Just your average developer monkey's blog"
orientation = "portrait"
scope = "/"

Expand Down
61 changes: 61 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<!DOCTYPE html>
<html class="no-js" lang="{{ .Site.LanguageCode | default "en-us" }}">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="{{ .Site.Params.Manifest.themeColor | default "#1b1b1b" }}">
<title>{{ block "title" . }}{{ if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}{{ end }}</title>
<script>(function(d,e){d[e]=d[e].replace("no-js","js");})(document.documentElement,"className");</script>
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.description }}{{ else }}{{ .Description }}{{ end }}">
{{- if .Site.Params.opengraph }}
{{ template "_internal/opengraph.html" . }}
{{- end }}
{{- if .Site.Params.schema }}
{{ template "_internal/schema.html" . }}
{{- end }}
{{- if .Site.Params.twitter_cards }}
{{ template "_internal/twitter_cards.html" . }}
{{- end }}
{{- $cssReboot := resources.Get "css/reboot.css" }}
{{- $cssMain := resources.Get "css/main.css" }}
{{- $cssPrint := resources.Get "css/print.css" }}
{{- $style := slice $cssReboot $cssMain $cssPrint | resources.Concat "css/bundle.css" }}
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{- range .Site.Params.customCSS }}
<link rel="stylesheet" href="{{ . | relURL }}">
{{- end }}
{{- with .Site.Params.colorTheme }}
<link rel="stylesheet" href="{{ (printf "css/themes/%s.css" .) | relURL }}">
{{- end }}
<link rel="icon" href="{{ "icons/16.png" | relURL }}" sizes="16x16" type="image/png">
<link rel="icon" href="{{ "icons/32.png" | relURL }}" sizes="32x32" type="image/png">
{{- with .OutputFormats.Get "rss" }}
{{ printf `<link rel="%s" type="%s" href="%s" title="%s">` .Rel .MediaType.Type .RelPermalink $.Site.Title | safeHTML }}
{{- end }}
{{- with ((.Site.GetPage "home").OutputFormats.Get "manifest") }}
<link rel="manifest" href="{{ "manifest.json" | relURL }}">
{{- end }}
</head>
<body class="body kind-{{ .Kind }}">
{{ partial "header" . }}
<div class="primary">
{{ block "main" . }}
{{- if or .Title .Content }}
<div class="page block">
{{ with .Title }}<h1 class="page__title">{{ . }}</h1>{{ end }}
{{ with .Content }}<div class="page__content{{ if not $.Title }} page__content--notitle{{ end }}">{{ . }}</div>{{ end }}
</div>
{{ end }}
{{ end }}
</div>
{{ partial "footer" . }}
{{- with .Site.Menus.main }}
<script src="{{ "js/menu.js" | relURL }}"></script>
{{- end }}
{{- partial "mathjax.html" . -}}
{{- range .Site.Params.customJS }}
<script src="{{ . | relURL }}"></script>
{{- end }}
</body>
</html>
1 change: 1 addition & 0 deletions layouts/partials/comments.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{{- /* Disqus comments disabled - .Site.DisqusShortname removed in Hugo v0.125.0+ */ -}}