Differences
What fugo does not support, what it does differently from the Go implementation, and which output differences to expect when you compare builds.
Not supported#
- Go templates
- Layouts, shortcodes, render hooks, content adapters (
_content.gotmpl) andexecute_as_templateassets are Tera. A Go template is an error that names its first Go tag. - Content formats
- Markdown and HTML only. AsciiDoc, reStructuredText, Pandoc and Org mode files are errors.
- Module downloads
- Modules are not downloaded (no
go.mod). Usethemes/,_vendor/(a vendored copy of the modules) or a path; see Modules and mounts. - Commands
fugohasbuild,server,templates check,configandversion. The Go implementation’snew,mod,deploy,gen,list,env,convertandimportcommands do not exist.- Node.js tools
- No PostCSS, Babel or Tailwind CSS pipeline, and no build stats file (
buildStats): fugo runs no programs butgit, forenableGitInfo.minifyadds vendor prefixes,js_buildcompiles TypeScript and JSX for the browser targets,purge_csspurges per page, and Tailwind’s own CLI runs next to fugo (see Tailwind CSS). - Git ancestors
page.git_infois the file’s last commit only: Go’sAncestorsandParent(the commits before it) are not read.image_colors- Not implemented yet (
.Colorsin Go templates). - Goldmark
extrasandcjk - Accepted, not applied: no
==mark==,++insert++,~sub~,^sup^, and no CJK line-break handling. - Server settings
[server]headers and redirects are not read (its proxies are fugo’s: Development server); every change rebuilds the whole site (there is no fast render); no TLS,--openBrowseror--pprof.- Some flags
- The Go implementation’s logging and housekeeping flags (
--gc,--logLevel,--noBuildLock,--printI18nWarnings,--printPathWarnings,--printUnusedTemplates,--templateMetrics,--templateMetricsHints) and the server’s--disableFastRenderand--disableBrowserErrorare usage errors: remove them from your command lines.
Different by design#
- Templates are Tera with the current layout names; older names are refused with the new one.
- Printing an undefined value is an error, not an empty string.
- Content is rendered before layouts: inside a shortcode, another page’s content comes from
page_content(page=p). - Pagination is explicit: a second
paginatewith another list is an error. - YAML is YAML 1.2:
yesandnoare strings. - Imaging settings, media types and output formats are per project, not per language.
- Settings that the Go implementation ignores silently (a
[caches]entry that is not a table, an output format without a media type) are errors. build.versionis fugo’s version.- Images published as they are (page resources, assets, static files) lose their metadata: EXIF with the GPS position, XMP, IPTC and comments.
[imaging] stripMetadata = falsekeeps it; see Image metadata. - An image resource’s
copyrightandauthorparams are not only template data: they are written into the image, and into the images processed from it, in place of[imaging]’s. A value that is not text, has a line break (in YAML, wrap a long one with>-, not>), has a brace other than{year}or is longer than 1000 bytes stops the build.[imaging] stripMetadata = falseturns this off; see Copyright notice. - Settings and the environment are not read from environment variables:
--environmentchooses the environment. Secrets that templates read go in the.envfiles. - The configuration is one file: a configuration directory (
config/_default/,config/production/) is an error that names the table each file’s settings go in (an environment’s settings are a table,[environments.<name>]), several ofconfig.toml,config.yaml,config.ymlandconfig.jsonare an error,--confignames one file and there is no--configDir.
Expected output differences#
When you compare a fugo build with the Go implementation’s, these are normal:
- Minified bytes (lightningcss, oxc and minify-html instead of tdewolff), and so the fingerprints of minified files.
- Sass output: grass follows Dart Sass, not LibSass; no source maps.
- JavaScript bundles: rolldown instead of esbuild.
- Processed images: equal to the eye, not to the byte; file names have fugo’s own hashes.
- Original images: JPEG, PNG and WebP files without their metadata, unless
[imaging] stripMetadata = false. - Highlighted code: the same colours and classes, with a few differences in span structure.
- Typography: characters where the Go implementation writes entities (
’for’). - Sort order of titles in some languages: fugo uses newer Unicode collation data.
- The
generatormeta tag names fugo.