Skip to content
Draft
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
40 changes: 31 additions & 9 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ defaults:
shell: bash

env:
HUGO_VERSION: 0.155.3
# ----------------------------------------------------------------------------
# Specify the deployment environment: staging or production
HUGO_ENVIRONMENT: ${{ vars.HUGO_ENVIRONMENT || 'staging' }}
HUGO_VERSION: 0.164.0

jobs:
# ----------------------------------------------------------------------------
# Validate that README.md references the correct Hugo version.
# Validate that pinned Hugo version references stay in sync
# (README.md, package.json, config/_default/module.yaml).
# Only runs on push/pull_request, not scheduled runs.
#
validate-docs:
Expand All @@ -77,26 +81,44 @@ jobs:

- name: Check Hugo version consistency
run: |
echo "Checking README.md for Hugo version $HUGO_VERSION"
echo "Checking Hugo version consistency for $HUGO_VERSION"

# Check badge
if ! grep -q "badge/Hugo-${HUGO_VERSION}" README.md; then
echo "::error::README.md badge does not reference Hugo version $HUGO_VERSION"
FAILED=1
fi

# Check download URL
if ! grep -q "hugo_extended_${HUGO_VERSION}_linux-amd64.deb" README.md; then
echo "::error::README.md download URL does not reference Hugo version $HUGO_VERSION"
# Check install instructions reference the pinned version.
# Accepts either a literal URL (hugo_extended_0.164.0_...)
# or the parameterized form (VER=0.164.0 + hugo_extended_${VER}_...).
if grep -q "hugo_extended_${HUGO_VERSION}_linux-amd64.deb" README.md; then
:
elif grep -q "VER=${HUGO_VERSION}" README.md && grep -q 'hugo_extended_${VER}_linux-amd64.deb' README.md; then
:
else
echo "::error::README.md install instructions do not reference Hugo version $HUGO_VERSION"
FAILED=1
fi

# Check npm wrapper stays on the pinned version (strict pin)
if ! grep -q "\"hugo-extended\": \"\\^${HUGO_VERSION}\"" package.json; then
echo "::error::package.json hugo-extended does not reference Hugo version $HUGO_VERSION (expected \"^$HUGO_VERSION\")"
FAILED=1
fi

# Check Hugo module minimum matches the pinned version
if ! grep -q "min: \"${HUGO_VERSION}\"" config/_default/module.yaml; then
echo "::error::config/_default/module.yaml hugoVersion.min does not reference Hugo version $HUGO_VERSION"
FAILED=1
fi

if [ "$FAILED" = "1" ]; then
echo "Update README.md to use Hugo version $HUGO_VERSION"
echo "Update README.md, package.json, and config/_default/module.yaml to use Hugo version $HUGO_VERSION"
exit 1
fi

echo "README.md Hugo version references are consistent"
echo "Hugo version references are consistent"

