diff options
author | jaseg <git@jaseg.de> | 2025-06-30 15:35:25 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2025-06-30 15:35:25 +0200 |
commit | 16655c00e0a84f6bfe58870c918fbfc016fe58ec (patch) | |
tree | d410d2203b32b005ebb601e766a40f280ed8d32c /deploy.py | |
parent | a324ba7b649840c16d365b757b19db2849991f11 (diff) | |
download | blog-16655c00e0a84f6bfe58870c918fbfc016fe58ec.tar.gz blog-16655c00e0a84f6bfe58870c918fbfc016fe58ec.tar.bz2 blog-16655c00e0a84f6bfe58870c918fbfc016fe58ec.zip |
Fix hugo layout in hugo > ~0.130.0
For some reason, newer hugo versions have trouble with .summary, and on
some pages where .summary is not defined in the page header metadata,
when rendering the page as a preview card, hugo swallows the card's
closing </div> tag. Such a weird bug, we now just work around it by
explicitly setting the .summary meta on pages that cause this bug(?) to
surface.
Diffstat (limited to 'deploy.py')
-rw-r--r-- | deploy.py | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -18,7 +18,8 @@ if __name__ == '__main__': try: env = dict(os.environ) env['PATH'] = f'{Path("hack").absolute()}:{env["PATH"]}' - subprocess.run(['hugo'], cwd=tmpdir, check=True, env=env) + hugo = os.environ.get('HUGO', 'hugo') + subprocess.run([hugo], cwd=tmpdir, check=True, env=env) subprocess.run([pagefind, '--site', 'public'], cwd=tmpdir, check=True, env=env) subprocess.run(['git', 'add', '--force', 'public'], cwd=tmpdir, check=True) write_tree = subprocess.run(['git', 'write-tree', '--prefix=public/'], cwd=tmpdir, check=True, capture_output=True) |