commit 9d6e149432c23c3f324dd025ef929aa294a3d466
parent aa9863ede1ba5f058b75d59b9f001b16f30992dc
Author: Oscar Benedito <oscar@obenedito.org>
Date:   Mon,  9 Sep 2019 17:38:12 +0200

Added RSS feed visibility and changed taxonomies

Diffstat:
Mconfig.toml | 10+++++++---
Mlayouts/404.html | 23+----------------------
Mlayouts/_default/single.html | 6+++---
Dlayouts/_default/taxonomy.html | 14--------------
Mlayouts/index.html | 23+----------------------
Alayouts/index.xml | 1+
Mlayouts/partials/footer.html | 1+
Mlayouts/partials/head.html | 1+
Alayouts/partials/main.html | 22++++++++++++++++++++++
Alayouts/taxonomy/taxonomy.html | 14++++++++++++++
Alayouts/taxonomy/terms.html | 1+
11 files changed, 52 insertions(+), 64 deletions(-)

diff --git a/config.toml b/config.toml @@ -1,17 +1,21 @@ baseURL = "https://obenedito.org/" languageCode = "en-us" title = "Oscar Benedito" -paginate = 1 +author = "Oscar Benedito" +paginate = 5 summaryLength = 15 +[params] + blog_title = "Oscar's Blog" + [taxonomies] category = "categories" tag = "tags" [permalinks] blog = "/blog/:year/:month/:slug/" - categories = "/blog/category/:slug/" - tags = "/blog/tag/:slug/" + categories = "/blog/categories/:slug/" + tags = "/blog/tags/:slug/" [frontmatter] date = [":filename", ":default"] diff --git a/layouts/404.html b/layouts/404.html @@ -1,22 +1 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="description" content="Oscar Benedito's website"> - <meta name="author" content="Oscar Benedito"> - <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> - <title>Oscar Benedito</title> - <link rel="icon" href="/img/favicon.svg"> - {{ $style := resources.Get "landing.css" | resources.Minify }} - <link rel="stylesheet" href="{{ $style.Permalink }}"> - </head> - <body> - <div class="content"> - <h1>Oscar Benedito</h1> - <p> - <a href="mailto:oscar@obenedito.org"><svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"/></svg></a> - <a href="https://gitlab.com/oscarbenedito"><svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M105.2 24.9c-3.1-8.9-15.7-8.9-18.9 0L29.8 199.7h132c-.1 0-56.6-174.8-56.6-174.8zM.9 287.7c-2.6 8 .3 16.9 7.1 22l247.9 184-226.2-294zm160.8-88l94.3 294 94.3-294zm349.4 88l-28.8-88-226.3 294 247.9-184c6.9-5.1 9.7-14 7.2-22zM425.7 24.9c-3.1-8.9-15.7-8.9-18.9 0l-56.6 174.8h132z"/></svg></a> - </p> - </div> - </body> -</html> +{{ partial "main.html" . }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html @@ -2,7 +2,7 @@ <header class="hero is-primary"> <div class="hero-body"> <div class="section container has-text-centered"> - <h1 class="title is-1 has-text-centered">Oscar's Blog</h1> + <h1 class="title is-1 has-text-centered">{{ .Site.Params.blog_title }}</h1> <h2 class="subtitle is-4 has-text-centered">{{ .Params.categories | title }} entry</h2> </div> </div> @@ -13,13 +13,13 @@ <div class="columns"> <div class="column is-8 is-offset-2"> <h1 class="title">{{ .Title }}</h1> - <p class="has-text-grey is-size-6 subtitle">{{ with .Params.categories }}<a class="has-text-grey" href="{{ "blog/category/" | relURL }}{{ . | urlize }}">{{ . | title }}</a> &middot; {{ end }}{{ .Date.Format "January 2, 2006" }}{{ if .Lastmod }} (last modified on {{ .Lastmod.Format "January 2, 2006" }}){{ end }}</p> + <p class="has-text-grey is-size-6 subtitle">{{ with .Params.categories }}<a class="has-text-grey" href="{{ "blog/categories/" | relURL }}{{ . | urlize }}">{{ . | title }}</a> &middot; {{ end }}{{ .Date.Format "January 2, 2006" }}{{ if .Lastmod }} (last modified on {{ .Lastmod.Format "January 2, 2006" }}){{ end }}</p> {{ .Content }} {{ if .Params.tags }} <div class="tags"> - {{ range sort .Params.tags }}<a class="tag is-primary" href="{{ "blog/tag/" | relURL }}{{ . | urlize }}">{{ . }}</a>{{ end }} + {{ range sort .Params.tags }}<a class="tag is-primary" href="{{ "blog/tags/" | relURL }}{{ . | urlize }}">{{ . }}</a>{{ end }} </div> {{ end }} diff --git a/layouts/_default/taxonomy.html b/layouts/_default/taxonomy.html @@ -1,14 +0,0 @@ -{{ define "hero-header"}} -<header class="hero is-primary"> - <div class="hero-body"> - <div class="section container has-text-centered"> - <h1 class="title is-1 has-text-centered">Oscar's Blog</h1> - <h2 class="subtitle is-4 has-text-centered">{{ .Data.Singular | title }}: {{ .Title | title }}</h2> - </div> - </div> -</header> -{{ end }} -{{ define "main" }} -{{ partial "list.html" . }} -{{ partial "pagination.html" . }} -{{ end }} diff --git a/layouts/index.html b/layouts/index.html @@ -1,22 +1 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset="utf-8"> - <meta name="description" content="Oscar Benedito's website"> - <meta name="author" content="Oscar Benedito"> - <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> - <title>Oscar Benedito</title> - <link rel="icon" href="/img/favicon.svg"> - {{ $style := resources.Get "landing.css" | resources.Minify }} - <link rel="stylesheet" href="{{ $style.Permalink }}"> - </head> - <body> - <div class="content"> - <h1>Oscar Benedito</h1> - <p> - <a href="mailto:oscar@obenedito.org"><svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"/></svg></a> - <a href="https://gitlab.com/oscarbenedito"><svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M105.2 24.9c-3.1-8.9-15.7-8.9-18.9 0L29.8 199.7h132c-.1 0-56.6-174.8-56.6-174.8zM.9 287.7c-2.6 8 .3 16.9 7.1 22l247.9 184-226.2-294zm160.8-88l94.3 294 94.3-294zm349.4 88l-28.8-88-226.3 294 247.9-184c6.9-5.1 9.7-14 7.2-22zM425.7 24.9c-3.1-8.9-15.7-8.9-18.9 0l-56.6 174.8h132z"/></svg></a> - </p> - </div> - </body> -</html> +{{ partial "main.html" . }} diff --git a/layouts/index.xml b/layouts/index.xml @@ -0,0 +1 @@ +{{ partial "main.html" . }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html @@ -8,6 +8,7 @@ <p class="bd-footer-link-title"><a href="/">Home</a></p> <p class="bd-footer-link-title"><a href="/blog/">Blog</a></p> <p class="bd-footer-link-title"><a href="/jsweblabels/" data-jslicense="1">JavaScript Web Labels</a></p> + <p class="bd-footer-link-title"><a href="/blog/index.xml">RSS feed</a></p> </div> </div> </div> diff --git a/layouts/partials/head.html b/layouts/partials/head.html @@ -5,6 +5,7 @@ <meta name="author" content="{{ .Site.Author }}"> <link rel="icon" href="/img/favicon.svg"> <title>{{ if .Params.headtitle }}{{ .Params.headtitle }} | {{ else if eq .Kind "taxonomy" }}{{ .Title | title }} | {{ else if not .IsHome }}{{ .Title }} | {{ end }}{{ .Site.Title }}</title> + <link rel="alternate" type="application/rss+xml" title="{{ .Site.Params.blog_title }}" href=/blog/index.xml> {{ $options := (dict "targetPath" "style.css" "outputStyle" "compressed" "enableSourceMap" true "includePaths" (slice "node_modules/myscss")) }} {{ $style := resources.Get "style.scss" | resources.ToCSS $options }} <link rel="stylesheet" href="{{ $style.RelPermalink }}"> diff --git a/layouts/partials/main.html b/layouts/partials/main.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html> + <head> + <meta charset="utf-8"> + <meta name="description" content="Oscar Benedito's website"> + <meta name="author" content="{{ .Site.Author }}"> + <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> + <title>Oscar Benedito</title> + <link rel="icon" href="/img/favicon.svg"> + {{- $style := resources.Get "landing.css" | resources.Minify }} + <link rel="stylesheet" href="{{ $style.Permalink }}"> + </head> + <body> + <div class="content"> + <h1>Oscar Benedito</h1> + <p> + <a href="mailto:oscar@obenedito.org"><svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M502.3 190.8c3.9-3.1 9.7-.2 9.7 4.7V400c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V195.6c0-5 5.7-7.8 9.7-4.7 22.4 17.4 52.1 39.5 154.1 113.6 21.1 15.4 56.7 47.8 92.2 47.6 35.7.3 72-32.8 92.3-47.6 102-74.1 131.6-96.3 154-113.7zM256 320c23.2.4 56.6-29.2 73.4-41.4 132.7-96.3 142.8-104.7 173.4-128.7 5.8-4.5 9.2-11.5 9.2-18.9v-19c0-26.5-21.5-48-48-48H48C21.5 64 0 85.5 0 112v19c0 7.4 3.4 14.3 9.2 18.9 30.6 23.9 40.7 32.4 173.4 128.7 16.8 12.2 50.2 41.8 73.4 41.4z"/></svg></a> + <a href="https://gitlab.com/oscarbenedito"><svg class="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M105.2 24.9c-3.1-8.9-15.7-8.9-18.9 0L29.8 199.7h132c-.1 0-56.6-174.8-56.6-174.8zM.9 287.7c-2.6 8 .3 16.9 7.1 22l247.9 184-226.2-294zm160.8-88l94.3 294 94.3-294zm349.4 88l-28.8-88-226.3 294 247.9-184c6.9-5.1 9.7-14 7.2-22zM425.7 24.9c-3.1-8.9-15.7-8.9-18.9 0l-56.6 174.8h132z"/></svg></a> + </p> + </div> + </body> +</html> diff --git a/layouts/taxonomy/taxonomy.html b/layouts/taxonomy/taxonomy.html @@ -0,0 +1,14 @@ +{{ define "hero-header"}} +<header class="hero is-primary"> + <div class="hero-body"> + <div class="section container has-text-centered"> + <h1 class="title is-1 has-text-centered">{{ .Site.Params.blog_title }}</h1> + <h2 class="subtitle is-4 has-text-centered">{{ .Data.Singular | title }}: {{ .Title | title }}</h2> + </div> + </div> +</header> +{{ end }} +{{ define "main" }} +{{ partial "list.html" . }} +{{ partial "pagination.html" . }} +{{ end }} diff --git a/layouts/taxonomy/terms.html b/layouts/taxonomy/terms.html @@ -0,0 +1 @@ +{{ partial "main.html" . }}