Hugo upgrade (0.121.2 -> 0.167.0):
- remove the blackfriday and pygments* settings (markup.highlight instead)
- languageName -> label, _build -> build, .Scratch -> .Store,
.Sites -> hugo.Sites, .LanguageName -> .Label, .LanguageCode -> .Locale
- move the templates to the new layout tree (_partials, _shortcodes,
home.html, page.html, term.html, taxonomy.html, section.html)
- use the embedded pagination, opengraph and twitter_cards partials
- fix the term filtering in post-metadata.html (.Data.<singular> is gone)
- keep the taxonomy terms as written (capitalizeListTitles: false) and
give a proper title to the blog section ("Articles" instead of "Blogs")
- <s> is raw HTML (omitted by Goldmark): use ~~ instead
- use relref for a relative link that was broken in the RSS feeds
Mounts:
- the english content not translated in french is now published in the
french site through module mounts, instead of symlinks created by the
./hugo script. hugo and hugo server can be used directly.
- chroma.css is now versioned instead of generated at each build
- remove the ./hugo script and realpath.py
The generated site has the same set of files. The remaining differences
come from the new minifier, the new embedded templates (og:locale, empty
meta tags removed, youtube iframe) and the new summary computation.
Refs #11
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YNHsWYTXPThURz6TbVS1j3
master
@ -1 +0,0 @@ |
|||
chroma.css |
|||
@ -0,0 +1,62 @@ |
|||
/* Generated using: hugo gen chromastyles --style=borland */ |
|||
|
|||
/* Background */ .bg { background-color:#fff; } |
|||
/* PreWrapper */ .chroma { background-color:#fff;-webkit-text-size-adjust:none; } |
|||
/* Error */ .chroma .err { color:#a61717;background-color:#e3d2d2 } |
|||
/* LineLink */ .chroma .lnlinks { outline:none;text-decoration:none;color:inherit } |
|||
/* LineTableTD */ .chroma .lntd { vertical-align:top;padding:0;margin:0;border:0; } |
|||
/* LineTable */ .chroma .lntable { border-spacing:0;padding:0;margin:0;border:0; } |
|||
/* LineHighlight */ .chroma .hl { background-color:#e5e5e5 } |
|||
/* LineNumbersTable */ .chroma .lnt { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f } |
|||
/* LineNumbers */ .chroma .ln { white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f } |
|||
/* Line */ .chroma .line { display:flex; } |
|||
/* Keyword */ .chroma .k { color:#000080;font-weight:bold } |
|||
/* KeywordConstant */ .chroma .kc { color:#000080;font-weight:bold } |
|||
/* KeywordDeclaration */ .chroma .kd { color:#000080;font-weight:bold } |
|||
/* KeywordNamespace */ .chroma .kn { color:#000080;font-weight:bold } |
|||
/* KeywordPseudo */ .chroma .kp { color:#000080;font-weight:bold } |
|||
/* KeywordReserved */ .chroma .kr { color:#000080;font-weight:bold } |
|||
/* KeywordType */ .chroma .kt { color:#000080;font-weight:bold } |
|||
/* NameAttribute */ .chroma .na { color:#f00 } |
|||
/* NameTag */ .chroma .nt { color:#000080;font-weight:bold } |
|||
/* LiteralString */ .chroma .s { color:#00f } |
|||
/* LiteralStringAffix */ .chroma .sa { color:#00f } |
|||
/* LiteralStringBacktick */ .chroma .sb { color:#00f } |
|||
/* LiteralStringChar */ .chroma .sc { color:#800080 } |
|||
/* LiteralStringDelimiter */ .chroma .dl { color:#00f } |
|||
/* LiteralStringDoc */ .chroma .sd { color:#00f } |
|||
/* LiteralStringDouble */ .chroma .s2 { color:#00f } |
|||
/* LiteralStringEscape */ .chroma .se { color:#00f } |
|||
/* LiteralStringHeredoc */ .chroma .sh { color:#00f } |
|||
/* LiteralStringInterpol */ .chroma .si { color:#00f } |
|||
/* LiteralStringOther */ .chroma .sx { color:#00f } |
|||
/* LiteralStringRegex */ .chroma .sr { color:#00f } |
|||
/* LiteralStringSingle */ .chroma .s1 { color:#00f } |
|||
/* LiteralStringSymbol */ .chroma .ss { color:#00f } |
|||
/* LiteralNumber */ .chroma .m { color:#00f } |
|||
/* LiteralNumberBin */ .chroma .mb { color:#00f } |
|||
/* LiteralNumberFloat */ .chroma .mf { color:#00f } |
|||
/* LiteralNumberHex */ .chroma .mh { color:#00f } |
|||
/* LiteralNumberInteger */ .chroma .mi { color:#00f } |
|||
/* LiteralNumberIntegerLong */ .chroma .il { color:#00f } |
|||
/* LiteralNumberOct */ .chroma .mo { color:#00f } |
|||
/* OperatorWord */ .chroma .ow { font-weight:bold } |
|||
/* Comment */ .chroma .c { color:#080;font-style:italic } |
|||
/* CommentHashbang */ .chroma .ch { color:#080;font-style:italic } |
|||
/* CommentMultiline */ .chroma .cm { color:#080;font-style:italic } |
|||
/* CommentSingle */ .chroma .c1 { color:#080;font-style:italic } |
|||
/* CommentSpecial */ .chroma .cs { color:#080;font-weight:bold } |
|||
/* CommentPreproc */ .chroma .cp { color:#008080 } |
|||
/* CommentPreprocFile */ .chroma .cpf { color:#008080 } |
|||
/* GenericDeleted */ .chroma .gd { color:#000;background-color:#fdd } |
|||
/* GenericEmph */ .chroma .ge { font-style:italic } |
|||
/* GenericError */ .chroma .gr { color:#a00 } |
|||
/* GenericHeading */ .chroma .gh { color:#999 } |
|||
/* GenericInserted */ .chroma .gi { color:#000;background-color:#dfd } |
|||
/* GenericOutput */ .chroma .go { color:#888 } |
|||
/* GenericPrompt */ .chroma .gp { color:#555 } |
|||
/* GenericStrong */ .chroma .gs { font-weight:bold } |
|||
/* GenericSubheading */ .chroma .gu { color:#aaa } |
|||
/* GenericTraceback */ .chroma .gt { color:#a00 } |
|||
/* GenericUnderline */ .chroma .gl { text-decoration:underline } |
|||
/* TextWhitespace */ .chroma .w { color:#bbb } |
|||
@ -0,0 +1,3 @@ |
|||
--- |
|||
title: "Articles" |
|||
--- |
|||
@ -0,0 +1,3 @@ |
|||
--- |
|||
title: "Articles" |
|||
--- |
|||
@ -1,42 +0,0 @@ |
|||
#!/bin/bash |
|||
|
|||
set -Eeuo pipefail |
|||
trap cleanup SIGINT SIGTERM ERR EXIT |
|||
|
|||
function cleanup() { |
|||
trap - SIGINT SIGTERM ERR EXIT |
|||
|
|||
if [ -n "${NETLIFY_BUILD_BASE:-}" ]; then |
|||
# Dirty hack for netlify that don't ship the realpath command |
|||
realpath="python ./realpath.py" |
|||
fi |
|||
|
|||
# On exit, remove any symbolic link in content/french that points |
|||
# to content/english |
|||
find content/french -type l -print0 | while IFS= read -r -d $'\0' filename; do |
|||
if ${realpath:-realpath} "$filename" | grep -E "^$PWD/" > /dev/null; then |
|||
rm -f "$filename" |
|||
fi |
|||
done |
|||
} |
|||
|
|||
# First, try to find page bundles. In that case, link the directory |
|||
(cd content/english && find * -type f -name 'index.md') | while read file; do |
|||
if [ ! -e "content/french/$file" ]; then |
|||
d="$(dirname $file)" |
|||
ln -s ../../../content/english/$d content/french/$d |
|||
fi |
|||
done |
|||
|
|||
# Then, find the regular pages and link the files directly. |
|||
(cd content/english && find * -type f -name '*.md') | while read file; do |
|||
if [ ! -e "content/french/$file" ]; then |
|||
ln -s ../../../content/english/$file content/french/$file |
|||
fi |
|||
done |
|||
|
|||
# Remove dangling links |
|||
find content/french -xtype l -exec rm -f {} \; |
|||
|
|||
hugo gen chromastyles --style=borland > assets/css/chroma.css |
|||
hugo "$@" |
|||
|
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 676 B |
|
Before Width: | Height: | Size: 249 B After Width: | Height: | Size: 249 B |
|
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
|
Before Width: | Height: | Size: 395 B After Width: | Height: | Size: 395 B |
|
Before Width: | Height: | Size: 350 B After Width: | Height: | Size: 350 B |
|
Before Width: | Height: | Size: 384 B After Width: | Height: | Size: 384 B |
|
Before Width: | Height: | Size: 420 B After Width: | Height: | Size: 420 B |
|
Before Width: | Height: | Size: 232 B After Width: | Height: | Size: 232 B |
@ -1,5 +1,5 @@ |
|||
{{ define "main" }} |
|||
<!-- the index.html layout is used only to render the home page --> |
|||
<!-- the home.html layout is used only to render the home page --> |
|||
<div> |
|||
<article class="bio"> |
|||
<!-- |
|||
@ -1,7 +1,7 @@ |
|||
{{ define "main" }} |
|||
<!-- The "single" layout prints a single post --> |
|||
<!-- The "page" layout prints a single post --> |
|||
{{- partial "lang-detection.html" . -}} |
|||
<article class="post" {{ if .Scratch.Get "en_article_in_fr_site" }}lang="en"{{ end }}> |
|||
<article class="post" {{ if .Store.Get "en_article_in_fr_site" }}lang="en"{{ end }}> |
|||
<header> |
|||
<h1>{{ .Title }}</h1> |
|||
{{- with .Description }} |
|||
@ -1,5 +1,5 @@ |
|||
{{ define "main" }} |
|||
<!-- the speaking/list.html layout is used to render the list of posts under "speaking" --> |
|||
<!-- the speaking/section.html layout is used to render the list of posts under "speaking" --> |
|||
<article class="article-list"> |
|||
<header> |
|||
<h1>{{ .Title }}</h1> |
|||
@ -1,5 +1,5 @@ |
|||
{{ define "main" }} |
|||
<!-- the terms.html layout is used to render the list of values of a certain tag, topic, etc. --> |
|||
<!-- the taxonomy.html layout is used to render the list of values of a certain tag, topic, etc. --> |
|||
<article class="terms"> |
|||
<header> |
|||
<h1>{{ .Title }}</h1> |
|||
@ -1,5 +1,5 @@ |
|||
{{ define "main" }} |
|||
<!-- the writing/list.html layout is used to render the list of posts under "writing" --> |
|||
<!-- the writing/section.html layout is used to render the list of posts under "writing" --> |
|||
<article class="article-list"> |
|||
<header> |
|||
<h1>{{ .Title }}</h1> |
|||
@ -1,7 +0,0 @@ |
|||
#!/usr/bin/env python |
|||
|
|||
import os |
|||
import sys |
|||
|
|||
# Dirty hack for netlify that don't ship the realpath command |
|||
print(os.path.realpath(sys.argv[1])) |
|||