# ----------------------------------------------------------------------------
# Expose the Hugo version from the workflow environment as a job output.
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ _site
public/
tests/public_test/
node_modules/
# Generated by "hugo mod npm pack" (see README "Node dependencies")
packages/hugoautogen/
_gen/
.hugo_build.lock
# Locally downloaded Hugo Debian packages (see README "Installing Hugo")
*.deb
.coverage
tests/__pycache__/
_vendor/
Expand Down
63 changes: 42 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![GitHub Pages Deploy](https://github.com/Interlisp/Interlisp.github.io/actions/workflows/gh-pages.yml/badge.svg)](https://github.com/Interlisp/Interlisp.github.io/actions/workflows/gh-pages.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Hugo](https://img.shields.io/badge/Hugo-0.155.3-ff4088?logo=hugo)](https://gohugo.io/)
[![Hugo](https://img.shields.io/badge/Hugo-0.164.0-ff4088?logo=hugo)](https://gohugo.io/)
[![Docsy](https://img.shields.io/badge/Theme-Docsy-blue)](https://www.docsy.dev/)

The documentation repository for <https://interlisp.org>, the restoration
Expand Down Expand Up @@ -65,18 +65,18 @@ Before working with this repository, ensure you have the following installed:

| Tool | Version | Purpose |
|------|---------|--------|
| [Hugo Extended](https://gohugo.io/installation/) | v0.145.0+ | Static site generator |
| [Hugo Extended](https://gohugo.io/installation/) | v0.160.1+ (CI pins v0.164.0) | Static site generator |
| [Go](https://go.dev/doc/install) | 1.24+ | Required for Hugo modules |
| [Node.js & npm](https://nodejs.org/) | Latest LTS | PostCSS and autoprefixer |
| [Node.js & npm](https://nodejs.org/) | v22+ (LTS 24) | Theme npm dependencies (Bootstrap, Font Awesome) |
| [jq](https://jqlang.github.io/jq/) | Latest | Bibliography JSON processing |
| curl, wget | System default | Script downloads |

**Verify installations:**

```bash
hugo version # Should show "extended" and v0.145.0+
hugo version # Should show "extended" and v0.160.1+
go version # Should show 1.24+
node --version # Should show v18+ or later
node --version # Should show v22+ or later
jq --version # Any recent version
```

Expand Down Expand Up @@ -160,42 +160,56 @@ Local testing of updates requires running Hugo locally.

Instructions for installing Hugo on various operating systems are at: [Installing Hugo](https://gohugo.io/getting-started/installing). **Interlisp uses the extended version of Hugo.**

For Ubuntu:
For Ubuntu (pinned extended edition, matches CI `HUGO_VERSION`):

```bash
wget https://github.com/gohugoio/hugo/releases/download/v0.155.3/hugo_extended_0.155.3_linux-amd64.deb

sudo dpkg -i hugo_extended_0.155.3_linux-amd64.deb
VER=0.164.0
DEB="hugo_extended_${VER}_linux-amd64.deb"
wget --retry-connrefused --waitretry=5 --read-timeout=30 --timeout=30 --tries=5 \
-O "/tmp/${DEB}" "https://github.com/gohugoio/hugo/releases/download/v${VER}/${DEB}"
wget --retry-connrefused --waitretry=5 --read-timeout=30 --timeout=30 --tries=5 \
-O "/tmp/hugo_${VER}_checksums.txt" "https://github.com/gohugoio/hugo/releases/download/v${VER}/hugo_${VER}_checksums.txt"
( cd /tmp && grep -F " ${DEB}" "hugo_${VER}_checksums.txt" | sha256sum -c - )
sudo dpkg -i "/tmp/${DEB}"
rm -f "/tmp/${DEB}" "/tmp/hugo_${VER}_checksums.txt"
```

Verify installation:

```bash
hugo version
# Expected output:
hugo v0.155.3-8a858213b73907e823e2be2b5640a0ce4c04d295+extended linux/amd64 BuildDate=2026-02-08T16:40:42Z VendorInfo=gohugoio
hugo v0.164.0+extended linux/amd64 BuildDate=...

```

### Running the Development Server

1. Ensure bibliography data is available (see [Bibliography Data](#bibliography-data))

2. Start the Hugo development server:
2. Install the theme's npm dependencies (Bootstrap, Font Awesome). Required — a
Docsy 0.16 module build reads them from `node_modules/`. `npm install` also
auto-generates the gitignored `packages/hugoautogen` workspace via a
`postinstall` hook, so there is no separate step:

```bash
npm install
```

3. Start the Hugo development server:

```bash
hugo server --cleanDestinationDir --disableFastRender --renderToMemory
```

Hugo will automatically download the Docsy theme and its dependencies as Hugo modules. Expected output:
Hugo will automatically download the Docsy theme as a Hugo module, and reads
Bootstrap and Font Awesome from `node_modules/` (installed above). Expected output:

```bash
Watching for changes in <project-root>/archetypes, <project-root>/assets/{css,icons,js,scss}, <project-root>/content/en/{history,project,software}, <project-root>/layouts/{_default,_partials,_shortcodes,bibliography,redirect}, <project-root>/package.json, <project-root>/static/{Resources,data,docs,documentation,favicons}
Watching for config changes in <project-root>/config/_default, <project-root>/config/development, <project-root>/go.mod
Start building sites …
hugo v0.155.3-8a858213b73907e823e2be2b5640a0ce4c04d295+extended linux/amd64 BuildDate=2026-02-08T16:40:42Z VendorInfo=gohugoio

WARN WARNING: 298 sidebar entries have been truncated. To avoid this, increase `params.ui.sidebar_menu_truncate` to at least 398 (from 100) in your config file. Section: /history/bibliography
hugo v0.164.0+extended linux/amd64 BuildDate=...

│ EN
──────────────────┼──────
Expand Down Expand Up @@ -286,7 +300,7 @@ The following repository variables control the build and deployment process:
| Variable | Description | Values | Default |
|----------|-------------|--------|---------|
| `HUGO_ENVIRONMENT` | Build environment used by the production workflow | `development`, `staging`, `production` | `production` |
| `HUGO_VERSION` | Hugo version used in CI/CD | Semantic version (e.g., `0.155.3`) | Set in workflow |
| `HUGO_VERSION` | Hugo version used in CI/CD | Semantic version (e.g., `0.164.0`) | Set in workflow |

`HUGO_ENVIRONMENT` is resolved in `.github/workflows/gh-pages.yml` and passed
as the `hugo-environment` input to the shared build workflow. The staging
Expand Down Expand Up @@ -398,22 +412,29 @@ The repository follows the standard [Hugo directory structure](https://gohugo.io

| Module | Version | Purpose |
|--------|---------|---------|
| [google/docsy](https://github.com/google/docsy) | v0.14.3 | Technical documentation theme |
| docsy/dependencies | v0.7.2 | Docsy's required dependencies |
| [google/docsy/theme](https://github.com/google/docsy) | v0.16.0 | Technical documentation theme |

Hugo modules are automatically downloaded when you run `hugo server` or `hugo build`.

**npm Packages (package.json):**

| Package | Purpose |
|---------|---------|
| autoprefixer | Adds vendor prefixes to CSS for browser compatibility |
| hugo-extended | Hugo binary for npm-based workflows |
| postcss / postcss-cli | CSS transformation pipeline |
| jquery | JavaScript library used by some Docsy components |
| tabpanel | Accessible tab panel widget |

Install npm dependencies with `npm install` (optional for local development).
The Docsy theme's own npm dependencies (Bootstrap and Font Awesome) are declared
in `packages/hugoautogen/package.json`, which is **auto-generated and gitignored**.
A `postinstall` hook runs `hugo mod npm pack` on every `npm install`/`npm ci`, so this
file — and the Bootstrap/Font Awesome install — is kept up to date automatically; there
is no need to run the pack step by hand or commit anything under `packages/`. When you
update Docsy, just run `npm install` and commit the updated `package.json` and
`package-lock.json`.

Install npm dependencies with `npm install` (or `npm ci`). Since Docsy 0.16 sources Bootstrap
and Font Awesome from npm, this is **required** (not optional) for both local
development and CI builds.

### Search Configuration

Expand Down
6 changes: 5 additions & 1 deletion config/_default/imaging.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
#
# Configuration information available at:
# https://gohugo.io/content-management/image-processing/#resampling-filter
#
# NOTE: The global `quality` setting was deprecated in Hugo 0.163.0 in favor
# of per-format settings. It was removed here because its previous value (75)
# matches Hugo's default. Set per-format `quality` under `imaging.<format>`
# (e.g. `jpeg`, `webp`) if a non-default value is ever needed.
resampleFilter: CatmullRom
quality: 75
anchor: smart
5 changes: 3 additions & 2 deletions config/_default/languages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
# See: https://gohugo.io/content-management/multilingual/
#
en:
languageName: English
languageCode: en-us
label: English
locale: en-US
# Weight used for sorting.
weight: 1
contentDir: content/en
direction: ltr
params:
description: "Dedicated to restoring and preserving the Interlisp experience"

Expand Down
8 changes: 3 additions & 5 deletions config/_default/module.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
proxy: "direct"
# uncomment line below for temporary local development of module
# replacements = "github.com/google/docsy -> ../../docsy"
# replacements = "github.com/google/docsy/theme -> ../../docsy/theme"
hugoVersion:
extended: true
min: "0.155.2"
min: "0.164.0"
imports:
- path: "github.com/google/docsy"
- path: "github.com/google/docsy/theme"
disable: false
- path: "github.com/google/docsy/dependencies"
disable: false
6 changes: 6 additions & 0 deletions config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ url_latest_version: https://example.com
# in `markup.yaml`
prism_syntax_highlighting: false

# author: site author information (used in RSS feed, etc.)
#
author:
name: Interlisp.org
email: info@interlisp.org

# copyright: site copyright information
# authors: text list of authors
# from_year: year in copyright statement
Expand Down
2 changes: 1 addition & 1 deletion config/staging/hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baseURL: https://interlisp.github.io/Interlisp.staging/

languageCode: en-us
locale: en-us

# title
# Insert Staging Environment onto every page to make clear
Expand Down
6 changes: 4 additions & 2 deletions config/testing/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
# The module.mounts block must re-declare all standard project-level mounts
# because adding any mount replaces Hugo's defaults for the project.
# Theme (Docsy) mounts defined within that module are unaffected.
#
# Note: the mounts below do not set `lang` — that option was deprecated in Hugo
# 0.153.0. This is a single-language site, so mounts apply to the default
# (English) language without it.

baseURL: "http://localhost/"

Expand All @@ -30,7 +34,6 @@ module:
# URLs are generated without an /en/ prefix (matching production behavior).
- source: content/en
target: content
lang: en
- source: static
target: static
- source: layouts
Expand All @@ -47,4 +50,3 @@ module:
# Mount alongside the real bibliography content for the English language.
- source: tests/fixtures/bibliography
target: content/history/bibliography
lang: en
5 changes: 1 addition & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,4 @@ module github.com/Interlisp/Interlisp.github.io

go 1.24

require (
github.com/google/docsy v0.14.3 // indirect
github.com/google/docsy/dependencies v0.7.2 // indirect
)
require github.com/google/docsy/theme v0.16.0 // indirect
13 changes: 2 additions & 11 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
github.com/FortAwesome/Font-Awesome v0.0.0-20230327165841-0698449d50f2/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/FortAwesome/Font-Awesome v0.0.0-20241216213156-af620534bfc3/go.mod h1:IUgezN/MFpCDIlFezw3L8j83oeiIuYoj28Miwr/KUYo=
github.com/google/docsy v0.14.2 h1:XJud05ZWCUFgvE9G1KdxhGsDdr7OmWYdnWPxrclIPWE=
github.com/google/docsy v0.14.2/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU=
github.com/google/docsy v0.14.3 h1:4uFgPWTPj4NT79IboVkXGi49LLQadLVfU4WNOfD/s74=
github.com/google/docsy v0.14.3/go.mod h1:1Fj1W1O3esZh7IBQ8XAYtxtg10udBXuGI89+LUQc1AU=
github.com/google/docsy/dependencies v0.7.2 h1:+t5ufoADQAj4XneFphz4A+UU0ICAxmNaRHVWtMYXPSI=
github.com/google/docsy/dependencies v0.7.2/go.mod h1:gihhs5gmgeO+wuoay4FwOzob+jYJVyQbNaQOh788lD4=
github.com/twbs/bootstrap v4.6.2+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.2.3+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/twbs/bootstrap v5.3.8+incompatible/go.mod h1:fZTSrkpSf0/HkL0IIJzvVspTt1r9zuf7XlZau8kpcY0=
github.com/google/docsy/theme v0.16.0 h1:9uV9qEhk7UpJ8KYbSpTPQlq6htH+8hYskedgGZVnNsU=
github.com/google/docsy/theme v0.16.0/go.mod h1:NX/JqXCbZBn9Q2Hj7ez9Xeh9z4XcLiwmDYZXhB4RhRM=
14 changes: 9 additions & 5 deletions layouts/_default/rss.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
{{- printf "<?xml version=\"1.0\" encoding=\"utf-8\" standalone=\"yes\"?>" | safeHTML }}

{{- $authorName := "" }}
{{- $authorEmail := "" }}
{{- with .Site.Params.author }}
{{- if reflect.IsMap . }}
{{- with .name }}
{{- $authorName = . }}
{{- end }}
{{- with .email }}
{{- $authorEmail = . }}
{{- end }}
{{- else }}
{{- $authorName = . }}
{{- end }}
Expand Down Expand Up @@ -50,10 +54,10 @@
<title>Updates from the new Medley Interlisp Project</title>
<link>{{ .Permalink }}</link>
<description>Updates from the Medley Interlisp Project</description>
<generator>Hugo -- gohugo.io</generator>{{ with .Site.LanguageCode }}
<language>{{.}}</language>{{end}}{{ with .Site.Author.email }}
<managingEditor>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</managingEditor>{{end}}{{ with .Site.Author.email }}
<webMaster>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<generator>Hugo -- gohugo.io</generator>{{ with .Site.Language.Locale }}
<language>{{.}}</language>{{end}}{{ with $authorEmail }}
<managingEditor>{{.}}{{ with $authorName }} ({{.}}){{end}}</managingEditor>{{end}}{{ with $authorEmail }}
<webMaster>{{.}}{{ with $authorName }} ({{.}}){{end}}</webMaster>{{end}}{{ with .Site.Copyright }}
<copyright>{{.}}</copyright>{{end}}{{ if not .Date.IsZero }}
<lastBuildDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</lastBuildDate>{{ end }}
{{ with .OutputFormats.Get "RSS" }}
Expand All @@ -64,7 +68,7 @@
<title>{{ .Title }}</title>
<link>{{ .Permalink }}</link>
<pubDate>{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}</pubDate>
{{ with .Site.Author.email }}<author>{{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}</author>{{end}}
{{ with $authorEmail }}<author>{{.}}{{ with $authorName }} ({{.}}){{end}}</author>{{end}}
<guid>{{ .Permalink }}</guid>
<description>{{ .Summary | html }}</description>
{{ range .Params.tags }}
Expand Down
8 changes: 4 additions & 4 deletions layouts/_partials/page-meta-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
<div class="td-page-meta ms-2 pb-1 pt-2 mb-0">
{{ if $gh_repo -}}
{{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted -}}
{{ if and ($gh_subdir) (.Site.Language.Lang) -}}
{{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted -}}
{{ else if .Site.Language.Lang -}}
{{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Lang) $pathFormatted -}}
{{ if and ($gh_subdir) (.Site.Language.Name) -}}
{{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Name) $pathFormatted -}}
{{ else if .Site.Language.Name -}}
{{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Name) $pathFormatted -}}
{{ else if $gh_subdir -}}
{{ $gh_repo_path = printf "%s/%s/content/%s" $gh_branch $gh_subdir $pathFormatted -}}
{{ end -}}
Expand Down
Loading
Loading