HIDDEN[1]
2022-July-3
As of today, this
article
has been on
the web
for
When you build a website with
the
hugo
command,
the
files
and directories
in
the
static/
[2]
directory
are simply copied to the
public/
[3]
directory.
A
non-static file is processed by hugo
and its destination is determined by
configuration settings,
layout files,
the file’s
file extension,
and
the file’s
front matter.
The table below
shows
how
some
of the
TGIH[4]
source files
are transformed
from source to
destination
to
URL (viewable in a web browser after deployment).
Some of the
TGIH
source
files are
listed
in
step
4.1 Explore the TGIH
directory
in Infinite Ink’s Hugo Tutorial.
source in TGIH/ | destination in TGIH/public/ | URL (if baseURL is ii.com/) |
---|---|---|
static/images/go- | images/go- | ii.com/images/go- |
assets/style.scss | style.css | ii.com/style.css |
content/about.md | about/index.html | ii.com/about/ |
content/articles/one.md | articles/one/index.html | ii.com/articles/one/ |
The last two URLs in the URL column above,
which are bolded,
are called
pretty URLs[5]
because they
do not end with a file extension
(.aspx
,
.cgi
,
.css
,
.htm
, .html
,
.mhtml
,
.php
, .png
,
.shtml
,
.xhtml
,
.xml
, etc.).
For more about all this, see:
Note that the above four gohugo.io URLs are “pretty.”
For more about Hugo, see Infinite Ink’s…
Hugo’s .RenderString
Method (featuring AsciiDoc admonitions in Markdown)
Variable and Parameter Names in Hugo (featuring camelCase🐫 and snake_case🐍)
A Way to Compare Hugo’s Markup Languages (featuring inline footnotes)
Hugo’s Markup Languages: AsciiDoc, HTML, Markdown,
Hugo Tutorial: Themeless & Gitless Introduction to the Hugo SSG
🔗 Linkified Section Headings in Hugo-Generated Web Pages (featuring Markdown and AsciiDoc examples)
Configuring Security in Hugo (featuring settings needed to use Asciidoctor and Pandoc)
staticDir
parameter in a config file. The default is a single directory named static
.public
directory can be specified with the publishDir
parameter in a config file or with the hugo
CLI flag -d
(which is equivalent to --destination
).Your public comment or question might immediately improve this page or help me to (eventually) improve this page.