Back to top

404

Call to action and description for the 404 (page not found) page

Simple fragment with an image (usually logo of the website), a description and a call to action button. This fragment should be located inside the global fragments directory and is only rendered in the 404 page.

Since 404 fragment can not be rendered in normal pages, the following is a screenshot.

404.png

Code
+++
date = "2018-07-22"
fragment = "404"
weight = 150

#title = "" # default i18n "404.title"
#subtitle = "" # default i18n "404.subtitle"
#redirect_text = "" # default i18n "404.direction"
#button_text = "" # default i18n "404.button"
#redirect_url = "" # default /

[asset]
  image = "logo.svg"
  width = "500px" # optional - will default to image width
  #height = "150px" # optional - will default to image height
+++

Documentation

404 fragment looks a lot like the hero fragment, with a default call to action button to return to the homepage and a description in addition to subtitle and title.

In order to customize the fragment, which only appears on 404 pages, you have to place it in your /content/_global directory.

Variables

redirect_text

type: string
default: i18n “404.direction”

Description of the page.

button_text

type: string
default: i18n “404.button”

Title of the call to action button.

redirect_url

type: string
default: “/"

URL for the call to action button.

asset

type: asset object

The asset will be displayed on top of the fragment, before title and subtitle.

Asset in this fragment only support images that are supported in img tag (.png, .jpg, .gif, .svg, etc.).

Global variables are documented as well and have been omitted from this page.

comments powered by Disqus