humans.txt with Hugo

Published:
Talks about: , and

In order to publish a humans.txt document with your Hugo site, configure a media type in your config.toml:

[mediaTypes."text/plain"]
  suffixes = ["txt"]
[outputFormats.Humans]
  name = "Humans"
  mediaType = "text/plain"
  baseName = "humans"
  isPlainText = true
  rel = "alternate"
  isHTML = false
  noUgly = true
  permalinkable = false

Create a new layout, e.g. in _default/home.humans.txt with the following content:

/* TEAM */
{{ range $.Site.Data.contributors }}
{{ .title }}: {{ .first_name }} {{ .last_name }}
Site: {{ .website }}
{{ end }}