Get started with Hugobricks today!
Experience the future of web development with Hugo and stackable content bricks. Build lightning-fast static sites with ease and flexibility.
Get started nowHaving a nice 404 (page not found) page is always nice. This brick provides one. You can see it in action on the custom 404 page.
You can stack the brick on top of other bricks, which is explained in the Bricks page. If you want the brick to be the same on every page you can use this brick by writing:
{{< brick_404 >}}{{< /brick_404 >}}
The content of the brick should be stored in the file ‘404.md’ in the ‘content/en/bricks/’ folder. Note that the filename is equal to the name of the brick (without ‘brick_’). This file should look like this:
---
title: 404
---
![](/uploads/illustrations/cuate/error.svg)
# Oops! Something went wrong!
{{< button "Back to home" "/" >}}
If you want your content to be different on a specific page, which is unlikely in this case, you can override it by placing your custom content in between the opening and closing tag of the brick. This looks like this:
{{< brick_404 >}}
... page specific content here...
{{< /brick_404 >}}
Experience the future of web development with Hugo and stackable content bricks. Build lightning-fast static sites with ease and flexibility.
Get started now