You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.3 KiB

4 years ago
  1. +++
  2. title = "Error Page"
  3. description = "Give visitors a reason to stay when errors occur."
  4. categories = ["experience"]
  5. tags = ["engagement", "retention", "branding"]
  6. features = ["error page", "snippets", "code highlighter", "related content", "index blocking"]
  7. [[copyright]]
  8. owner = "Josh Habdas"
  9. date = "2019"
  10. license = "agpl-3.0-or-later"
  11. +++
  12. After Dark includes an animated {{< external rel="nofollow help" href="/404.html" text="404 Page" />}} you can display when other pages cannot be found. The error page contains a full-screen background animation and "404" link with Ginsu treatment. Following the link navigates to the homepage.
  13. {{< hackcss-card header="Interactive Example" >}}
  14. <iframe title="Error Page Example" width="100%" height="300" src="/404.html"></iframe>
  15. {{< /hackcss-card >}}
  16. <!--more-->
  17. Adjust it from `404.html` in the site `content` directory:
  18. ```
  19. ├── archetypes
  20. ├── content
  21. │ ├── post
  22. │   └── 404.html
  23. ├── layouts
  24. ```
  25. If the file doesn't exist yet, copy it from the theme default:
  26. ```sh
  27. $ cp themes/after-dark/content/404.html content
  28. ```
  29. Configure your web server to redirect to `404.html` when pages cannot be found to use it. Combine with [Voyeur Module](/module/voyeur) for help creating {{< external href="https://gohugo.io/content-management/urls/#aliases" text="Page Aliases" />}}.