Files
2026-09-06 13:50:50 +00:00

3.1 KiB

name, description, tags, category
name description tags category
hugo-site-publishing Publish Hugo articles on dedinit.ru (bundles, hero.svg).
hugo
blog
static-site
gitverse
hero-svg
creative

Hugo site publishing (dedinit.ru)

When to Use

  • Write / publish a new article in /opt/dedinit.ru (Hugo site, gitverse repo)
  • Create the hero SVG for an article bundle
  • Build and verify the site locally before deploy
  • Diagnose «article missing from the built site»

Article bundle layout

content/posts/<YYYYMMDD - human slug with spaces>/index.md
content/posts/<YYYYMMDD - human slug with spaces>/hero.svg

Existing convention example: 20260830 - local aux models hermes/index.md.

Frontmatter (copy the style of the newest post):

---
date: '2026-08-31T03:00:00+03:00'
lastmod: '2026-08-31T03:00:00+03:00'
draft: false
title: '...'
slug: '...'
---

hero.svg: viewBox="0 0 1200 400", bg #0a0c10, hexagon pattern stroke #1a2332, title ~36px monospace #58a6ff, subtitle ~20px #8b949e, accent line. Copy the newest post's hero.svg as the base and edit — keeps a uniform look.

CRITICAL PITFALL — future-dated page is silently dropped

Hugo does NOT publish pages whose date is in the future (default buildFuture=false) and gives no warning. Symptom:

  • hugo list all shows the page with draft=false ✅
  • but the built HTML is absent from public/, sitemap.xml, index.xml ❌

Cause example (2026-08-31): server time 03:57 MSK, article date: '2026-08-31T12:00:00+03:00' → future → dropped.

Fix: set date in the PAST (current time minus margin, same timezone), or force with hugo --buildFuture (for a preview only — the published repo must not depend on it).

Build & verify

  • hugo is NOT preinstalled on this host — download the extended binary:
    curl -sL "https://api.github.com/repos/gohugoio/hugo/releases/latest" \
      | grep -oE 'browser_download_url.*_extended.*linux-amd64.tar.gz' | head -1
    # unpack to /usr/local/bin/hugo
    
  • Build: cd /opt/dedinit.ru && hugo --minify
  • Verify article really published: ls public/<year>/<slug>/index.html (permalink is /:year/:slug/, NOT /posts/), grep -o '<title>[^<]*</title>', grep -o 'hero.svg'
  • If missing: hugo list all | grep <slug> (present?), check date not future, hugo --logLevel debug.

Publish

  1. git add "content/posts/<bundle>/" + commit + git push origin main (gitverse is the source of truth; gitea pull-mirror follows).
  2. Deploy: make deploy = rsync public/ → kpa39l_dedinit@kpa39l.myjino.ru:2222:/dedinit.ru/ (credentials live in winscp_script.txt / Makefile vars: HOST/PORT/USERNAME/REMOTE_PATH). Verify reachability first — 2026-08 the Jino SFTP port was refused from the monitoring host and the stored password rejected; the live site already worked, so user deploys from their own machine when the channel is down. Don't loop retrying; report and ask.
  • git-forge-management — gitverse/gitea repo + mirror workflows
  • tproxy-web-proxy / mtproto-proxy — the article topics themselves