Hugoifier

hugoifier / architecture / index.html
1
2
<!doctype html>
3
<html lang="en" class="no-js">
4
<head>
5
6
<meta charset="utf-8">
7
<meta name="viewport" content="width=device-width,initial-scale=1">
8
9
<meta name="description" content="AI-powered Hugo theme converter with Decap CMS integration">
10
11
12
<meta name="author" content="CONFLICT LLC">
13
14
15
<link rel="canonical" href="https://hugoifier.dev/architecture/">
16
17
18
<link rel="prev" href="../cli-reference/">
19
20
21
<link rel="next" href="../about/">
22
23
24
25
26
27
<link rel="icon" href="../assets/images/favicon.png">
28
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.7.5">
29
30
31
32
<title>Architecture - Hugoifier</title>
33
34
35
36
<link rel="stylesheet" href="../assets/stylesheets/main.484c7ddc.min.css">
37
38
39
<link rel="stylesheet" href="../assets/stylesheets/palette.ab4e12ef.min.css">
40
41
42
43
44
45
46
47
48
49
50
51
52
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
53
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
54
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
55
56
57
58
<link rel="stylesheet" href="../assets/css/custom.css">
59
60
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
61
62
63
64
65
66
</head>
67
68
69
70
71
72
73
74
75
76
<body dir="ltr" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom">
77
78
79
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
80
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
81
<label class="md-overlay" for="__drawer"></label>
82
<div data-md-component="skip">
83
84
85
<a href="#architecture" class="md-skip">
86
Skip to content
87
</a>
88
89
</div>
90
<div data-md-component="announce">
91
92
</div>
93
94
95
96
97
<header class="md-header" data-md-component="header">
98
<nav class="md-header__inner md-grid" aria-label="Header">
99
<a href=".." title="Hugoifier" class="md-header__button md-logo" aria-label="Hugoifier" data-md-component="logo">
100
101
<img src="../assets/images/conflict-logo.svg" alt="logo">
102
103
</a>
104
<label class="md-header__button md-icon" for="__drawer">
105
106
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
107
</label>
108
<div class="md-header__title" data-md-component="header-title">
109
<div class="md-header__ellipsis">
110
<div class="md-header__topic">
111
<span class="md-ellipsis">
112
Hugoifier
113
</span>
114
</div>
115
<div class="md-header__topic" data-md-component="header-topic">
116
<span class="md-ellipsis">
117
118
Architecture
119
120
</span>
121
</div>
122
</div>
123
</div>
124
125
126
<form class="md-header__option" data-md-component="palette">
127
128
129
130
131
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_0">
132
133
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_1" hidden>
134
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
135
</label>
136
137
138
139
140
141
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="custom" data-md-color-accent="custom" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_1">
142
143
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
144
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
145
</label>
146
147
148
</form>
149
150
151
152
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
153
154
155
156
157
158
<label class="md-header__button md-icon" for="__search">
159
160
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
161
</label>
162
<div class="md-search" data-md-component="search" role="dialog">
163
<label class="md-search__overlay" for="__search"></label>
164
<div class="md-search__inner" role="search">
165
<form class="md-search__form" name="search">
166
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
167
<label class="md-search__icon md-icon" for="__search">
168
169
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
170
171
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
172
</label>
173
<nav class="md-search__options" aria-label="Search">
174
175
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
176
177
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
178
</button>
179
</nav>
180
181
<div class="md-search__suggest" data-md-component="search-suggest"></div>
182
183
</form>
184
<div class="md-search__output">
185
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
186
<div class="md-search-result" data-md-component="search-result">
187
<div class="md-search-result__meta">
188
Initializing search
189
</div>
190
<ol class="md-search-result__list" role="presentation"></ol>
191
</div>
192
</div>
193
</div>
194
</div>
195
</div>
196
197
198
199
<div class="md-header__source">
200
<a href="https://github.com/ConflictHQ/hugoifier" title="Go to repository" class="md-source" data-md-component="source">
201
<div class="md-source__icon md-icon">
202
203
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
204
</div>
205
<div class="md-source__repository">
206
ConflictHQ/hugoifier
207
</div>
208
</a>
209
</div>
210
211
</nav>
212
213
</header>
214
215
<div class="md-container" data-md-component="container">
216
217
218
219
220
221
<nav class="md-tabs" aria-label="Tabs" data-md-component="tabs">
222
<div class="md-grid">
223
<ul class="md-tabs__list">
224
225
226
227
228
229
230
<li class="md-tabs__item">
231
<a href=".." class="md-tabs__link">
232
233
234
235
236
237
Home
238
239
</a>
240
</li>
241
242
243
244
245
246
247
248
249
250
251
<li class="md-tabs__item">
252
<a href="../getting-started/installation/" class="md-tabs__link">
253
254
255
256
Getting Started
257
258
</a>
259
</li>
260
261
262
263
264
265
266
267
268
269
<li class="md-tabs__item">
270
<a href="../cli-reference/" class="md-tabs__link">
271
272
273
274
275
276
CLI Reference
277
278
</a>
279
</li>
280
281
282
283
284
285
286
287
288
289
290
<li class="md-tabs__item md-tabs__item--active">
291
<a href="./" class="md-tabs__link">
292
293
294
295
296
297
Architecture
298
299
</a>
300
</li>
301
302
303
304
305
306
307
308
309
<li class="md-tabs__item">
310
<a href="../about/" class="md-tabs__link">
311
312
313
314
315
316
Why Hugo + Cloudflare
317
318
</a>
319
</li>
320
321
322
323
</ul>
324
</div>
325
</nav>
326
327
328
329
<main class="md-main" data-md-component="main">
330
<div class="md-main__inner md-grid">
331
332
333
334
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
335
<div class="md-sidebar__scrollwrap">
336
<div class="md-sidebar__inner">
337
338
339
340
341
342
343
<nav class="md-nav md-nav--primary md-nav--lifted" aria-label="Navigation" data-md-level="0">
344
<label class="md-nav__title" for="__drawer">
345
<a href=".." title="Hugoifier" class="md-nav__button md-logo" aria-label="Hugoifier" data-md-component="logo">
346
347
<img src="../assets/images/conflict-logo.svg" alt="logo">
348
349
</a>
350
Hugoifier
351
</label>
352
353
<div class="md-nav__source">
354
<a href="https://github.com/ConflictHQ/hugoifier" title="Go to repository" class="md-source" data-md-component="source">
355
<div class="md-source__icon md-icon">
356
357
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
358
</div>
359
<div class="md-source__repository">
360
ConflictHQ/hugoifier
361
</div>
362
</a>
363
</div>
364
365
<ul class="md-nav__list" data-md-scrollfix>
366
367
368
369
370
371
372
373
<li class="md-nav__item">
374
<a href=".." class="md-nav__link">
375
376
377
378
<span class="md-ellipsis">
379
380
381
Home
382
383
384
385
</span>
386
387
388
389
</a>
390
</li>
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
<li class="md-nav__item md-nav__item--nested">
411
412
413
414
415
416
<input class="md-nav__toggle md-toggle md-toggle--indeterminate" type="checkbox" id="__nav_2" >
417
418
419
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
420
421
422
423
<span class="md-ellipsis">
424
425
426
Getting Started
427
428
429
430
</span>
431
432
433
434
<span class="md-nav__icon md-icon"></span>
435
</label>
436
437
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
438
<label class="md-nav__title" for="__nav_2">
439
<span class="md-nav__icon md-icon"></span>
440
441
442
Getting Started
443
444
445
</label>
446
<ul class="md-nav__list" data-md-scrollfix>
447
448
449
450
451
452
453
454
<li class="md-nav__item">
455
<a href="../getting-started/installation/" class="md-nav__link">
456
457
458
459
<span class="md-ellipsis">
460
461
462
Installation
463
464
465
466
</span>
467
468
469
470
</a>
471
</li>
472
473
474
475
476
477
478
479
480
481
482
<li class="md-nav__item">
483
<a href="../getting-started/quickstart/" class="md-nav__link">
484
485
486
487
<span class="md-ellipsis">
488
489
490
Quick Start
491
492
493
494
</span>
495
496
497
498
</a>
499
</li>
500
501
502
503
504
505
506
507
508
509
510
<li class="md-nav__item">
511
<a href="../getting-started/configuration/" class="md-nav__link">
512
513
514
515
<span class="md-ellipsis">
516
517
518
Configuration
519
520
521
522
</span>
523
524
525
526
</a>
527
</li>
528
529
530
531
532
</ul>
533
</nav>
534
535
</li>
536
537
538
539
540
541
542
543
544
545
<li class="md-nav__item">
546
<a href="../cli-reference/" class="md-nav__link">
547
548
549
550
<span class="md-ellipsis">
551
552
553
CLI Reference
554
555
556
557
</span>
558
559
560
561
</a>
562
</li>
563
564
565
566
567
568
569
570
571
572
573
574
<li class="md-nav__item md-nav__item--active">
575
576
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
577
578
579
580
581
582
<label class="md-nav__link md-nav__link--active" for="__toc">
583
584
585
586
<span class="md-ellipsis">
587
588
589
Architecture
590
591
592
593
</span>
594
595
596
597
<span class="md-nav__icon md-icon"></span>
598
</label>
599
600
<a href="./" class="md-nav__link md-nav__link--active">
601
602
603
604
<span class="md-ellipsis">
605
606
607
Architecture
608
609
610
611
</span>
612
613
614
615
</a>
616
617
618
619
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
620
621
622
623
624
625
626
<label class="md-nav__title" for="__toc">
627
<span class="md-nav__icon md-icon"></span>
628
Table of contents
629
</label>
630
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
631
632
<li class="md-nav__item">
633
<a href="#pipeline" class="md-nav__link">
634
<span class="md-ellipsis">
635
636
Pipeline
637
638
</span>
639
</a>
640
641
</li>
642
643
<li class="md-nav__item">
644
<a href="#module-map" class="md-nav__link">
645
<span class="md-ellipsis">
646
647
Module Map
648
649
</span>
650
</a>
651
652
</li>
653
654
<li class="md-nav__item">
655
<a href="#ai-backends" class="md-nav__link">
656
<span class="md-ellipsis">
657
658
AI Backends
659
660
</span>
661
</a>
662
663
</li>
664
665
<li class="md-nav__item">
666
<a href="#hugo-api-patching" class="md-nav__link">
667
<span class="md-ellipsis">
668
669
Hugo API Patching
670
671
</span>
672
</a>
673
674
</li>
675
676
<li class="md-nav__item">
677
<a href="#decap-cms-generation" class="md-nav__link">
678
<span class="md-ellipsis">
679
680
Decap CMS Generation
681
682
</span>
683
</a>
684
685
</li>
686
687
<li class="md-nav__item">
688
<a href="#output-structure" class="md-nav__link">
689
<span class="md-ellipsis">
690
691
Output Structure
692
693
</span>
694
</a>
695
696
</li>
697
698
</ul>
699
700
</nav>
701
702
</li>
703
704
705
706
707
708
709
710
711
712
<li class="md-nav__item">
713
<a href="../about/" class="md-nav__link">
714
715
716
717
<span class="md-ellipsis">
718
719
720
Why Hugo + Cloudflare
721
722
723
724
</span>
725
726
727
728
</a>
729
</li>
730
731
732
733
</ul>
734
</nav>
735
</div>
736
</div>
737
</div>
738
739
740
741
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
742
<div class="md-sidebar__scrollwrap">
743
<div class="md-sidebar__inner">
744
745
746
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
747
748
749
750
751
752
753
<label class="md-nav__title" for="__toc">
754
<span class="md-nav__icon md-icon"></span>
755
Table of contents
756
</label>
757
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
758
759
<li class="md-nav__item">
760
<a href="#pipeline" class="md-nav__link">
761
<span class="md-ellipsis">
762
763
Pipeline
764
765
</span>
766
</a>
767
768
</li>
769
770
<li class="md-nav__item">
771
<a href="#module-map" class="md-nav__link">
772
<span class="md-ellipsis">
773
774
Module Map
775
776
</span>
777
</a>
778
779
</li>
780
781
<li class="md-nav__item">
782
<a href="#ai-backends" class="md-nav__link">
783
<span class="md-ellipsis">
784
785
AI Backends
786
787
</span>
788
</a>
789
790
</li>
791
792
<li class="md-nav__item">
793
<a href="#hugo-api-patching" class="md-nav__link">
794
<span class="md-ellipsis">
795
796
Hugo API Patching
797
798
</span>
799
</a>
800
801
</li>
802
803
<li class="md-nav__item">
804
<a href="#decap-cms-generation" class="md-nav__link">
805
<span class="md-ellipsis">
806
807
Decap CMS Generation
808
809
</span>
810
</a>
811
812
</li>
813
814
<li class="md-nav__item">
815
<a href="#output-structure" class="md-nav__link">
816
<span class="md-ellipsis">
817
818
Output Structure
819
820
</span>
821
</a>
822
823
</li>
824
825
</ul>
826
827
</nav>
828
</div>
829
</div>
830
</div>
831
832
833
834
<div class="md-content" data-md-component="content">
835
836
<article class="md-content__inner md-typeset">
837
838
839
840
841
842
843
844
845
<h1 id="architecture">Architecture<a class="headerlink" href="#architecture" title="Permanent link">&para;</a></h1>
846
<h2 id="pipeline">Pipeline<a class="headerlink" href="#pipeline" title="Permanent link">&para;</a></h2>
847
<pre class="mermaid"><code>flowchart TD
848
A[Input path] --&gt; B{Hugo theme?}
849
B -- Yes --&gt; C[find_hugo_theme]
850
B -- No --&gt; D[find_raw_html_files]
851
852
C --&gt; E[Copy theme → themes/name/]
853
E --&gt; F[Copy exampleSite content/data/static]
854
F --&gt; G[Write hugo.toml]
855
G --&gt; H[patch_theme + patch_config]
856
H --&gt; I[decapify]
857
858
D --&gt; J[hugoify_html via AI]
859
J --&gt; K[Write layouts/]
860
K --&gt; L[Copy CSS/JS/images]
861
L --&gt; M[Write minimal hugo.toml]
862
M --&gt; I
863
864
I --&gt; N[output/theme-name/]</code></pre>
865
<h2 id="module-map">Module Map<a class="headerlink" href="#module-map" title="Permanent link">&para;</a></h2>
866
<table>
867
<thead>
868
<tr>
869
<th>Module</th>
870
<th>Responsibility</th>
871
</tr>
872
</thead>
873
<tbody>
874
<tr>
875
<td><code>src/cli.py</code></td>
876
<td>Argument parsing, logging setup, error handling</td>
877
</tr>
878
<tr>
879
<td><code>src/config.py</code></td>
880
<td>Multi-backend AI routing (<code>call_ai</code>)</td>
881
</tr>
882
<tr>
883
<td><code>src/utils/complete.py</code></td>
884
<td>Full pipeline orchestration</td>
885
</tr>
886
<tr>
887
<td><code>src/utils/theme_finder.py</code></td>
888
<td>Locate Hugo theme + exampleSite within messy extracted directories</td>
889
</tr>
890
<tr>
891
<td><code>src/utils/hugoify.py</code></td>
892
<td>AI-powered HTML → Hugo layout conversion</td>
893
</tr>
894
<tr>
895
<td><code>src/utils/decapify.py</code></td>
896
<td>Generate Decap CMS <code>index.html</code> + <code>config.yml</code></td>
897
</tr>
898
<tr>
899
<td><code>src/utils/theme_patcher.py</code></td>
900
<td>Patch deprecated Hugo APIs in layout files and config</td>
901
</tr>
902
<tr>
903
<td><code>src/utils/analyze.py</code></td>
904
<td>Theme structure reporting + AI-powered HTML analysis</td>
905
</tr>
906
<tr>
907
<td><code>src/utils/translate.py</code></td>
908
<td>AI content translation</td>
909
</tr>
910
<tr>
911
<td><code>src/utils/deploy.py</code></td>
912
<td>Cloudflare deployment <em>(stub)</em></td>
913
</tr>
914
<tr>
915
<td><code>src/utils/cloudflare.py</code></td>
916
<td>Cloudflare configuration <em>(stub)</em></td>
917
</tr>
918
<tr>
919
<td><code>src/utils/parser.py</code></td>
920
<td>HTML/CSS linting <em>(stub)</em></td>
921
</tr>
922
</tbody>
923
</table>
924
<h2 id="ai-backends">AI Backends<a class="headerlink" href="#ai-backends" title="Permanent link">&para;</a></h2>
925
<p>All AI calls route through a single <code>call_ai(prompt, system)</code> function in <code>src/config.py</code>. Switch backends via <code>HUGOIFIER_BACKEND</code>:</p>
926
<table>
927
<thead>
928
<tr>
929
<th>Backend</th>
930
<th>Default Model</th>
931
<th>Env Var</th>
932
</tr>
933
</thead>
934
<tbody>
935
<tr>
936
<td><code>anthropic</code> (default)</td>
937
<td><code>claude-sonnet-4-6</code></td>
938
<td><code>ANTHROPIC_API_KEY</code></td>
939
</tr>
940
<tr>
941
<td><code>openai</code></td>
942
<td><code>gpt-4-turbo</code></td>
943
<td><code>OPENAI_API_KEY</code></td>
944
</tr>
945
<tr>
946
<td><code>google</code></td>
947
<td><code>gemini-1.5-pro</code></td>
948
<td><code>GOOGLE_API_KEY</code></td>
949
</tr>
950
</tbody>
951
</table>
952
<h2 id="hugo-api-patching">Hugo API Patching<a class="headerlink" href="#hugo-api-patching" title="Permanent link">&para;</a></h2>
953
<p><code>theme_patcher.py</code> handles breaking changes in Hugo ≥ v0.128:</p>
954
<p><strong>Template patches:</strong></p>
955
<table>
956
<thead>
957
<tr>
958
<th>Old</th>
959
<th>New</th>
960
</tr>
961
</thead>
962
<tbody>
963
<tr>
964
<td><code>.Site.DisqusShortname</code></td>
965
<td><code>.Site.Config.Services.Disqus.Shortname</code></td>
966
</tr>
967
<tr>
968
<td><code>.Site.GoogleAnalytics</code></td>
969
<td><code>.Site.Config.Services.GoogleAnalytics.ID</code></td>
970
</tr>
971
</tbody>
972
</table>
973
<p><strong>Config patches (<code>hugo.toml</code>):</strong></p>
974
<table>
975
<thead>
976
<tr>
977
<th>Old</th>
978
<th>New</th>
979
</tr>
980
</thead>
981
<tbody>
982
<tr>
983
<td><code>paginate = N</code></td>
984
<td><code>[pagination] pagerSize = N</code></td>
985
</tr>
986
<tr>
987
<td><code>googleAnalytics = "UA-..."</code></td>
988
<td><code>[services.googleAnalytics] id = "UA-..."</code></td>
989
</tr>
990
<tr>
991
<td><code>disqusShortname = "..."</code></td>
992
<td><code>[services.disqus] shortname = "..."</code></td>
993
</tr>
994
</tbody>
995
</table>
996
<h2 id="decap-cms-generation">Decap CMS Generation<a class="headerlink" href="#decap-cms-generation" title="Permanent link">&para;</a></h2>
997
<p><code>decapify.py</code> introspects <code>content/</code> to build Decap collections:</p>
998
<ul>
999
<li><strong>Folder collection</strong> — subdirectory with <code>.md</code> files at any depth (blog, posts, etc.)</li>
1000
<li><strong>File collection</strong> — subdirectory with only <code>_index.md</code> (about, contact, etc.)</li>
1001
</ul>
1002
<p>Field types are inferred from YAML frontmatter values: <code>string</code>, <code>text</code>, <code>datetime</code>, <code>image</code>, <code>list</code>, <code>boolean</code>, <code>number</code>, <code>markdown</code>.</p>
1003
<h2 id="output-structure">Output Structure<a class="headerlink" href="#output-structure" title="Permanent link">&para;</a></h2>
1004
<div class="highlight"><pre><span></span><code><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a>output/{theme-name}/
1005
<a id="__codelineno-0-2" name="__codelineno-0-2" href="#__codelineno-0-2"></a>├── hugo.toml # Site config (modernized)
1006
<a id="__codelineno-0-3" name="__codelineno-0-3" href="#__codelineno-0-3"></a>├── content/ # From exampleSite or minimal stub
1007
<a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a>├── data/ # From exampleSite (if present)
1008
<a id="__codelineno-0-5" name="__codelineno-0-5" href="#__codelineno-0-5"></a>├── static/
1009
<a id="__codelineno-0-6" name="__codelineno-0-6" href="#__codelineno-0-6"></a>│ └── admin/
1010
<a id="__codelineno-0-7" name="__codelineno-0-7" href="#__codelineno-0-7"></a>│ ├── index.html # Decap CMS UI
1011
<a id="__codelineno-0-8" name="__codelineno-0-8" href="#__codelineno-0-8"></a>│ └── config.yml # Decap collections config
1012
<a id="__codelineno-0-9" name="__codelineno-0-9" href="#__codelineno-0-9"></a>└── themes/
1013
<a id="__codelineno-0-10" name="__codelineno-0-10" href="#__codelineno-0-10"></a> └── {theme-name}/ # Patched Hugo theme
1014
<a id="__codelineno-0-11" name="__codelineno-0-11" href="#__codelineno-0-11"></a> ├── layouts/
1015
<a id="__codelineno-0-12" name="__codelineno-0-12" href="#__codelineno-0-12"></a> ├── static/
1016
<a id="__codelineno-0-13" name="__codelineno-0-13" href="#__codelineno-0-13"></a> └── archetypes/
1017
</code></pre></div>
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
</article>
1032
</div>
1033
1034
1035
<script>var tabs=__md_get("__tabs");if(Array.isArray(tabs))e:for(var set of document.querySelectorAll(".tabbed-set")){var labels=set.querySelector(".tabbed-labels");for(var tab of tabs)for(var label of labels.getElementsByTagName("label"))if(label.innerText.trim()===tab){var input=document.getElementById(label.htmlFor);input.checked=!0;continue e}}</script>
1036
1037
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
1038
</div>
1039
1040
<button type="button" class="md-top md-icon" data-md-component="top" hidden>
1041
1042
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8z"/></svg>
1043
Back to top
1044
</button>
1045
1046
</main>
1047
1048
<footer class="md-footer">
1049
1050
<div class="md-footer-meta md-typeset">
1051
<div class="md-footer-meta__inner md-grid">
1052
<div class="md-copyright">
1053
1054
<div class="md-copyright__highlight">
1055
Copyright &copy; 2026 CONFLICT LLC
1056
</div>
1057
1058
1059
Made with
1060
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
1061
Material for MkDocs
1062
</a>
1063
1064
</div>
1065
1066
1067
<div class="md-social">
1068
1069
1070
1071
1072
1073
1074
1075
1076
<a href="https://github.com/ConflictHQ/hugoifier" target="_blank" rel="noopener" title="github.com" class="md-social__link">
1077
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 7.1.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2025 Fonticons, Inc.--><path d="M173.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6m-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3m44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9M252.8 8C114.1 8 8 113.3 8 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C436.2 457.8 504 362.9 504 252 504 113.3 391.5 8 252.8 8M105.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1m-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7m32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1m-11.4-14.7c-1.6 1-1.6 3.6 0 5.9s4.3 3.3 5.6 2.3c1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2"/></svg>
1078
</a>
1079
1080
</div>
1081
1082
</div>
1083
</div>
1084
</footer>
1085
1086
</div>
1087
<div class="md-dialog" data-md-component="dialog">
1088
<div class="md-dialog__inner md-typeset"></div>
1089
</div>
1090
1091
1092
1093
1094
1095
<script id="__config" type="application/json">{"annotate": null, "base": "..", "features": ["navigation.instant", "navigation.tabs", "navigation.sections", "navigation.expand", "navigation.top", "search.suggest", "search.highlight", "content.code.copy", "content.tabs.link", "header.autohide"], "search": "../assets/javascripts/workers/search.2c215733.min.js", "tags": null, "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": null}</script>
1096
1097
1098
<script src="../assets/javascripts/bundle.79ae519e.min.js"></script>
1099
1100
1101
</body>
1102
</html>

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button